aiman
Active Member

- Messages
- 1,889
- Joined
- Apr 19, 2006
- Messages
- 1,889
- Reaction score
- 1,356
- Points
- 101
Indi untuk alert atau hidden sl? :-?
Bawah ni indi
Bawah ni indi
Code:
#property indicator_chart_window
int total;
int init() { total = OrdersTotal(); return(0); }
int start()
{
if (total>OrdersTotal())
{
string text;
OrderSelect(OrdersHistoryTotal()-1, SELECT_BY_POS, MODE_HISTORY);
text = OrderSymbol() + " (" + DoubleToStr(OrderTicket(),0) + ")";
if (OrderStopLoss()==OrderClosePrice()) text = text+ " hit SL";
else if (OrderTakeProfit()==OrderClosePrice()) text = text+ " hit TP";
else text = text + " has been closed!!!!";
Alert(text);
}
return(0);
}
Last edited: