BarsInProgress 0 is the primary series.
Are you asking how to run the logic when BarsInProgress is 0?
If you want to run the logic every 1 minute and the primary series is not 1 minute, you can add a 1 minute series with AddDataSeries() and then run on that specific BarsInProgress.
The AdvanceDecline indicator adds a 1 tick ^ADV and 1 tick ^DECL for its calculations. To call this indicator from a host script, you must add those 1 tick series to your script as well.
Comment