The documentation gives this code as an example of BarsPeriod.ID
if (BarsPeriod.Id == PeriodType.Tick && BarsPeriod.Value >= 100) { // Indicator calculation logic here }
if (BarsPeriod.Id != PeriodType.Tick && BarsPeriod.Value != 100) { // Error message code goes here }
BarsPeriod.Id != PeriodType.Tick
... if I leave both conditions in place, the indicator applies itself to the chart, and doesn't display the error message regardless of chart type or period.
Why?
Comment