Download MetaTrader 5
To add comments, please log in or register
Download MetaTrader 5 mobile version and trade from anywhere in the world!
MeVsRacoon
39
MeVsRacoon 2014.01.18 10:45 

Hi All,

I try to make and execute the EA my own but, there are compiling warnings.

There is code of EA below that I made and I need some help to execute this EA.

If you have any recommendation that will be great for me.

Additionally, I also would like to add up for this EA, when it opens position then close it when it gets opposite order ex) 1 buy order, 5mins later, getting sell order then close the buy order and make a sell order, and so on. But should ignore the same order.

I really appreciate that if someone help this!!

extern double  E_U, E_D, b,U,D,Highbid,Lowbid,So;  // Declare the characters

//+------------------------------------------------------------------+

//| expert start function                                            |

//+------------------------------------------------------------------+

int start()

  {

  int MA_Period=20;                               // Mean value of certain period.

  {

  Highbid = iHigh(Symbol(), PERIOD_H1, 2);       // Highest value of certain period 

  Lowbid = iLow(Symbol(), PERIOD_H1, 2);         // Lowest value of certain period 

  b=(Highbid/Lowbid);                      // Change % between Highest and Lowest value
  
  U=1.2                             //
  
  D=1.1                                     //

  So=iClose(Symbol(), PERIOD_H1,1) ;             // Last price for binomial upper and lower bound

double  E_U=Up(So,U);

double  E_D=Down(So,D);

 

  return;

  }

}    

  //+------------------------------------------------------------------+

 double Upper(double So, double U)

 {

 double E_U=So*U;

 return(E_U);

 }

  double Lower(double So, double D)

  {

  double E_D=So*D;

  return(E_D);

  }

 //+------------------------------------------------------------------+

 int ticket;

   

if (E_U< Bid)         // 

    {  

 ticket=OrderSend(Symbol(),OP_SELL,1,Bid,1,0,0,"Take a Short position",Red);                                      //

   return;   

   }

   if (E_D > Ask)         // 

    {                                        // 

   ticket=OrderSend(Symbol(),OP_BUY,1,Ask,1,0,0,"Take a Long position",Blue); 

   return;

   }



 //--------------------------------------------------+
Keith Watford
Moderator
9543
Keith Watford 2014.01.18 12:31  
You get warnings when you try to compile your code. The warnings help you to improve your code and it is useful information. If you actually shared this information, you may get some help.
Simon Gniadkowski
Moderator
17994
Simon Gniadkowski 2014.01.18 13:10  
MeVsRacoon:

Hi All,

I try to make and execute the EA my own but, there are compiling warnings.

There is code of EA below that I made and I need some help to execute this EA.

If you have any recommendation that will be great for me.

Additionally, I also would like to add up for this EA, when it opens position then close it when it gets opposite order ex) 1 buy order, 5mins later, getting sell order then close the buy order and make a sell order, and so on. But should ignore the same order.

I really appreciate that if someone help this!!

Do this, you will need it: What are Function return values ? How do I use them ?
MeVsRacoon
39
MeVsRacoon 2014.01.30 11:15  
Thanks for your comments, guys.
/
To add comments, please log in or register