Login Page - Create Account

Support Board


Date/Time: Sat, 20 Apr 2024 02:09:40 +0000



Backtest/Replay - possible to use timer for flattening positions & cancel orders?

View Count: 731

[2019-11-11 20:22:16]
Chad - Posts: 231
Per the title, is it possible in a back-testing environment for a 'timer' routine to flatten positions, cancel any open orders, and block any new orders, during a specific day-of-week and timeframe? I would regularly have more than one 'event' during the week to use a timer for, so having two session start/end times wouldn't suffice.
[2019-11-12 04:38:39]
Sierra Chart Engineering - Posts: 104368
Yes this is certainly possible. How is the trading system 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-11-12 17:13:47]
Chad - Posts: 231
The tentative plan is to handle all new order events in ACSIL, no Alert studies from Charts; timers configured using sc.IsDateTimeContainedInBarIndex. If you meant a different aspect in context of 'implementation', please clarify.
[2019-11-12 18:13:31]
Sierra Chart Engineering - Posts: 104368
This can certainly be done. You would want to examine the date-time in:
ACSIL Interface Members - Variables and Arrays: sc.BaseDateTimeIn[]

And then take the action that you need to.

An example of something related to this is in: /ACS_Source/TradingSystemBasedOnAlertCondition.cpp

This is in the Sierra Chart installation folder.

Have a look at how this variable is used: Input_AllowTradingOnlyDuringTimeRange
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: 2019-11-12 18:14:22
[2019-11-27 21:01:13]
User568537 - Posts: 21
Hi
I would like to do something similar but using the "Trading System Based on Alert Condition" study: i.e. go long only on Tuesday at a specific time and exit on Wednesday at another time. Is it possible?
[2019-12-03 06:11:18]
Sierra Chart Engineering - Posts: 104368
You can certainly modify the study to meet your requirements. Refer to:
How to Build an Advanced Custom Study from Source Code
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: 2019-12-03 06:11:28

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

Login

Login Page - Create Account