I've been trying to fix my indicator which should send me a push notification if my order has hit SL or TP and for some reason every time an order closes I do get a push notification but for all my trades in my history. How do I make it so I only get it for the one that just closed and not the ones that have closed at a previous date? Thanks
if (OCP==OrderStopLoss()) txt="SL";
if (OCP==OrderTakeProfit()) txt="TP";
SendNotification(Symbol() + " hit "+txt+"");
ah i see you are server dependant i was thinking your robot ordered to close , but it is a lever that is hit, then you can simply
check the notify of trade transactions function in settings.