Login Page - Create Account

Support Board


Date/Time: Tue, 04 Mar 2025 10:26:46 +0000



[Programming Help] - ACSIL: Limiting trades being processed by my code to the current trading day

View Count: 584

[2021-11-24 00:04:09]
ycomp - Posts: 321
s_ACSTrade trade = TradesList[TradeIndex];

SCDateTime open = trade.OpenDateTime.GetDate();

how could I test if this open date is part of the new trading session (ETH)?

basically I'm trying to limit trades I look at to the "current day", but not system time day, rather the current trading day.
[2021-11-29 23:29:07]
ycomp - Posts: 321
answer are these functions:

sc.LatestDateTimeForLastBar()
sc.IsDateTimeInSession()
sc.IsDateTimeInDaySession()
sc.IsDateTimeInEveningSession()
sc.GetTradingDayDate()

ACSIL Interface Members - Functions: sc.IsDateTimeInDaySession()


leaving all useful information I found here for future reference:

ACSIL Interface Members - Functions: sc.SessionStartTime()

great explanation by wwwwingman about Session Times
ACSIL Session Times | Post: 138311

endtime1, 2
ACSIL Interface Members - Variables and Arrays

could be useful for something later:

Changing the Session Times from an ACSIL study
Control session start and end times programatically?

previous day sessions
ACSIL How to get the time for a bar index in a second Chart? | Post: 65852
Date Time Of Last Edit: 2021-11-30 00:10:18

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

Login

Login Page - Create Account