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
Using Points means code breaks on 4 digit brokers, exotics (e.g. USDZAR where spread is over 500 points,) and metals. Compute what a PIP is and use it, not points.
How to manage JPY pairs with parameters? - MQL4 and MetaTrader 4 - MQL4 programming forum
Slippage defined in index points - Currency Pairs - Expert Advisors and Automated Trading - MQL5 programming forum
Sorry I said you are multiplying by zero, which is not true. Edited previous message to make it clear, but those anomalies like sugar still need to be handled.
On my before mentioned FxPro account (5 digit broker) pip-to-points ratio varies from 0.1 to 100. USDZAR (and some others) has 7 significant digits, compared to the usual 6, with pip(1/100 of percentage point)-to-point ratio of 100.
Using either Points or PIP means code breaks if you don't calculate with Tick size. In my opinion there isn't a reason for using PIP. Only Tick size is relevant.
BTW What is the effect of the spread size on PIP, Point or Tick size???
It's up to you if you want to use PIP but your code will be unpredictable on not Forex symbols.
I dare to suspect that the source of that error is a result of dealing with not pips but percentages (not percentage points). 500 points on a 4 digit broker is 0,5% so converting percentages will occasionally move the resulting pip digits down.
How to manage JPY pairs with parameters? - MQL4 and MetaTrader 4 - MQL4 programming forum
I've bothered to read your link and you should consider to stop pasting this link because your code is wrong.
Here is your compute what a PIP is:
where the function DeltaValuePerLot() is:
Of course, the results are unpredictable because the Tick Value is sometime in Account currency but not rare in Base currency see: https://www.mql5.com/en/forum/227407#comment_6534385 . Your code may be works with USD Account currency but it isn't a general solution.
In my case your code calculate PIP=0.001 for USDJPY and I don't talk about indexes and metals.
I've bothered to read your link and you should consider to stop pasting this link because your code is wrong.
Here is your compute what a PIP is:
where the function DeltaValuePerLot() is:
Of course, the results are unpredictable because the Tick Value is sometime in Account currency but not rare in Base currency see: https://www.mql5.com/en/forum/227407#comment_6534385 . Your code may be works with USD Account currency but it isn't a general solution.
In my case your code calculate PIP=0.001 for USDJPY and I don't talk about indexes and metals.
Either you rely on tick value, and then it's ALWAYS in account currency (but as you noted some lazy brokers provide wrong value)
or you calculate it yourself and then it's irrelevant to discuss about it.
Beside correctness of published code, which is a must, discussing about pip/point is just a lost of time, anyone is free to use what he wants. The real problem starts when someone want to impose his own "standard".
I've bothered to read your link and you should consider to stop pasting this link because your code is wrong.
Here is your compute what a PIP is:
where the function DeltaValuePerLot() is:
Of course, the results are unpredictable because the Tick Value is sometime in Account currency but not rare in Base currency see: https://www.mql5.com/en/forum/227407#comment_6534385 . Your code may be works with USD Account currency but it isn't a general solution.
In my case your code calculate PIP=0.001 for USDJPY and I don't talk about indexes and metals.
@Petr Nosek
Did you ever get this resolved in an acceptable manner?
I've been trying to follow these various discussions and I'm now left more confused than ever.
Where is the correct code to calculate CFD pip values when using a non-US account currency (or similarly a CFD, such as JP225, not using USD)?
The POINT of coming here is to gain clarity not get sent down different confusing routes. Just look at these and help point out any error:
1. MarketInfo(Symbol(),MODE_POINT) is 0.0001 for four digit symbol = 1 point
2. MarketInfo(Symbol(),MODE_POINT) is 0.00001 for five digit symbol = also 1 point
3. MarketInfo(Symbol(),MODE_POINT) is 0.01 for two digit symbol = also still 1 point
4. To get pip_value in any case, do point_value*10 (e.g point = 0.0001, pip = 0.0010)
La correct or la wrong?
The POINT of coming here is to gain clarity not get sent down different confusing routes. Just look at these and help point out any error:
1. MarketInfo(Symbol(),MODE_POINT) is 0.0001 for four digit symbol = 1 point
2. MarketInfo(Symbol(),MODE_POINT) is 0.00001 for five digit symbol = also 1 point
3. MarketInfo(Symbol(),MODE_POINT) is 0.01 for two digit symbol = also still 1 point
4. To get pip_value in any case, do point_value*10 (e.g point = 0.0001, pip = 0.0010)
La correct or la wrong?
AI said :
I just want to know if i do MarketInfo(Symbol(),MODE_POINT)*10, will it always give me the correct pip_value
No, MarketInfo(Symbol(),MODE_POINT)*10 will NOT always give you the correct pip value.
Here's why:
For 4-digit brokers:
For 5-digit brokers:
For 2-digit JPY brokers:
The correct formula is:
So your *10 formula only works for 5-digit and 3-digit brokers, not for 4-digit and 2-digit brokers.
PIP, Point, or Tick size are all different in general.
Ticks, PIPs or points in the GUI. Make up your mind. - MQL4 programming forum #1 (2014)
Percentage in point - Wikipedia
Unless you manually adjust your SL/TP for each separate symbol, using Point means code breaks on 4 digit brokers (if any still exists), exotics (e.g. USDZAR where spread is over 500 points), and metals. Compute what a logical PIP is and use that, not points.
How to manage JPY pairs with parameters? - MQL4 programming forum (2017)
Slippage defined in index points - Expert Advisors and Automated Trading - MQL5 programming forum (2018)