|
Can someone help please with this
I have an EA and I want to access 2 lines from an indicator within the EA the lines in the indicator are.
expression 1
if(iMA(NULL,0,Period(),1,MODE_SMA,PRICE_HIGH,i) > zigzag1 && iMA(NULL,0,Period(),1,MODE_SMA,PRICE_HIGH,i) != 0 && iMA(NULL,0,Period(),1,MODE_SMA,PRICE_HIGH,i) != EMPTY_VALUE) ExtMapBuffer2[i]=iMA(NULL,0,Period(),1,MODE_SMA,PRICE_HIGH,i); else ExtMapBuffer2[i] = 0.0;;
expression 2
if(iMA(NULL,0,Period(),1,MODE_SMA,PRICE_LOW,i) < zigzag1 && iMA(NULL,0,Period(),1,MODE_SMA,PRICE_LOW,i) != 0 && iMA(NULL,0,Period(),1,MODE_SMA,PRICE_LOW,i) != EMPTY_VALUE) ExtMapBuffer1[i]=iMA(NULL,0,Period(),1,MODE_SMA,PRICE_LOW,i); else ExtMapBuffer1[i] = 0.0;
I want to say in the EA
when expression 1 is true Buy & close sell if open
when expression 2 is true sell & close Buy if open
How can I do this?
__________________
New to Forex? Get all you need for Free at my site Click HereYou can also get my Hot Forex System (scroll to the bottom of the page): Click Here
|