Thread: How to code?
View Single Post
  #881 (permalink)  
Old 05-08-2008, 09:42 PM
denis68 denis68 is offline
Junior Member
 
Join Date: Apr 2008
Posts: 11
denis68 is on a distinguished road
change ind in a EA

i would like to change the indicator in a EA i have,but i don't know how to do it
i am not a programmer in fact don't much about this kind kind of thing, below is the only part that relates to the indicator i want to change the DiMA to MFA(14)
i want to buy @ >60 and sell@<40

double diClose0=iClose(NULL,5,0);
double diMA1=iMA(NULL,5,7,0,MODE_SMA,PRICE_OPEN,0);
double diClose2=iClose(NULL,5,0);
double diMA3=iMA(NULL,5,6,0,MODE_SMA,PRICE_OPEN,0);

if(AccountFreeMargin()<(1000*Lots)){
Print("We have no money. Free Margin = ", AccountFreeMargin());
return(0);
}
if (!ExistPositions()){

if ((diClose0<diMA1)){
OpenBuy();
return(0);
}

if ((diClose2>diMA3)){
OpenSell();
return(0);
}
}
could someone please help me
denis
Reply With Quote