1-2-3 trading setup develop amibroker formula

Discussion in 'AmiBroker' started by rvlv, Jul 10, 2009.

  1. rvlv

    rvlv Active Member

    Joined:
    Jul 2, 2006
    Messages:
    445
    Likes Received:
    197
    Trophy Points:
    43
    Location:
    Hyderabad & Muscat,Oman
    Friends

    Read this pdf file

    1-2-3 set up is combined with fibonacci

    I request Ashutosh to do the afl coding if he gets time.
    advance thanks to him
    -------------
    Here is one afl of 1-2-3 using MACD
    Ok guys enjoy
    ---------------------------

    AFL

    =================


    //1-2-3 High OR Low from metastock
    // link http://www.meta-formula.com/Metastock-Formulas-A.html
    //http://www.tradejuice.com/forex/forex-1-2-3-methode-mm.htm

    //--------------------------
    // Uptrend 8 conditions defined AND This works best as a reversal pattern
    //1) identify a previous downtrend. )Wait for the MACD to Signal a Buy AND
    //3)for the 1-2-3 LONG set up to be in place.
    //4)As the market pulls back to point 3, the MACD should remain in
    //Buy mode OR just slightly dip into Sell.
    //5)Place a Buy entry order 1 tick above point 2
    //6)Place a stop loss order 1 tick below point 3
    //7)Measure the distance between point 2 AND 3 AND project that
    //forward for your exit.
    //8)Point 2, should NOT be lower than point 1 for 1-2-3 longsetup.

    //-------------------------------------
    //1-2-3 SHORTSETUP
    //Downtrend 8 CONDITIONS to be met.
    //1) Identify a previous UPtrend. 2)Wait for the MACD to Signal a Sell AND
    //3)for the 1-2-3 SHORTset up to be in place.
    //4)As the market pulls back UP to point 3, the MACD should remain in
    //Sell mode OR just slightly dip into Buy.
    //5)Place a Sell entry order 1 tick BELOW point 2
    //6)Place a stop loss order 1 tick ABOVE point 3
    //7)Measure the distance between point 2 AND 3 AND project that
    //forward DOWN for your exit.
    //8)Point 2, should NOT be HIGHER than point 1 for 1-2-3 SHORTsetup.
    //--------------------------

    S3 = C;
    s4=TimeNum();
    radius = 0.45 * Status("pxheight");
    textoffset = 2.2 * radius;
    GfxSelectFont("Tahoma", 12 );
    GfxSetTextColor( colorBlue );
    GfxTextOut(Date() ,textoffset +80,5 );
    GfxSetTextColor( colorBlue );
    GfxTextOut( "1 2 3 macd Close =" + s3, textoffset + 100, 30 );
    GfxTextOut( "ADX(10) " + ADX(10), textoffset + 130, 70 );
    GfxTextOut( "MACD() " + MACD(), textoffset + 130, 50 );
    SetChartBkColor(50);//LIGHT YELLOW
    //1-2-3 High OR Low
    //Low
    Mxl=MA(L,4);
    xx=L > Ref(L,-1) AND L>Mxl AND
    Ref(L,-1) < Ref(Mxl,-1) AND
    LLV(L,5 ) > LLV(L,10 ) AND MACD()<0;
    //High
    Mxh=MA(H,4);
    yy=H < Ref(H,-1) AND H < Mxh AND
    Ref(H,-1) > Ref(Mxh,-1) AND
    HHV(H,5 ) < HHV(H,10) AND MACD()>0;
    PlotShapes( shapeUpTriangle*xx, colorBlue, 0, L , -10 );
    PlotShapes( shapeDownTriangle*yy, colorRed, 0, H, -10 );
    Plot(C,"",47,64);

    ----------------------------------------
    rvlv
    I post coding originally done by CAS67,Many thanks to cas for his everlasting patience,hardwork,endurance
     
    Last edited: Jul 10, 2009
  2. casoni

    casoni Well-Known Member

    Joined:
    Feb 19, 2006
    Messages:
    397
    Likes Received:
    487
    Trophy Points:
    63
    hello,
    just quick looking....
    i think you need to change this [ condition in bold letter] , i haven't check

    //1-2-3 High OR Low
    //Low
    Mxl=MA(L,4);
    xx=L > Ref(L,-1) AND L>Mxl AND
    Ref(L,-1) < Ref(Mxl,-1) AND
    LLV(L,5 ) > LLV(L,10 ) AND MACD()<0;
    //High
    Mxh=MA(H,4);
    yy=H < Ref(H,-1) AND H < Mxh AND
    Ref(H,-1) > Ref(Mxh,-1) AND
    HHV(H,5 ) < HHV(H,10) AND MACD()>0;
    PlotShapes( shapeUpTriangle*xx, colorBlue, 0, L , -10 );
    PlotShapes( shapeDownTriangle*yy, colorRed, 0, H, -10 );
    Plot(C,"",47,64);
     
    rvlv likes this.
Loading...

Share This Page