This function within the CTrade class is buggy! When running strategy tester the closing prices for some instruments are hugely incorrect. Like EURCAD can be closed at USDJPY prices. This generates false tester results that inflate a strategy's performance.
- Spike in Strategy Tester Performance
- Deal magic numbers
- Strategy tester - EA not buying on open prices
Reminds this reason.
Forum on trading, automated trading systems and testing trading strategies
Wrong symbol for Pending Order ticket during EA backtesting
fxsaber, 2019.05.29 22:30
Try this
//+------------------------------------------------------------------+ //| Modify specified pending order | //+------------------------------------------------------------------+ bool CTrade::OrderModify(const ulong ticket,const double price,const double sl,const double tp, const ENUM_ORDER_TYPE_TIME type_time,const datetime expiration,const double stoplimit) { //--- check stopped if(IsStopped(__FUNCTION__)) return(false); //--- clean ClearStructures(); m_request.symbol = ::OrderSelect(ticket) ? ::OrderGetString(ORDER_SYMBOL) : NULL; //--- setting request m_request.action =TRADE_ACTION_MODIFY; m_request.magic =m_magic; m_request.order =ticket; m_request.price =price; m_request.stoplimit =stoplimit; m_request.sl =sl; m_request.tp =tp; m_request.type_time =type_time; m_request.expiration =expiration; //--- action and return the result return(OrderSend(m_request,m_result)); }

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register