For normal indicator behavior, once the data is loaded
- State changes to State.Historical
- OnBarUpdate is called for all historical data.
- State changes to State.Realtime
- OnBarUpdate is called as new market data comes in to complete bars (depending on the type of bar, time frame etc..)
A.) The indicator has no plots available. An indicator like this has no options in the drop down in the UI to select from the plots. No call to AddPlot occurs in the indicator. In this case the behavior is
- State changes to State.Historical
- OnBarUpdate is called for all historical data.
- State changes to State.Realtime
This was discovered when I built an indicator to trigger alerts. The indicator used other indicators to perform calculations and under certain conditions will trigger alerts. A useful lightweight solution if one wants to monitor a list of instruments, but not have a chart for every instrument in the list.
B.) The indicator has plots available. In this case the behavior is
- State Changes to State.Historical
- State Changes to State.Realtime
- All bars, including historical bars are processed in State.Realtime.
Comment