Download MetaTrader 5

Question about my first ea. Why doesnt it work ?

To add comments, please log in or register

Hello Community


In the attached file you find my very first ea with the indicator. Although the compiler doesnt see any errors it doesnt work on backtesting. Can you tell me whats wrong...?


Thanks a lot



Yerlan Imangeldinov
Yerlan Imangeldinov  
Try to find why doesn't work. Usually i use Alert(); for understand output from the functions, variables, e t.c. 
akuh: it doesnt work on backtesting.
  1. "Doesn't work" is meaningless - just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires - meaningless. There are no mind readers here.
  2. Ticket = OrderSend ( Symbol(), OP_BUY, Lots, Ask, Slippage, Ask - ( StopLoss * Point ), Ask + ( TakeProfit * Point ), NULL, 0, 0, Green);
    Check your return codes and find out why. What are Function return values ? How do I use them ? - MQL4 forum and Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles
  3. Your indicator
    if (i==hhb) b1[i]=High[hhb]+iATR(NULL,0,10,i)*arrowPosition;
    if (i==llb) b2[i]=Low[llb] -iATR(NULL,0,10,i)*arrowPosition;
    Your EA
    int close() { // Close is executed when script find opened order on current symbol
      double ArrowUp = iCustom(NULL,0,"supersignals",0,1);
    double ArrowDown = iCustom(NULL,0,"supersignals",1,1);
             if ( ArrowDown == 1 ) {
    When do you expect a price (1.05678) +/- fraction of ATR (0.0123) to be exactly 1.0000000000?
To add comments, please log in or register