MT5 Backtesting : SymbolInfoDouble(name,SYMBOL_TRADE_TICK_VALUE_LOSS) returns different value than it from real trading mode
I'm refering following to get the answer.
https://www.mql5.com/en/forum/231076
https://www.mql5.com/en/forum/227407
Hi,
I'm a newbie in MT5 EA programming, wondering if anyone can give a hand on the below question, Appreciate for your valuable time inadvance!
Here I'm going to get the equity value change per tick price update, And my test code is below
if(log_enable)Print(name
,"\t",SymbolInfoDouble(name,SYMBOL_TRADE_TICK_VALUE_LOSS)
,"\t",SymbolInfoDouble(name,SYMBOL_TRADE_TICK_SIZE)
,"\t",SymbolInfoString(name,SYMBOL_CURRENCY_PROFIT)
);
But I found the backtesting result is inconsistent with that in real-trade mode:
Here is the result value in backtesting:
2020.06.15 15:54:54.496 2020.01.01 00:55:56 USDJPY 100.0 0.001 JPY
Here is the result from the real testing mode:
2020.06.15 15:57:12.678 Trader_dfh (GBPUSD,H1) USDJPY 0.9317059536010436 0.001 JPY
It looks in the real trading mode, the SYMBOL_TRADE_TICK_VALUE_LOSS returned is calculated on USD, but in backtesting mode it is returned value is in JPY,
Anything I miss to configure here to get the consistent result? I'd prefer all are calulated in USD.
- 2018.03.07
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I'm a newbie in MT5 EA programming, wondering if anyone can give a hand on the below question, Appreciate for your valuable time inadvance!
Here I'm going to get the equity value change per tick price update, And my test code is below
if(log_enable)Print(name
,"\t",SymbolInfoDouble(name,SYMBOL_TRADE_TICK_VALUE_LOSS)
,"\t",SymbolInfoDouble(name,SYMBOL_TRADE_TICK_SIZE)
,"\t",SymbolInfoString(name,SYMBOL_CURRENCY_PROFIT)
);
But I found the backtesting result is inconsistent with that in real-trade mode:
Here is the result value in backtesting:
2020.06.15 15:54:54.496 2020.01.01 00:55:56 USDJPY 100.0 0.001 JPY
Here is the result from the real testing mode:
2020.06.15 15:57:12.678 Trader_dfh (GBPUSD,H1) USDJPY 0.9317059536010436 0.001 JPY
It looks in the real trading mode, the SYMBOL_TRADE_TICK_VALUE_LOSS returned is calculated on USD, but in backtesting mode it is returned value is in JPY,
Anything I miss to configure here to get the consistent result? I'd prefer all are calulated in USD.