Hello, can anyone explain how to get a tick value MQL 5?
I use SYMBOL_TRADE_TICK_VALUE but it return 56.88 for EURUSD, this is wrong for sure
It depends on your account currency. It seems your account currency is RUB. In this case the Tick Value is correct. But not all Symbols must have Tick Value in the account currency. See my topic:
It depends on your account currency. It seems your account currency is RUB. In this case the Tick Value is correct. But not all Symbols must have Tick Value in the account currency. See my topic:
OMG, the devil is in the details, deposit was in RUB, now I see it work, thank you!
It depends on your account currency. It seems your account currency is RUB. In this case the Tick Value is correct. But not all Symbols must have Tick Value in the account currency. See my topic:
Damned Petr, I don't know why you keep repeating that. That's NOT exact !
All symbols must have tick value in account currency.
Some brokers provides wrong data. That's an other matter completely.
Damned Petr, I don't know why you keep repeating that. That's NOT exact !
All symbols must have tick value in account currency.
Some brokers provides wrong data. That's an other matter completely.
All symbols should (must) have tick value in the account currency (according to the documentation but documentation doesn't always tell the truth) but not all symbols at all brokers have tick value in the account currency. It means you have to check it.
All symbols should (must) have tick value in the account currency (according to the documentation but documentation doesn't always tell the truth) but not all symbols at all brokers have tick value in the account currency. It means you have to check it.
Earlier, I was wondering how would you check it ?
Earlier, I was wondering how would you check it ?
In general: Manually so far.
At my brokers: I can rely on the value SymbolInfoInteger(_Symbol,SYMBOL_TRADE_CALC_MODE). If the value is equal to 2 ("Futures") it means that the tick value is in the base currency.
Have a look at attached files. At the same account:
for EURUSD (Profit calculation mode 0) the tick value is in the deposit currency (CZK) as documentation says
for Crude Oil (Profit calculation mode 2) the tick value is in base currency (USD)
In general: Manually so far.
At my brokers: I can rely on the value SymbolInfoInteger(_Symbol,SYMBOL_TRADE_CALC_MODE). If the value is equal to 2 ("Futures") it means that the tick value is in the base currency.
Have a look at attached files. At the same account:
for EURUSD (Profit calculation mode 0) the tick value is in the deposit currency (CZK) as documentation says
for Crude Oil (Profit calculation mode 2) the tick value is in base currency (USD)
Thank you for the tips.
I had this same doubt and after testing and comparing with real trades I actuallt did, I found the following :
SymbolInfoDouble(_Symbol,SYMBOL_TRADE_TICK_VALUE)*Number of points = profit/loss on that trade.
However if you are trading a pair that does not have your currency account the variable SYMBOL_TRADE_TICK_VALUE will fluctuate.
For example, you account is in USD and you make a trade on AUDCAD and you get 100 points today. Tomorrow you manage to make the same trade and get 100 points again. Your profit you not necessarily be the same. This is because SYMBOL_TRADE_TICK_VALUE varies as well.
SYMBOL_TRADE_TICK_VALUE depends of the ratio USD/CAD or USD/AUD depending on waht is the pair SYMBOL_CURRENCY_PROFIT.
So you are actually trading 2 pairs at the same time.
I had this same doubt and after testing and comparing with real trades I actuallt did, I found the following :
SymbolInfoDouble(_Symbol,SYMBOL_TRADE_TICK_VALUE)*Number of points = profit/loss on that trade.
However if you are trading a pair that does not have your currency account the variable SYMBOL_TRADE_TICK_VALUE will fluctuate.
For example, you account is in USD and you make a trade on AUDCAD and you get 100 points today. Tomorrow you manage to make the same trade and get 100 points again. Your profit you not necessarily be the same. This is because SYMBOL_TRADE_TICK_VALUE varies as well.
SYMBOL_TRADE_TICK_VALUE depends of the ratio USD/CAD or USD/AUD depending on waht is the pair SYMBOL_CURRENCY_PROFIT.
So you are actually trading 2 pairs at the same time.
In summary, in case its of use to any other new trader like me, I have:
Lots = Account Balance * Risk as Decimal / Stop Loss Distance in Points * Dollars Per Point
The last one, dollars per point, was always the confusing one. Knowing that I can simply use SYMBOL_TRADE_TICK_VALUE and this resolves everything. And then you just make sure you normalize the lots so that they are in units of the lot step size (using SYMBOL_VOLUME_STEP), verify that they exceed minimum lot size (SYMBOL_VOLUME_MIN), and then you should have a proper risk-based lot size double value.
double tv = SymbolInfoDouble(sym, SYMBOL_TRADE_TICK_VALUE); double lot = riskQ / (ticks * tv);
(riskQ either equalling a percentage or a specific amount depending on my risk management settings)
but getting a divide by zero error on that second line.
Debugging it gives this:
How can SYMBOL_TRADE_TICK_VALUE == 0.0
?????????????????????
So frustrated
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello, can anyone explain how to get a tick value MQL 5?
I use SYMBOL_TRADE_TICK_VALUE but it return 56.88 for EURUSD, this is wrong for sure