Point, revisited - page 2

 
  1. That is also why you do NOT use TickValue by itself.
  2. That is also why you must normalize PRICE for pending orders.
double DeltaValuePerLot(string pair=""){
   if(pair == "") pair = Symbol();
   //{Value in account currency of a Point of Symbol.
   // In tester I had a sale: open=1.35883 close=1.35736 (0.0147)
   // gain$=97.32/6.62 lots/147 points=$0.10/point    or $1.00/pip.
   // IBFX demo/mini       EURUSD TICKVALUE=0.1 MAXLOT=50 LOTSIZE=10,000
   // IBFX demo/standard   EURUSD TICKVALUE=1.0 MAXLOT=50 LOTSIZE=100,000
   //                      $1.00/point    or $10.0/pip.
   //
   // https://www.mql5.com/en/forum/127584 CB: MODE_TICKSIZE will usually return the same
   // value as MODE_POINT (or Point for the current symbol), however, an example
   // of where to use MODE_TICKSIZE would be as part of a ratio with
   // MODE_TICKVALUE when performing money management calculations which need to
   // take account of the pair and the account currency. The reason I use this
   // ratio is that although TV and TS may constantly be returned as something
   // like 7.00 and 0.0001 respectively, I've seen this (intermittently) change
   // to 14.00 and 0.0002 respectively (just example tick values to illustrate).
   // https://www.mql5.com/en/forum/135345 zzuegg reports for non-currency DE30:
   // MarketInfo(pair,MODE_TICKSIZE) returns 0.5
   // MarketInfo(pair,MODE_DIGITS)   return 1
   // Point    = 0.1
   // Prices to open must be a multiple of ticksize
   //}
   return( MarketInfo(pair, MODE_TICKVALUE)
         / MarketInfo(pair, MODE_TICKSIZE) ); // Not Point.
}
double NormalizePrice(double p, string pair=""){
    // https://forum.mql4.com/43064#515262 zzuegg reports for non-currency DE30:
    // MarketInfo(market.pair,MODE_TICKSIZE) returns 0.5
    // MarketInfo(market.pair,MODE_DIGITS) return 1
    // Point = 0.1
    // Prices to open must be a multiple of ticksize
    if (pair == "") pair = Symbol();
    double ts = MarketInfo(pair, MODE_TICKSIZE)
    return( MathRound(p / ts) * ts );
}
double NormalizeLots(double lots, string pair=""){
    if (pair == "") pair = Symbol();
    double  lotStep     = MarketInfo(pair, MODE_LOTSTEP),
            minLot      = MarketInfo(pair, MODE_MINLOT);
    lots            = MathRound(lots / ls) * ls;
    if (lots < minLot) lots = 0;    // or minLot
    return(lots);
}
 
RaptorUK:
MODE_TICKSIZE17Tick size in points.

 

Nope . . . as I said . . 


 

You can see here that point is 0.1  but the smallest increment that price moves by is 0.5 which is TickSize 


Ah, now I know! Thanks :D 

 
WHRoeder:
  1. That is also why you do NOT use TickValue by itself.
  2. That is also why you must normalize PRICE for pending orders.


very useful, thanks :]
 
WHRoeder:
No he is not. Doesn't matter whether the broker is 4 digits or 5 digits. A pip is a pip. 0.0001 is one pip (1 point) 0.00010 is also one pip (10 points) Is 0.0001 not equal to 0.00010?


obviously he was wrong, he wrote that "this is a 4-digit broker where the spread is 2 pips or 20 points ". Why are you arguing about that ? On a 4-digit broker 2 pips is 2 points and not 20 points. Point.

A pip is a pip but a point isn't a point, on a 4-digit broker a point is 0.0001, on a 5-digit broker a point is 0.00001. If it "doesn't matter whether the broker is 4 digits or 5 digits" then what you wrote is a non sense : 1 point=10 point is absurd.

 
RaptorUK:
MODE_TICKVALUE is the value of a point in the deposit currency.  The smallest increment in change of price is MODE_TICKSIZE . . .  for example take a look at some of the indices.

This is not true TICKVALUE is the value of a tick, not of a point.
 
angevoyageur:
This is not true TICKVALUE is the value of a tick, not of a point.
  yes you are correct.  Good job this wasn't made convoluted or we would all be in trouble . . .
 

Ahh, I tried to some summarising to finally clear things up but I can't get the wording right and still be simple and understandable! haha, why is it so hard?

 
And what is a tick? :)))))))))
 
ubzen:
And what is a tick? :)))))))))
It's the noise a clock makes . . .    or is that a tock ?
 
ubzen:
And what is a tick? :)))))))))
I know you know but in case someone read this topic : what is a tick ?
Reason: