Login Page - Create Account

Support Board


Date/Time: Fri, 31 Jan 2025 11:54:20 +0000



How to automatically flatten all positions before a specified time (i.e. market close)?

View Count: 3706

[2016-11-19 00:23:44]
jackbravo - Posts: 69
I read the documentation regarding automatically flattening positions once a profit target or loss amount was obtained. Is there any way to do something similar that's time-based? Ideally, I would like to be able to set the exact time, like 310pm CST, to automatically flatten any open positions.

Thank you.
[2016-11-19 02:27:49]
bjohnson777 (Brett Johnson) - Posts: 284
You can give my Multi-Function Trailing Stop a try. I added exit functions based on time and end of trading week. You can give the main trailing stop a large number to get it out of the way if you don't want to use it. The others can be disabled by giving them a 0 value in Settings.

If you do complex and multiple orders in the same chart at the same time, it isn't appropriate, though. Keeping track of those programatically is incredibly difficult. If you do use it, keep a close eye on it the first few times to make sure it behaves as expected.

My main consolidation DLL:
Offering To The Community: Brett Johnson's Standard Tool Kit

(Just to be clear, I'm an independent programmer, not SC support. They'll be along eventually. I can't remember if there's a non-ACSIL time function... but maybe in a spreadsheet trade.)
Date Time Of Last Edit: 2016-11-19 02:33:12
[2016-11-20 10:12:53]
jackbravo - Posts: 69
Thanks! I'll have a look at it.
[2016-11-20 20:30:08]
Sierra Chart Engineering - Posts: 104368
The ability to flatten Trade Positions for all open Charts/Trade DOM maintaining a trade list, at a set time, is going to be in the next release.
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
Date Time Of Last Edit: 2016-11-20 20:30:41
[2016-12-25 02:43:10]
traderacefly - Posts: 57
What version number will this feature be included? Thanks
[2016-12-25 03:02:53]
traderacefly - Posts: 57
UPDATE: I upgraded my version and see this feature now. Does this work in back testing mode? I have "Flatten Positions And Cancel Orders At Set Time" set to TRUE and the time set for 16:00:00 but back testing still holds open positions past this time (i.e. overnight). Is there an additional parameter to set
Date Time Of Last Edit: 2016-12-25 03:12:29
[2016-12-25 03:19:54]
traderacefly - Posts: 57
UPDATE #2: Please disregard above message. I looked a little closer and see the other params above and it is working perfectly!
[2016-12-25 04:09:15]
Sierra Chart Engineering - Posts: 104368
This feature may not work so well during back testing or may end up flattening Trade Positions late due to how it is implemented.
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
[2019-05-03 17:38:11]
grantx - Posts: 244
Is there documentation for cancelling and flattening all positions at a certain time?
Cant find it...
[2019-05-03 17:42:37]
seandunaway - Posts: 313
Global Profit/Loss Management: Flatten Positions at Set Time
[2019-05-03 18:36:01]
Sierra Chart Engineering - Posts: 104368
Yes here is the relevant documentation:
Global Profit/Loss Management

Specifically this section here:
Global Profit/Loss Management: Flatten Positions at Set Time
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

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account