I run a script that alerts me via email when the market is favourable for my trading, however when the strategy sends an order to the market (limit or stop) I would like to avoid getting alerts on the same bar I send the order to the market, whats the best way to filter this?
I tried something like this but it doesn't work
if (Position.MarketPosition == MarketPosition.Flat && (entryOrderShort !=null || entryOrderLong !=null))
{

Comment