EA with price across Ashi

Results 1 to 1 of 1
 1 Attachment(s)    

Thread: EA with price across Ashi

  1. #1

    Default EA with price across Ashi

    Hello guys,
    can someone help me? I uploaded a picture with the explanation of what I would do. But the result is not like in a manual trading.

    The code of signal is:

    //|---------main signal

    double HAOpenPrevious=iCustom(Symbol(),60,"Heiken_Ashi_Sm oothed",MaMetod,MaPeriod,MaMetod2,MaPeriod2,2,i+1) ;
    double HAClosePrevious=iCustom(Symbol(),60,"Heiken_Ashi_S moothed",MaMetod,MaPeriod,MaMetod2,MaPeriod2,3,i+1 );
    double HAOpenActual=iCustom(Symbol(),60,"Heiken_Ashi_Smoo thed",MaMetod,MaPeriod,MaMetod2,MaPeriod2,2,i);
    double HACloseActual=iCustom(Symbol(),60,"Heiken_Ashi_Smo othed",MaMetod,MaPeriod,MaMetod2,MaPeriod2,3,i);

    double HAOpenH4Previous=iCustom(Symbol(),MATrendTimeFrame H4,"Heiken_Ashi_Smoothed",MaMetod,MaPeriod,MaMetod 2,MaPeriod2,2,i+1);
    double HACloseH4Previous=iCustom(Symbol(),MATrendTimeFram eH4,"Heiken_Ashi_Smoothed",MaMetod,MaPeriod,MaMeto d2,MaPeriod2,3,i+1);
    double HAOpenH4Actual = iCustom(Symbol(),MATrendTimeFrameH4,"Heiken_Ashi_S moothed",MaMetod,MaPeriod,MaMetod2,MaPeriod2,2,i);
    double HACloseH4Actual = iCustom(Symbol(),MATrendTimeFrameH4,"Heiken_Ashi_S moothed",MaMetod,MaPeriod,MaMetod2,MaPeriod2,3,i);

    if(HACloseH4Previous>HAOpenH4Previous&&HACloseH4Ac tual>HAOpenH4Actual)HATrendH4Filter="UP";
    if(HACloseH4Previous<HAOpenH4Previous&&HACloseH4Ac tual<HAOpenH4Actual)HATrendH4Filter="DOWN";

    double HAOpenD1Previous=iCustom(Symbol(),MATrendTimeFrame D1,"Heiken_Ashi_Smoothed",MaMetod,MaPeriod,MaMetod 2,MaPeriod2,2,i+1);
    double HACloseD1Previous=iCustom(Symbol(),MATrendTimeFram eD1,"Heiken_Ashi_Smoothed",MaMetod,MaPeriod,MaMeto d2,MaPeriod2,3,i+1);
    double HAOpenD1Actual = iCustom(Symbol(),MATrendTimeFrameD1,"Heiken_Ashi_S moothed",MaMetod,MaPeriod,MaMetod2,MaPeriod2,2,i);
    double HACloseD1Actual = iCustom(Symbol(),MATrendTimeFrameD1,"Heiken_Ashi_S moothed",MaMetod,MaPeriod,MaMetod2,MaPeriod2,3,i);


    if(HACloseD1Previous>HAOpenD1Previous&&HACloseD1Ac tual>HAOpenD1Actual)HATrendD1Filter="UP";
    if(HACloseD1Previous<HAOpenD1Previous&&HACloseD1Ac tual<HAOpenD1Actual)HATrendD1Filter="DOWN";

    string BUY="false";
    string SELL="false";

    if(Open[0]<HAOpenActual&&Close[0]>HACloseActual&&HATrendH4Filter=="UP"&&HATrendD1Fi lter=="UP")BUY="true";
    if(Open[0]>HACloseActual&&Close[0]<HAOpenActual&&HATrendH4Filter=="DOWN"&&HATrendD1F ilter=="DOWN")SELL="true";

    string SignalBUY="false";
    string SignalSELL="false";

    if(BUY=="true") SignalBUY="true";
    if(SELL=="true") SignalSELL="true";

    Where is the mistake?
    Thank you very much for your help.
    Davide
    Attached Files Attached Files

Similar Threads

  1. Heiken Ashi Indicator Explained – What are Heiken Ashi?
    By painofhell in forum Trading discussion
    Replies: 0
    Last Post: 12-21-2014, 22:16
  2. (Heiken Ashi+RSI) EA
    By kennedy in forum Ideas for expert advisors
    Replies: 3
    Last Post: 06-24-2011, 23:14
  3. Replies: 0
    Last Post: 09-14-2010, 13:14
  4. Renko Ashi System 2, Renko Ashi 20 pips + correlation
    By cmeldatrader in forum Ideas for expert advisors
    Replies: 9
    Last Post: 08-03-2010, 23:53
  5. Please try my Heiken Ashi + i-CAI EA
    By papaforex in forum Ideas for expert advisors
    Replies: 4
    Last Post: 10-09-2009, 05:52

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


EA with price across Ashi


GadgetVersus GadgetVersus France W3Ask W3Ask Brasil W3Ask Deutschland W3Ask España W3Ask France W3Ask Italia W3Ask Nederland