SYMBOL_TRADE_TICK_VALUE return wrong value using Custom Symbol in strategy tester

 

Hello everyone,

I am writing to you because I have a problem that is driving me crazy and I would be really happy if I could get some help.

I know that this topic has already been treated several times, but honestly after hours going through the discussions on the Forum, I never found an answer to my problem. So i try again.. :)

I downloaded the EURUSD symbol in tick mode from "QuantDataManager" and imported it into MT5, everything ok. I created an EA where I calculate the position volume based on the Stoploss using the "SymbolInfoDouble (" EURUSDmy ", SYMBOL_TRADE_TICK_VALUE)" function.

My big big problem is that during the strategy tester the value returned by SYMBOL_TRADE_TICK_VALUE is always the same for the entire duration of the test (whether it is a day, a month or a year is not important, the value is always the same) and I noticed that it is the same as the value it had when I imported the "Custom Symbol" into MT5 but never change.

However, if instead of using the Custom Symbol "EURUSDmy" I use the standard MT5 symbol "EURUSD" then the value of SYMBOL_TRADE_TICK_VALUE is correct and its value changes regularly.

I am using MT5 downloaded directly from Metaquotes and I use a Demo account opened on MetaQuotes-Demo. However, I also have the same problem on an ICMarkets account.


Thanks .. I look forward to an answer.
 

If the currency used to calculate profit is USD  and the size of one tick is 0.00001 , the tick value of a standard lot of EURUSD should always be 1.

 
Kang Feng #:

If the currency used to calculate profit is USD  and the size of one tick is 0.00001 , the tick value of a standard lot of EURUSD should always be 1.

Thanks for reply!

But No.This is not the problem. I can simulate having an account in EUR, USD, CHF, GBP, whatever you want, but the value returned by the "SymbolInfoDouble (" EURUSDmy ", SYMBOL_TRADE_TICK_VALUE)" function throughout the entire backtest period is always the same, for example yesterday it always returned the value of 0.9827333746081351 without ever changing, which is exactly the 1 / EURUSD value of the moment I loaded the Custom symbol on the MT5. Instead it should change because the value of EURUSD a year ago was obviously different.

While if in the backtest I use the standard symbol of the MT5 EURUSD then the return value of the function is perfect. This is what I cannot understand.

You can do a test yourself to check if you want. Just create a Custom Symbol with 1/2 years of data and create an EA with just these two lines in the OnTick () function:

double tick_value = SymbolInfoDouble ("EURUSDmy", SYMBOL_TRADE_TICK_VALUE);

Print ("Tick Value: " + (string)Tick_value);

You will see that the value will never change.

 
Alessandro #:

Thanks for reply!

But No.This is not the problem. I can simulate having an account in EUR, USD, CHF, GBP, whatever you want, but the value returned by the "SymbolInfoDouble (" EURUSDmy ", SYMBOL_TRADE_TICK_VALUE)" function throughout the entire backtest period is always the same, for example yesterday it always returned the value of 0.9827333746081351 without ever changing, which is exactly the 1 / EURUSD value of the moment I loaded the Custom symbol on the MT5. Instead it should change because the value of EURUSD a year ago was obviously different.

While if in the backtest I use the standard symbol of the MT5 EURUSD then the return value of the function is perfect. This is what I cannot understand.

You can do a test yourself to check if you want. Just create a Custom Symbol with 1/2 years of data and create an EA with just these two lines in the OnTick () function:

double tick_value = SymbolInfoDouble ("EURUSDmy", SYMBOL_TRADE_TICK_VALUE);

Print ("Tick Value: " + (string)Tick_value);

You will see that the value will never change.


how about "EURUSD.my" instead of "EURUSDmy" ?

 
Kang Feng # :


how about "EURUSD.my" instead of "EURUSDmy" ?

Hi Kang, thank you very much for answering, it's very kind of you, unfortunately that's not the problem either, you won't believe it but I also did the test you say, I did various tests to create the Custom Symbol and I called it in many ways myEURUSD, EURUSDmy, EUR-USD, EURUSD.test .. Unfortunately I think I could call it "Alessaandro" or "Kang" that the result will not change.

It is truly a mystery. I'm starting to suspect it's an MT5 Bug.

 
Alessandro #:

Hi Kang, thank you very much for answering, it's very kind of you, unfortunately that's not the problem either, you won't believe it but I also did the test you say, I did various tests to create the Custom Symbol and I called it in many ways myEURUSD, EURUSDmy, EUR-USD, EURUSD.test .. Unfortunately I think I could call it "Alessaandro" or "Kang" that the result will not change.

It is truly a mystery. I'm starting to suspect it's an MT5 Bug.


I have used the custom symbol feature on MT5 for several years, and I also use QuantDataManager to get historical data.

I wrote a simple code to check all my 6 custom symbols for futures and CFD products I set up, and in all cases SymbolInfoDouble(_Symbol,SYMBOL_TRADE_TICK_VALUE) returned the correct tick value.

I don't trade forex, so I can't test it further.

 
Kang Feng # :


I have used the custom symbol feature on MT5 for several years, and I also use QuantDataManager to get historical data.

I wrote a simple code to check all my 6 custom symbols for futures and CFD products I set up, and in all cases SymbolInfoDouble(_Symbol,SYMBOL_TRADE_TICK_VALUE) returned the correct tick value.

I don't trade forex, so I can't test it further.

Thanks so much, don't worry! I will try to find a solution!
Reason: