I need to have some actions taken once and once only when my main Strategy script is activated. The remaining actions (with COBC = true) are to done on each real time bar close.
I’ve never attempted this before but have done some research and I’d really appreciate confirmation that the following is the best way of achieving this:
protected override void OnStartUp()
{
Conditions for ‘once only’
protected override void OnBarUpdate()
{
Conditions for ‘each new real-time bar’
If this won’t work or if there’s a better way of doing this, thanks very much in advance for letting me know.

Comment