Adjust for five digit brokers - I'm confused

 

I'm sorry if the question looks stupid and it might be discussed a lot of times on the forum.
I just don't figure out what should I ask the forum to get the answer....
 
I passed through a lot of examples and threads and most of them use some permutation of the following code:

      _tickValue = MarketInfo(_symbol, MODE_TICKVALUE);
      if ((Digits == 3) || (Digits == 5))
      {
         _point = _Point * 10;
         _tickValue = _tickValue * 10;
      }

and later it use this _point for OrderSend() parameters calculation like:

   double spreadPnts = MarketInfo(_Symbol, MODE_SPREAD);
   if(buySignal)
   {
      orderPrice = SomePrice;
      orderSL = SomeOtherPrice - spreadPnts * _point;
   }
   else .......

But I look at the chart and I don't understand this adjustment...

For USDJPY, for example, Point returns 0.001 and it's exactly the multiplier I need to use on the spread to get the difference I see on the chart of the pair.
So, why it should be adjusted? 
For me, it looks like after adjustment the calculation returns the wrong spread...

 
Artiom Orlov:

I'm sorry if the question looks stupid and it might be discussed a lot of times on the forum.
I just don't figure out what should I ask the forum to get the answer....
 
I passed through a lot of examples and threads and most of them use some permutation of the following code:

and later it use this _point for OrderSend() parameters calculation like:

But I look at the chart and I don't understand this adjustment...

For USDJPY, for example, Point returns 0.001 and it's exactly the multiplier I need to use on the spread to get the difference I see on the chart of the pair.
So, why it should be adjusted? 
For me, it looks like after adjustment the calculation returns the wrong spread...

The first step is to dump the notion of pips.

The permutation does the following : 

  1. get the value of the smallest fluctuation (assuming forex) if we had an order of 1 Lot
  2. if digits are 3 (USDJPY / GBPJPY) or 5 (EURUSD/GBPUSD) then increase that value by 10 because the OP want the cost of one Pip's magnitude of a fluctuation for a 1Lot order

Then that size is multiplied for a stop loss because they also want the SL in pips too .

Just dump the pips , if you remove the x10 part , and , define your inputs in points (and for non fx symbols expect that the tick size might differ from the _point , another topic) then you should be fine . 

Its origins are from old brokers who had 2 digits after the decimal points for USDJPY/GBPJPY etc and 4 digits after the decimal point for EURUSD/GBPUSD etc

So dump the term pips , and also dump mt4

 

Lorentzos Roussos

Thank you for your reply 😉,

@ Artiom Orlov

As you said Lorenzo, you have to forget the Pips,

When I say forget it, I mean forget how to use it, so you don't have to break your head and think outside the box, but you can do the math just fine, it's not that complicated,

if you don't understand Lorenzo's answer, I can try to answer you differently with little drawings and at home, just let me know.