Support Board
Date/Time: Tue, 26 Nov 2024 10:36:00 +0000
SierraChart - Trading time for a trading system
View Count: 853
[2016-08-06 18:00:32] |
FerroTrader - Posts: 70 |
Hello, a friend of mine and me are struggling in getting a trading system to trade JUST between certain hours (i.e. trade from 3:00 AM to 4:00 AM ONLY). Well, how do we code this in ASCIL for a trading system in Sierra ? Thank you Andrew |
[2016-08-07 00:59:58] |
Sierra Chart Engineering - Posts: 104368 |
Here is an example: //Optional: Check if within allowed time range. In this example we will use 10:00 through 14:00. This is according to the time zone of the chart.
int BarTime = sc.BaseDateTimeIn[sc.Index].GetTime(); bool TradingAllowed =(BarTime >= HMS_TIME(10, 0, 0) && BarTime < HMS_TIME(14, 0, 0)); You can then use TradingAllowed in your code anywhere you require. 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: