Guys what does it mean....

 

Hi Guys can you please explain what does this line mean.....

specilly the 2 and 1 in the brackets..

iCustom(NULL,TimeFrame,"Heiken Ashi",2,1)

Thanks

Babar

 
babarmughal:
Hi Guys can you please explain what does this line mean.....

specilly the 2 and 1 in the brackets..

iCustom(NULL,TimeFrame,"Heiken Ashi",2,1)

Thanks

Babar

the last number is always the bar shift. 0 is the current bar and 1 is the bar before it.

the 2nd parameter from the left (in your example is 2) is the custom indicator index. Every indicator have buffers where the data is saved, so 2 is the 3rd buffer (zero base).

you can see in the code what indicator buffer value you want by looking at that line of code

SetIndexBuffer(0,ExtMapBuffer1);

SetIndexBuffer(1,ExtMapBuffer2);

so, if you want the value of ExtMapBuffer2 you set the iCustom parameter to 1

 

HI,

Thanks for your reply....what I am trying to do is that EA should place the buy order when Heiken Ashi is white and sell when its red....how can I do that...

Thanks for your help...

Thanks

Babar

Reason: