I am trying to debug my code using print statements but it is very difficult as the print statements that I'm using seem to print for all all instruments that I've included in the script in the State.Configure method within OnStateChange. I've tried to fix this by using the print statements within the: if (BarsInProgress == 0) method but for some reason it is only called on the first bar of the session when I do this. This is all being done in market replay mode.
How do I only run the print statements for the master instrument?

Comment