As I understand, this error is occuring because I am attempting to place a stoploss on the wrong side of the market (stop above price if long). Is this correct? These errors seem to be happening later in the trade, as price action is approaching my stop (which I update).
Questions:
1. What is the difference between OnBarUpdate with COBC=false, and OnMarketData?
2. Before placing my stop, I want to compare my desired stop to price action, and if my desired stop is on the wrong side of price, exit via some other means (so as to avoid the rejected order). Might this work? Would this best be done via OnMarketData?
3. Do you have links to non-trivial examples of OnMarketData?
Thanks!
Comment