Thread: Ask!
View Single Post
  #1412 (permalink)  
Old 12-04-2008, 06:36 AM
increase's Avatar
increase increase is offline
Senior Member
 
Join Date: May 2006
Posts: 845
increase is on a distinguished road
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 Here
You can also get my Hot Forex System (scroll to the bottom of the page): Click Here
Reply With Quote