I'm developing an indicator that is either greater than 0, or less than 0. I'm using a universe selection, and not picking single stocks to trade. how can i set this up in OnData()?
pseudocode:
if indicator <= 0
if not paused, pause trading
if invested, liquidate
return
if indicator > 0
if paused, resume trading
Thanks!
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!