IsResetOnNewTradingDays

View as Markdown

Definition

Determines if the specified bar series iusing Break at EOD

The property available on the UI will override any values set in code. Please see the help guide topic on using Break at EOD for more information.

Property Value

A bool[] when true, indicates the specified BarsArray is setup to run Break at EOD; otherwise false. Default value is false.

Syntax

IsResetOnNewTradingDays[int idx]

This property should NOT be accessed within the OnStateChange() method before the State has reached State.DataLoaded.

Examples

1protected override void OnStateChange()
2{
3 if (State == State.SetDefaults)
4 {
5 Name = "Examples Indicator";
6 }
7
8 else if (State == State.Configure)
9 {
10 //Add AAPL 1 minute with RTH trading hours, set to break EOD
11 AddDataSeries("AAPL", new BarsPeriod() { BarsPeriodType = BarsPeriodType.Minute, Value = 1 }, 50, "US Equities RTH", true);
12 }
13
14}
15protected override void OnBarUpdate()
16{
17 //Print out the current bars series name and break EOD setting on start up
18 // IsResetOnNewTradingDays[0] Primary
19 // IsResetOnNewTradingDays[1] AAPL
20
21 if (CurrentBar == 0)
22 Print(BarsArray[BarsInProgress].ToChartString() + " " + IsResetOnNewTradingDays[BarsInProgress]);
23
24 //Output:
25 //ES 03-15 (1 Minute) True
26 //AAPL (1 Minute) False