footfairy11: But for the super exotic pairs like USDZAR it is off. Especially for things like the spread.
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

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
Hey guys I am trying to build an Expert Advisor that simply sets a StopLoss and a TakeProfit based on a set number of pips. Not that complicated.
But why in the world is it nearly impossible to do it perfectly for every currency pair and stock?
My code is below:
Then whenever I am calculating my StopLoss price I use the following (based on a StopLoss of 30 pips):
My problem is that this works fine for things like GBPUSD, USDJPY, etc.
This also works now for FTSE100 and other indexes.
But for the super exotic pairs like USDZAR it is off. Especially for things like the spread.
Does anyone have code that they use in their EA's that gives you the correct pip value no matter what you are using?