Download MetaTrader 5

Can I know the order be stoploss in OnTrade Even?

To add comments, please log in or register
HongDi s& t development co.,ltd.
1603
hongbin fei  

Can I  know the order be stoploss in OnTrade Even?

thanks 

Anatoli Kazharski
62635
Anatoli Kazharski  
codeidea:

Can I  know the order be stoploss in OnTrade Even?

thanks 

ulong ld_ticket=0;
//---
if(HistorySelect(0,TimeCurrent()))
  {
   i=HistoryDealsTotal()-1;
//---
   if(nmb_deal!=i) { Print("Number Last Deal: ",i); nmb_deal=i; } else { return; }
//---
   if((ld_ticket=HistoryDealGetTicket((int)i))>0)
     {
      ld_comment=HistoryDealGetString(ld_ticket,DEAL_COMMENT);
      //---
      if(StringFind(ld_comment,"sl",0)!=-1) { Print("Close by Stop Loss: ",ld_comment); }
      if(StringFind(ld_comment,"tp",0)!=-1) { Print("Close by Take Profit: ",ld_comment); }
     }
  }
HongDi s& t development co.,ltd.
1603
hongbin fei  
tol64:
thanks!
Moses Olawale  Ajayi
2404
Moses Olawale Ajayi  
codeidea:
thanks!

Etienne Chabert
249
Etienne Chabert  
tol64:
Very usefull ! Thx ;)
Pasi Hakamaki
6672
Pasi Hakamaki  
Thanks!
To add comments, please log in or register