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)?