Ok, but as you say, as far as you're aware TV returns the value relative to the traders account currency on FX pairs...
Are we able to get a definitive answer on this?
(also which broker was that with?)
" Or does the "tv" (TICK_VALUE) return what the trading account currencies TICK_VALUE is?"
1) Please use your reference or the docs!
I would use double LotVal = MarketInfo(Symbol(),MODE_TICKVALUE) / MarketInfo(symbol(), MODE_TICKSIZE);
which has to be refreshed once and a while so that a quote_difference*LotVal = Result_in_Acc.Currency.
The docs promise that MODE_TICKVALUE will be "in the deposit currency" but, as GumRai is saying, what the docs promise isn't always what actually happens when a broker implements CFDs.
There used to be lots of brokers where CFDs were reported in the instrument's base currency (e.g. EUR for the Dax), rather than in the deposit currency as promised. I can't actually think of any where that is still the case; all the brokers I am aware of now handle CFDs properly. But I do know of a broker where the MODE_TICKVALUE on the Dax is just simply wrong; it's in euros, converted to the deposit currency, but the base value in euros has been mis-entered on the MT4 Server...
[...] to my GBP denominated account, it won't be?
The docs promise that MODE_TICKVALUE will be "in the deposit currency" but, as GumRai is saying, what the docs promise isn't always what actually happens when a broker implements CFDs.
There used to be lots of brokers where CFDs were reported in the instrument's base currency (e.g. EUR for the Dax), rather than in the deposit currency as promised. I can't actually think of any where that is still the case; all the brokers I am aware of now handle CFDs properly. But I do know of a broker where the MODE_TICKVALUE on the Dax is just simply wrong; it's in euros, converted to the deposit currency, but the base value in euros has been mis-entered on the MT4 Server...
I think the DAX is always in EUR but TickValue should convert this EUR value to the account-value!
Therefore the Tickvalue changes always due the volatile rate between EUR and the AccountCurrency other than the Point ("Returns the point size of the current symbol in the quote currency")!!
Ok, if you do have an EUR-account you won't see any change of course!
I hardly can imagine that the broker has entered wrong TickValues as this would cause wrong prices booked into the accounts of all their client!
I hardly can imagine that the broker has entered wrong TickValues as this would cause wrong prices booked into the accounts of all their client!
No, that's not correct.
The way that MT4 itself calculates its profit is not affected by MODE_TICKVALUE. It's possible for the profit which MT4 reports on open positions to be correct while MODE_TICKVALUE is wrong.
As GumRai independently confirms, MODE_TICKVALUE is not always reliable. But that does not mean that the broker is booking incorrect profits for trades. It only means that EAs miscalculate things like lot sizes or s/l distances if MODE_TICKVALUE is wrong.
No, that's not correct.
The way that MT4 itself calculates its profit is not affected by MODE_TICKVALUE. It's possible for the profit which MT4 reports on open positions to be correct while MODE_TICKVALUE is wrong.
As GumRai independently confirms, MODE_TICKVALUE is not always reliable. But that does not mean that the broker is booking incorrect profits for trades. It only means that EAs miscalculate things like lot sizes or s/l distances if MODE_TICKVALUE is wrong.
That is correct.
The reason that I spotted this is because my calculated lot sizes were resulting in losses of 25%+ more than they should have been when the stop loss was hit.
I have checked and I see that the profit calculation mode is "Futures", not "CFD" , but I don't see that this should be relevant.
It seems, that with this broker the FTSE tick value is also wrong and that would mean that calculated lot sizes would result in losses of 60% more if the stop loss is hit.
Another worrying aspect with this script
Print("TS="+DoubleToStr(MarketInfo(Symbol(),MODE_TICKSIZE),Digits)+ " TV="+DoubleToStr(MarketInfo(Symbol(),MODE_TICKVALUE),2));
Applied twice to the chart, I got this
0 05:14:26.484 Script a EURAUD,H1: loaded successfully 0 05:14:26.500 a EURAUD,H1: initialized 0 05:14:26.500 a EURAUD,H1: TS=0.0001 TV=0.00 0 05:14:26.500 a EURAUD,H1: uninit reason 0 0 05:14:26.500 Script a EURAUD,H1: removed 0 05:15:13.640 Script a EURAUD,H1: loaded successfully 0 05:15:13.656 a EURAUD,H1: initialized 0 05:15:13.656 a EURAUD,H1: TS=0.0001 TV=8.84 0 05:15:13.656 a EURAUD,H1: uninit reason 0 0 05:15:13.656 Script a EURAUD,H1: removed
Subsequent applications returned the correct value, but one wrong value is one too many! It can give a zero divide error.
(also which broker was that with?)
I haven't named the broker due to the rule against broker discussion
That is correct.
The reason that I spotted this is because my calculated lot sizes were resulting in losses of 25%+ more than they should have been when the stop loss was hit.
I have checked and I see that the profit calculation mode is "Futures", not "CFD" , but I don't see that this should be relevant.
It seems, that with this broker the FTSE tick value is also wrong and that would mean that calculated lot sizes would result in losses of 60% more if the stop loss is hit.
Another worrying aspect with this script
Applied twice to the chart, I got this
Subsequent applications returned the correct value, but one wrong value is one too many! It can give a zero divide error.
...SymbolInfoDouble() with SYMBOL_TRADE_TICK_VALUE give you the same result ? Maybe they are not implemented in the same way.
Yes, it gives the same result
SYMBOL_TRADE_TICK_VALUE_PROFIT and SYMBOL_TRADE_TICK_VALUE_LOSS return 0.00, although I'm not sure of the point of them as surely tick value is the same for a profit or a loss?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
So, I just wanted another set of eyes on this because as far as I am aware, in my risk (lot) calculation's, all I am calculating is what the pip value is in the term currency and not in my deposit currency?
Therefore, depending on the market I trade, the Term Currency pnl will be correct, but relative to my GBP denominated account, it won't be? Am I correct in thinking this way?
Or does the "tv" (TICK_VALUE) return what the trading account currencies TICK_VALUE is? (in layman's terms, does the server return the tick value relative to what my denominated trading currency is?)