double Pip; int digits = (int)MarketInfo(_Symbol, MODE_DIGITS); if (digits % 2 == 1){ Pip = MarketInfo(_Symbol,MODE_POINT); Pip *= 10;} else Pip = MarketInfo(_Symbol,MODE_POINT); Bid - 50*Pip
How to manage JPY pairs with parameters? - MQL4 programming forum
Slippage defined in index points - Currency Pairs - Expert Advisors and Automated Trading - MQL5 programming forum PIP, Point, or Tick are all different in general.
What is a TICK? - MQL4 programming forum
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
Slippage defined in index points - Currency Pairs - Expert Advisors and Automated Trading - MQL5 programming forum PIP, Point, or Tick are all different in general.
What is a TICK? - MQL4 programming forum
If used a 4 digits broker Point=PIP (for all forex pairs)
Am I wrong?
I often use multiplying my SL/TP point for _Point predefined variable, of course I have to be aware of what _Point means for current symbol and broker.
- Fabio Cavalloni: If used a 4 digits broker Point=PIP (for all forex pairs)Of course. Did you read What is a TICK? - MQL4 programming forum
- Fabio Cavalloni: of course I have to be aware of what _Point means for current symbol and broker.Only if you use point and not PIP. What part of "code breaks" didn't you understand.
William Roeder:
Only if you use point and not PIP. What part of "code breaks" didn't you understand.
What do you mean with "code breaks"? The code that is not working as expected? Only if used without consciusness and without error handling.
If you set it up for a 5 digit broker, your stops are 10 times bigger on a 4. You are risking 10X.
If you set it up for a 4 digit broker, your stops are 1/10 the proper size on a 5. Instant stop out.
I was looking for the answer for mql5 not mql4
Multiply the amount of points that you want for _Point
thanks a lot.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi all,
Lets say you want to add 50 points stop loss to your position (EURUSD) and you calculate it like this
double MyStopLoss= Tick.bid+0.00050
how can I calculate same stoploss for USDJPY ? Somehow Multipliying it by 100 doesn't seem working.
thank you.
Answer
Just for others seeking the answer, The best answer is this simple
50* _Point
this approach normalize your point StopLoss for 3 and 5 digit pairs.