noSkill06s:
Support && (diffToSupport)< 20*Digits() ){ // 2 = Pips
noSkill06s: My Problem with my Code:
(diffToSupport*10000)<2 (diffToResistance*10000)<2
Don't hard code numbers. Fails on all JPY pairs.
Difference in points (assuming a 5 digit broker). | diffToSupport/_Point < 20 diffToResistance/_Point < 20 |
Difference in PIPs. | diffToSupport/PIP < 2 diffToResistance/PIP < 2 |
Difference less than 2 PIPs | diffToSupport < 2 * PIP diffToResistance < 2 * PIP |
PIP, Point, or Tick are all different in general.
What is a TICK? - MQL4 programming forum (2014)
Unless you manually adjust your SL/TP for each separate symbol, using Point 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 programming forum (2017)
Slippage defined in index points - Expert Advisors and Automated Trading - MQL5 programming forum (2018)

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
I would like to calculate the „Pips“ difference between a indicator and the Close.
The Parameters which I need for my calculation (in my opinion)
1. Breakout indicator (Support/ Resistance)
2. Close Course
My Try in code it works:
My Problem with my Code:
At the moment it only works with the EURUSD and Pairs which has following decimals 1.1111
I need to multiplicate the result with „10000“ to get the Pips a 1,2,3
My Question is there a (I*m sure“) to calculate that better?
And my second Question do I need to setup the calculation formula for every pair or is it possible
To calculate the difference within one function for every pair?