points == pips? - page 5

 
angevoyageur:
Until we have broker who provides 6 digits
Thats a good point . . . lets hope it doesn't happen.   
 
RaptorUK:
Are there 4 digit Brokers for MT5 ?  if there are then you will have a different point there compared to 5 digit Brokers.  Point is the last digit,  but for 4 and 5 digit Brokers it is not the same.  

My definition for Pip returns the same for 4 and 5 digit Brokers, so im my opinion it is possible to define it better than point. 
If brokers are really relevant to define what is point in MQL5 it's better MQ change the function to Point(string broker) ;-)
 

I am struggling with pips definition long time too. Everybody seems to have it different. And at the top of that, each pair have different number of digits in quoted price and thus 1 pip virtually not exist. (It has different value in each pair). I think the only way how to utilize money value per price change is to force all brokers to make 5 digit price unified for ALL symbols. (incl. currency pairs, metals, stocks etc.). Brokers voluntarily do not do that, because they do not want to admit that they are stealing a lot of more. If they say "tight spreads", they actually mean we show you tight number (such as 30 in Gold), but in reality they are charging 30 only because they quiote 2 digits. The real spread is 3000 points or so. I made it for myself a spreadheet to try overcome this mess. In reality, my broker have in some pairs 5 digit, some other pairs 4 digit, some other pairs 3 digits, and some even 2 digit. When I figure it out and write it to paper for myself, I found, that if I add desired amount of zeros, I make unified price and thus unified money value for example for 1000 points on any of about 200 pairs.

The think is that brokers are charging spreads, swaps, and commission fees, on the top of this mess. But if price value would be always 5 digit, you will know exactly how much money you make for 1000 points irrespectively of which symbol you are going to trade.

Guys. Tell me. Is this absolutelly crazy idea? or is it feasible? Could be this a solution? for issue how to know precisely "how much money for price change across every existing symbol you get".

 
any comment on my previous post?
 
Vorobyov:
any comment on my previous post?
In my opinion, a pip standard definition is not a solution for nothing, anyway I don't see your idea as a crazy one, as you stated, it's just another vision. 
For me it is not necessary such standard because any broker or platform can name pips as desired to their customers, if they want, is just a convention and/or agreement, if it's the case of some internal rule.
 

Hi All,

I'm Not familiar with programming.

Is There any method to calculate point values? 4 digit broker and 5 digit broker, I wrote Program like this is it correct? ( i don't want to deal with pips...LoL)

when i want put 100 Take Profit i wrote like this, but it makes Error 130 always

double calcPrice;

calcPrice= Ask+(100*Point()) ;///<<<<------ actually market at the ask price( Or when i was Modify Order >> OrderOpenPrice();    )

1.Is this method correct for 4 digit broker and 5 digit broker????

2.Is there any other methods can use for all those requirement 

3.Any one can help example,  OrderSend  without this digit case errors


Any Comment will appreciated..

Thanks

 

73398956Aipl: when i want put 100 Take Profit i wrote like this, but it makes Error 130 always

calcPrice= Ask+(100*Point()) ;///<<<<------ actually market at the ask price( Or when i was Modify Order >> OrderOpenPrice();    )

1.Is this method correct for 4 digit broker and 5 digit broker????

  1. You want a 100 what? Your code generates 100 points. If you want 100 PIPs, the value will be wrong on a 5 digit broker. If you want 10 PIPs, the value will be wrong on a 4 digit broker.
  2. Your code breaks if you switch brokers 4/5 and you don't adjust the value. It breaks if you switch servers when the broker offers both 4 and 5. It also breaks if the broker changes over the weekend to 5 digits as has happened. Do everything in PIPs and adjust (SL, TP, and slippage; for 4/5 digit brokers and for JPY pairs.)
  3. There is Tick, PIP, and Point. They are all different in general. A tick is the smallest change of price. A Point is the least significant digit quoted. In currencies a pip is defined as 0.00010 (or for JPY 0.010)

    On a 4 digit broker a point (0.0001) = pip (0.0001). [JPY 0.01 == 0.01] On a 5 digit broker a point (0.00001) = 1/10 pip (0.00010/10). Just because you quote an extra digit doesn't change the value of a pip. (0.0001 == 0.00010) EAs must adjust pips to points (for mq4.) In currencies a tick is a point. Price can change by least significant digit (1.23456 -> 1.23457)

    In metals a Tick is still the smallest change but is larger than a point. If price can change from 123.25 to 123.50, you have a TickSize of 0.25 and a point of 0.01. Pip has no meaning.

    This is why you don't use TickValue by itself. Only as a ratio with TickSize. See DeltaValuePerLot()

 
Vorobyov:
any comment on my previous post?

From my viewpoint there exists not fix definition! It's like in a kindergarten, every broker does what he wants! I recently stumbled on a three days swap - which normally applies to weekends - which is raised on Wednesdays, not on Fridays!

So for me:

  • a point is that what you get from the broker (=> _Point) and
  • a pip is a difference of prices which has a value of ~10.-$ on a $-account, or 10 € on a €--account for one lot (it my technical definition!!).

That means if a stop is placed 10 pips below the entry I will risk ~100 € on my €-account no matter what symbol I am trading! No matter how many digits a point has or how big is the lot size,...

Rather than to despair take it as a chance that there is no fix definition as you as well can define things the way you like!!

This is how I do it:

bool Pip10(string sym,int &dig,double &pip,int &digis,double &pt,double refValue=10.0, const string from="") {
   // use: if (!Pip10(sym, DIG, PIP, DIGIS, PNT)){ ...
   pt             = SymbolInfoDouble(sym,SYMBOL_POINT);
   digis          = (int)SymbolInfoInteger(sym,SYMBOL_DIGITS);
   
   int      xp    = digis+1, XP = 0, n=200;
   double   tV    = SymbolInfoDouble(sym,SYMBOL_TRADE_TICK_VALUE ),  //MarketInfo(sym,MODE_TICKVALUE),///
            tS    = SymbolInfoDouble(sym,SYMBOL_TRADE_TICK_SIZE ),  //MarketInfo(sym,MODE_TICKSIZE),
            mL    = SymbolInfoDouble(sym,SYMBOL_VOLUME_MIN ),  //MarketInfo(sym,MODE_MINLOT),
            lV    = ( tS*tV == 0.0 ) ? 0.0 : tV/tS, // LotValue
            //pV    = mL*lV,
            //TV    = mL*tV, // tgt*MinLot*lV => n* MinLot * tV
            M,P1,P2, D1,D2,
            minD = 9999999999999.9,  minD2 = 9999999999999.9;
   while (lV < 0.00000000000001 && n-->0 && MQLInfoInteger( MQL_PROGRAM_TYPE ) != PROGRAM_INDICATOR) { // ~4sec in total
      Sleep(20); // try it for 10 sec, wait to get data
      pt    = SymbolInfoDouble(sym,SYMBOL_POINT);
      digis = (int)SymbolInfoInteger(sym,SYMBOL_DIGITS);
      xp    = digis+1;
      tV    = SymbolInfoDouble(sym,SYMBOL_TRADE_TICK_VALUE );  //MarketInfo(sym,MODE_TICKVALUE),///
      tS    = SymbolInfoDouble(sym,SYMBOL_TRADE_TICK_SIZE );  //MarketInfo(sym,MODE_TICKSIZE),
      mL    = SymbolInfoDouble(sym,SYMBOL_VOLUME_MIN );  //MarketInfo(sym,MODE_MINLOT),
      lV    = ( tS*tV == 0.0 ) ? 0.0 : tV/tS; // LotValue
   }
   if ( lV < 0.00000000000001 ) { Alert(sym," is NOT aivailable (yet?), called from ",from,"  err: ",err(_LastError)); pip=0.0; dig=-99; return(false); } // No connection yet
   //Print("ini Pip10(",sym,"..,ref:",DoubleToStr(refValue,2),")  Digits: ",digis," TickVal: ",DoubleToStr(tiV,2));
   while(xp>-9) {

      M  = pow(10,xp);
      P2 = M*lV*2.0;
      P1 = M*lV;
      D1 = fabs(P1-refValue);
      D2 = fabs(P2-refValue);
      
      if ( D2 > minD2 && minD > minD2 ) {
         dig = -XP;
         pip = pow(10,-dig)*2.0;
         if ( pip < tS) { Alert(sym,": PIP(",DoubleToString(pip,digis),") is SMALLER than Ticksize(",DoubleToString(tS,digis),") "); pip=0.0; dig=-99; return(false); }
         return(true);
      }

      if ( D1 > minD && minD2 > minD ) {
         dig = -XP;
         pip = pow(10,-dig);
         if ( pip < tS) { Alert(sym,": PIP(",DoubleToString(pip,digis),") is SMALLER than Ticksize(",DoubleToString(tS,digis),") "); pip=0.0; dig=-99; return(false); }
         return(true);
      }
      minD2 = D2;
      minD  = D1;
      XP = xp;
      xp--;

   }
   pip=0.0; dig=-99;
   Comment(sym," is NOT aivailable (yet?)");
   return(false); // not set :()
}
 
Carl Schreiber:

From my viewpoint there exists not fix definition! It's like in a kindergarten, every broker does what he wants! I recently stumbled on a three days swap - which normally applies to weekends - which is raised on Wednesdays, not on Fridays!


It's something usual to apply three-days swap on Wednesday.

You can check it with :

SymbolInfoInteger(symbol,SYMBOL_SWAP_ROLLOVER3DAYS)
 
Alain Verleyen:

It's something usual to apply three-days swap on Wednesday.

You can check it with :

To me it's a sleight of hand!
Reason: