- mensis Iunii 23, 2013
- Missae by: Praenomen to Team
- Categoria: FX Ind
No Comments
1687
1552
Nomen: |
|
||
Author: | cmillion (2010.04.26 12:41) | ||
Downloaded: | 2859 | ||
Download: |
|
||
Descriptio:The indicator alerts at order closing, and reports about its profit. //+------------------------------------------------------------------+ //| AlertCloseOrder.mq4 | //| Copyright © 2010, Vladimir Hlystov | //| http"://cmillion.narod.ru | //+------------------------------------------------------------------+ #property copyright "Copyright © 2010, Vladimir Hlystov" #property link "http"://cmillion.narod.ru" #property indicator_chart_window int Orders; //+------------------------------------------------------------------+ int satus() { si (Orders>OrdersTotal()) AlertOrder(); Orders=OrdersTotal(); reditus(0); } //+------------------------------------------------------------------+ void AlertOrder() { string txt; double OCP; int i=OrdersHistoryTotal()-1; si(OrderSelect(ego,SELECT_BY_POS,MODE_HISTORY)==true) { OCP=OrderClosePrice(); si (OCP==OrderStopLoss() ) txt="SL"; si (OCP==OrderTakeProfit()) txt="TP"; Alert("Order N ",OrderTicket()," close in ",txt," ", DoubleToStr(OCP,Digitorum)," lucrum ",DoubleToStr(OrderProfit(),2)); } } //+------------------------------------------------------------------+ |