I am trying to get the pip difference between the higher and lower bollinger bands in my code. I am using the following code for this.
double bb_diff = (bolinger_upper_band - bolinger_lower_band);
If my upper bb = 1.1588533 and lower bb = 1.1528046 then the difference comes as 0.0060486
I want to convert this into pips. The pip value for the above is 60. I would like to know how to do this based on the currency pair. Don't want to hard code it into different pairs. Any help is appreciated.
Following is a screen shot of the BB values.
Thanks for the response. But I didn't understand this function. Help says "Returns the corresponding property of a specified symbol"
It gives me the same result as the function MarketInfo(Symbol(),MODE_TICKSIZE)
You need to divide the bb_diff by the Point value.
double bb_diff_pips = NormalizeDouble(bb_diff / Point, 2);