The answer is Yes for about 98% of the indicators that end with .ex4. What you have to test is the buffers using the iCustom statement in your ea such as:
double PM1=0, PM1_1=0, PM1_2=0, PM2=0, PM2_1=0, PM2_2=0; //Initializes variable names
PM1=iCustom(NULL,0,"Price Channel",0,0); // Buffer 0, Shift 0 // Note: The Indicator Name (ex. "Price Channel") has to match the file name of the indicator - Case sensitive!
PM1_1=iCustom(NULL,0,"Price Channel",0,1); // Buffer 0, Shift 1 (1-Back)
PM1_2=iCustom(NULL,0,"Price Channel",0,2); // Buffer 0, Shift 2 (2-Back)
PM2=iCustom(NULL,0,"Price Channel",1,0); // Buffer 1, Shift 0
PM2_1=iCustom(NULL,0,"Price Channel",1,1); // Buffer 1, Shift 1 (1-Back)
PM2_2=iCustom(NULL,0,"Price Channel",1,2); // Buffer 1, Shift 2 (2-Back)
//Sample logic code to buy!
if(PM1>PM2 && PM1_1<PM2_1)
{
OpenBuy=1;
}
Continue code of program!
You can change the PM1, PM2 etc. variable to whatever you want to call it.
You will either have to use a comment statement referencing PM1, or a print statement referencing PM1, or use Control-D which opens up a data window on the left side of the graph and may tell you the current indicator buffer values of the current bar.
P.S. You may identify the amount of buffers used in the indicator by the amount of colors it shows in the indicator setup box when you select it from the indicator list by right clicking the mouse after the indicator is on the graph (4 colors = 4 buffers in the indicator). If there are only 2 colors listed, than buffer 0 will be 'Up' direction, and buffer 1 will be 'Down' direction value of the indicator on the current bar.
If you have any other questions, just ask. I hope this helps!
Dave
<><<<
Last edited by Dave137; 06-20-2008 at 04:11 AM.
|