How can I define....

 

HI All,

Need some help here, I am tring to make an EA based on Bollinger Squeeze. I know it has to be defined as iCustom but I dont know how...can you please help me how can I define the Blue and Red Colour histogram in the iCustom...

Thanks

Babar

 

there is a simpler way to do this if you're just importing into an ea, under your variable begin, put this simple string of code

bool bband = iBands(Null,0,14,2,3,PRICE_CLOSE,1,1);

theres a lot of numbers to explain here, to begin with, null and "0" say, current chart and timeframe. 14 is the period, 2 is the deveation, 3 is how far the bands shift apart, price close says the lines are applied to the close, the first 1 means that it is exponential, and the last 1 means that you start the whole thing 1 bar back. (meaning it doesn't include the current bar, if you want it to be based on the bollinger bands while they are moving, change this number to "0")

it's that simple

 

Thanks for your help eaglehawk, but I want expression based on the indicator attached which are blue and red histogram bars...I wonder if you can help ..

Thanks

Babar

 

sorry for the long reply, i've studied the indicator and it seems to be a histogram of the difference between the top band and the bottom one. i am not very skilled with indicators or reading them , so i can't quite tell how whoever made this defined the distance. if i had that curcial bit of information, i would be of much more assistance to you.

 
Eaglehawk:
sorry for the long reply, i've studied the indicator and it seems to be a histogram of the difference between the top band and the bottom one. i am not very skilled with indicators or reading them , so i can't quite tell how whoever made this defined the distance. if i had that curcial bit of information, i would be of much more assistance to you.

Is there anyone(programmer) who can help me making this EA or atleast give me an idea of how can I define the red and blue histogram in the EA

Thanks in advance

 

You can access this indicator from an EA by using the iCustom call.

double blueB = iCustom( NULL, 0, "iBollinger Squeeze v4", totalBars, bolProd, bolDev, keltPrd, keltFactor, momPrd, alertBox, audioAlert, 0, shift );

double redB= iCustom( NULL, 0, "iBollinger Squeeze v4", totalBars, bolProd, bolDev, keltPrd, keltFactor, momPrd, alertBox, audioAlert, 1, shift );

All the fields after the name of the indicator are the input parameters for the indicator, except for the last two. The 0 and the 1 tell which part to return, and shift, of course, is the baryou want to access

 
4xCoder:
You can access this indicator from an EA by using the iCustom call.

double blueB = iCustom( NULL, 0, "iBollinger Squeeze v4", totalBars, bolProd, bolDev, keltPrd, keltFactor, momPrd, alertBox, audioAlert, 0, shift );

double redB= iCustom( NULL, 0, "iBollinger Squeeze v4", totalBars, bolProd, bolDev, keltPrd, keltFactor, momPrd, alertBox, audioAlert, 1, shift );

All the fields after the name of the indicator are the input parameters for the indicator, except for the last two. The 0 and the 1 tell which part to return, and shift, of course, is the baryou want to access

Thanks 4xcoder for you help ..its working now...just wondering can you please help me i am stuck in something new and difficult....please click on the link you will get all the details

https://www.mql5.com/en/forum/175274

thanks in advance

Reason: