Login Page - Create Account

Support Board


Date/Time: Mon, 24 Feb 2025 00:50:03 +0000



Post From: reseting calculation every day

[2021-02-22 18:54:07]
User30743 - Posts: 365
How do I reset calculations to start from the first bar of each day (at 8:30)?

I have a price action pattern that i want to track, the problem is that it takes into account also bars BEFORE the start of day - I don't want that. I want to make it start at 8:30 and finish and 14:00

I have this piece of code to get first bar of a day


SCDateTime TradingDayStartDateTime = sc.GetTradingDayStartDateTimeOfBar(sc.BaseDateTimeIn[sc.IndexOfLastVisibleBar]);
SCString dateTime = sc.FormatDateTime(TradingDayStartDateTime).GetChars();
auto StartIndex = sc.GetFirstIndexForDate(sc.ChartNumber, TradingDayStartDateTime.GetDate());

then i have som code that actually defines the pattern (it is made of three candles. but now I don't know how to tell: "ok, start searching for it from the StartIndex"

can anyone give me a hint, it must be really trivial i guess, but i just don't know..
Date Time Of Last Edit: 2021-02-22 18:55:56