Support Board
Date/Time: Sun, 12 Jan 2025 18:35:24 +0000
Flatten Time on Spreadsheet Trading Study
View Count: 1057
[2017-03-09 05:51:22] |
User794640 - Posts: 33 |
Please see attached screenshot. In the spreadsheet for trading study, I set "Flatten Positions and Cancel Orders" to TRUE and put 14:00:00 as the time to flatten positions but it doesn't seem to be working correctly. I attached an example of it not flattening the positions as referenced in the spreadsheet. Am I missing something here? Thanks in advance.
|
flatten time.PNG / V - Attached On 2017-03-09 05:51:17 UTC - Size: 62.06 KB - 283 views |
[2017-03-09 17:35:45] |
Sierra Chart Engineering - Posts: 104368 |
Is the time zone of the chart using the global time zone setting? Refer to: http://www.sierrachart.com/index.php?page=doc/TimeZone.html Also was there trading activity at 14:00:00? This is needed for the Flatten operation to happen at that time. What is the timeframe of the chart bars? Are you able to consistently reproduce the issue by setting the time to flatten to a few minutes ahead of time and waiting for it to be encountered? Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
[2017-03-09 18:17:03] |
User794640 - Posts: 33 |
Is the time zone of the chart using the global time zone setting?
Yes, the chart is using the global time zone setting, which I have set to central (chicago) time. What is the timeframe of the chart bars?
I've tested with both 5 minute and standard range bars. Also was there trading activity at 14:00:00? This is needed for the Flatten operation to happen at that time.
It's the front month crude oil futures market, it may not be super busy at 14:00:00 but there are definitely trades every minute. Are you able to consistently reproduce the issue by setting the time to flatten to a few minutes ahead of time and waiting for it to be encountered?
I'm working replicating it again with different time and bar increments and will update.
Date Time Of Last Edit: 2017-03-09 18:26:24
|
[2017-03-09 18:48:37] |
User794640 - Posts: 33 |
UPDATE I tried this on my end and see a reoccurring issue. Steps to reproduce: 1. CL futures chart, front month, set any entry trigger that generates consistent entires on the spreadsheet study, use attached orders: no stop 500 tick target. Set up study so you don't take reversal signal or additional signals in same direction. We want one entry and rides out for the entire day until time to flatten via spreadsheet function. 2. Set J85 to true, set J86 to 08:00:00, set J87 to 10:59:59 3. Set J88 to true, set J89 to 14:00:00 4. Scroll back chart and do a replay backtest with the accurate trading system back test mode My experience is the position is entered between 08:00:00 and 10:59:59 as expected but is not flattened at 14:00:00 (all chicago time) If you change J89 to 11:00:00 it works as expected on mine. tests: Changed J89 to: 11:15:00 didn't work 11:30:00 didn't work 12:00:00 didn't work 13:00:00 didn't work 10:00:00 WORKS 11:00:00 WORKS 14:00:01 didn't work 13:59:59 didn't work Date Time Of Last Edit: 2017-03-09 19:09:29
|
[2017-03-09 22:28:37] |
Sierra Chart Engineering - Posts: 104368 |
OK it is now clear what the issue is. The flatten and cancel operation cannot take place because it is not within the allowed time range. We will update the documentation. Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
[2017-03-09 23:25:56] |
Sawtooth - Posts: 4149 |
You can do what you want using cells J28 and J29: J28: =AND(J8=0,OR(J41-INT(J41)<TIMEVALUE("08:00:00"),J41-INT(J41)>TIMEVALUE("10:59:59"))) J29: =J41-INT(J41)>TIMEVALUE("14:00:00") The reference to J8 in J28 allows an exit, but no entries, after 10:59:59. So if you are still in a position at 14:00:00, J29 will flatten. |
To post a message in this thread, you need to log in with your Sierra Chart account: