PIPS are killing me - page 2

 
Drazen Penic #: In your example lot size/contract size is 100oz. I saw brokers where contract size for gold is 1 oz. and 10  oz. Plus, there are brokers with two or three decimals for gold. So "how many brokers and other institutions and websites, have adopted the "pip" term for several other symbols" means - each broker can come with it's own definition of "pip" for any instrument beside forex. Forex pip value is the same for all brokers, pip value calculation for other instruments is broker dependent. I don't understand why people still use pips even for forex, since most of the brokers switched to odd number of decimals.  Using point removes the need to verify pip definitions for your broker and also removes related pip-point conversions from your code.

Yes, it is true that "pips" is mostly used by us "humans" when talking to one another, because even after brokers started moving over to an extra digit, we "humans" still needed a way to speak the same language.

In terms of software, using "points", does make more sense, but if you really want to speak a universal language that works for ALL symbols, be it for humans or for machines, then there is only one unit to "rule them all" ...

— that is the humble "tick" used since the very beginning. This is in fact, the best unit measure one should use "under the hood" in all MetaTrader code to guarantee exact and accurate changes in price quotes.

However, we humans are sticklers for complicating things due to emotional attachment, so the adorable "pip" will probably be around for a very long time.

 
Keith Watford #: I have to disagree with you here. People may use the term "Pips" for non-forex instruments but there are no universally accepted values for non-forex "pip size". I would consider 1 "pip" in gold to be 0.1, not 0.01. This is because with gold and 100 contract size 1 lot, a 0.1 move equates to $10, whereas  a 0.01 move is $1. It would be better if the term "pip" had never existed. Makes it less confusing if everyone used Point. Even MT4/5 mixes them up and uses "pips" where it should be Points.

Yes, you have a point! I am not really attached to "pips" to be honest, but I don't mind its use whether used correctly or incorrectly. As long as the communication between people can flow and be understood by all parties, I don't mind.

Personally I prefer using "ticks" or just the price value itself.

 
Fernando Carreiro #:

Yes, you have a point! I am not really attached to "pips" to be honest, but I don't mind its use whether used correctly or incorrectly. As long as the communication between people can flow and be understood by all parties, I don't mind.

Personally I prefer using "ticks" or just the price value itself.


Just to add in some more confusion. Isn't a tick considered the smallest price change on a symbol with respect to the symbols tick size, while point in fact is the smallest unit in the least significant digit with respect to the digits of a symbol?


 
Always calculate in points then you have no problem 
 

Pip is an acronym for 'percentage in point', so it's all a personal interpretation and not an accurate way of expressing the price change of an instrument.

So 100 pips should be the equivalent of 1% price change on any symbol, which makes this definition very rough in most cases.

The price move from $1800.21 to $1802.21 is about 0.1%, which is 10 pips and that makes all our answers incorrect...

Fernando is right though, when you think it from the instrument's specifications point of view, pips are hundredths of the price.
 
Dominik Christian Egert #: Just to add in some more confusion. Isn't a tick considered the smallest price change on a symbol with respect to the symbols tick size, while point in fact is the smallest unit in the least significant digit with respect to the digits of a symbol?

Yes, that is correct. Tick = smallest change in price, point = smallest unit in decimal digits.

 

the discussion here reflects what i faced 

so when converting price to pips i can either use 1pip=0.1 or 1pip = 0.01 and both will be correct ?

so there is not universal formula I can code in my EA to handle pips for all currencies ? 

 
max s #: the discussion here reflects what i faced. so when converting price to pips i can either use 1pip=0.1 or 1pip = 0.01 and both will be correct ? so there is not universal formula I can code in my EA to handle pips for all currencies ? 

As several of the posters suggested, instead of "pips", just use "points" and you will have less trouble.

In the code, however, consider using "ticks", given that the contract specification already conveniently supplies the "tick size" and the "tick value", and does not supply "point value" nor "pip value".

However, you can still use "points" in the EA, because you can easily calculate from the contract specification the "point value".

Forum on trading, automated trading systems and testing trading strategies

Symbol Point Value

Fernando Carreiro, 2022.05.18 21:05

double
   dbTickSize   = SymbolInfoDouble( _symbol, SYMBOL_TRADE_TICK_SIZE  ), // Tick size
   dbTickValue  = SymbolInfoDouble( _symbol, SYMBOL_TRADE_TICK_VALUE ), // Tick value
   dbPointSize  = SymbolInfoDouble( _symbol, SYMBOL_POINT ),            // Point size
   dbPointValue = dbTickValue * dbPointSize / dbTickSize;               // Point value
Remember, it's best to use tick size and tick value in your calculations, instead of point size and its value.


Alternatively, just use the OrderCalcProfit function to calculate the Risk and Rewards of an order or position, or the order volume.

Forum on trading, automated trading systems and testing trading strategies

SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_VALUE) sometimes zero

Fernando Carreiro, 2022.08.23 17:41

You can! These are the steps I take. I supply the function with a lot size equal to the “Max Lot Size” allowed for the symbol in question, then calculate the ratio needed to achieve the fractional risk that I wish to apply, to get the correct volume for the order. I then align that with the “Lot Step” and finally check it against both the maximum and minimum allowed lots for the symbol.

The reason I use the “maximum” lots instead of just “1.0” lots as a reference value is because there is no guarantee that the value of 1.0 is within the minimum and maximum values allowed. Given that using 1.0, or the maximum, gives equivalent results anyway (by using the ratio method), I choose to use the “max lots” as the reference point which also offers the most precision for the calculation.

Something like this ...

// This code will not compile. It is only a example reference

if( OrderCalcProfit( eOrderType, _Symbol, dbLotsMax, dbPriceOpen, dbPriceStopLoss, dbProfit ) )
{
   dbOrderLots = fmin( fmax( round( dbRiskMax * dbLotsMax / ( -dbProfit * dbLotsStep ) )
               * dbLotsStep, dbLotsMin ), dbLotsMax ); 
      
   // the rest of the code ...
};
 

These trading platforms should all have an automatic calculator by now  and included in all trading platforms ,

that shows the dollar amount of margin used per entry


Does MT 4 or 5 have a way to see how much margin is being used when place an order

and what % of your account is being utilized

Also,  if use a STOP order -- what is the dollar amount and % risked of account to the STOP price

 
traderpete11 #: These trading platforms should all have an automatic calculator by now, that shows the dollar amount of margin used per entry and more important if you place a STOP it will show the dollar amount of the loss and % of account that would be lost if STOP is triggered ....

Strategies and a user's personal way of trading can differ from person to person. Enforcing your way of thinking on others is not ideal. MetaTrader offers the MQL language as a way to tailor and adapt it to your own personal preferences and way of trading.  There are already many such "trading panel" and "trading assistant" EAs available in the CodeBase and in the Market that do what you describe. So, you can easily use those tools instead.