I don't know what he wants.
- The fractional part is not a 'pip value' The entire price (except for the extra 3/5 digit) is.
- 'a digit' is not a 'pip value'
Sorry for the confusion, what I am actually hoping to find out is when the price (Bid) value crosses over the 500 or 000 in a currency.
For example: GBP/USD is at 1.56352 and crosses above 1.56500 or below 1.56000
In summary, I am only wanting to track the last 3 digits
Sorry for the confusion, what I am actually hoping to find out is when the price (Bid) value crosses over the 500 or 000 in a currency.
For example: GBP/USD is at 1.56352 and crosses above 1.56500 or below 1.56000
In summary, I am only wanting to track the last 3 digits
The price of GBPUSD can't be at 1.56352 AND be above 1.5650 or below 1.5600 . . . at some point you need to remember the 1.56352 figure . .
So something like . . .
double RememberedBid; if( ( Bid * 100 ) > MathFloor( RememberedBid * 100 ) + 0.5 ) // above 1.56500 if( ( Bid * 100 ) < MathFloor( RememberedBid * 100 ) ) // below 1.56000
Hi 7640,
You have to create UDF for that, an UDF to extract last 3 digits. Use DoubleToString(), StringTrimLeft(), and back to StrToDouble() (Those are links, please click)
That's what I can think of.
GBP/USD is at 1.56352
To get value 1.56000 or 1.56500
double Pipslevels = 50 * pips2dbl; //50 pips pips2dbl correction 4/5 digit brokers define it ..... way of WHRoeder //Level Lower Bid 1.56000 double LowerValue = MathFloor( Bid / Pipslevels) * Pipslevels; //Level Higher Bid 1.56500 double HigherValue = MathCeil( Bid / Pipslevels) * Pipslevels;
Think this is the way.... am i correct ??
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I need to get the actual pip value of a digit after a decimal place. Is there a function I need to use?