In writing a Ninjascript strategy, I sometimes want to make sure I am only in one trade at a time. I usually do this by setting a boolean variable when I enter a trade and resetting it when I exit a trade. But if I exit the trade via a profit target or stop loss, how do I detect this?
Or is there an easier way to prevent the strategy entering more than one trade at a time?
Thanks.
Comment