MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal

Automated Trading and Strategy Testing Forum

Screenshot
GOLD, H4
Real
Adaptive Pair Trading Strategy CAdaptive Pair Trading Strategy C Try product
Adaptive Pair Trading Strategy C
Author: figurelli
Subscribe to signal
New Delhi
60.96%, 119 646.87 USD
ZerolagStochs Indicator
ZerolagStochs
Author: GODZILLA
Genetic Algorithms - It's Easy! Genetic Algorithms - It's Easy!

// Can I know the order be stoploss in OnTrade Even?

To add comments, please log in or register
hongbin fei
954
codeidea 2012.06.04 07:00 

Can I  know the order be stoploss in OnTrade Even?

thanks 

Anatoli Kazharski
13725
tol64 2012.06.13 07:28  
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); }
     }
  }
hongbin fei
954
codeidea 2012.09.24 17:20  
tol64:
thanks!
Moses Olawale  Ajayi
1312
gbemitte 2012.10.22 14:50  
codeidea:
thanks!

/
To add comments, please log in or register