รบกวนขอสูตร CDC Action Zone for amibroker

This topic contains 4 replies, has 4 voices, and was last updated by  Patan 2 months, 2 weeks ago.

  • Author
    Posts
  • #18537

    ME555
    Participant

    เรียน

    เนื่องจาก Link  For amibroker ไม่สามารถดาวน์โหลดได้  มันขึ้นว่า that page cant be found

    รบกวนแก้ไขให้หน่อยครับ

     

    BR.

    sataporn

     

    Attachments:
    You must be logged in to view attached files.
  • #18542

    dreamscat
    Keymaster

    ///////////////////////////
    // CDC Actionzone 170101 //
    // Amibroker Edition //
    // Converted 17/01/2017 //
    ///////////////////////////

    _N( Title = StrFormat( “{{NAME}} – {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol ” + WriteVal( V, 1.0 ) + ” {{VALUES}}”, O, H, L, C, SelectedValue( ROC( C, 1 ) ) ) );

    src = ParamField(“Data Source”,3);

    sprd = Optimize(“Slow MA”,26,15,50,1);
    fprd = Optimize(“Fast Period”,0.3,0.1,0.6,0.05)*sprd;

    fast = EMA(src,fprd);
    slow = EMA(src,sprd);
    macdv = fast-slow;
    sig = MA(macdv,9);

    Bullish = macdv>0;
    Bearish = macdv<0;

    Green = Bullish AND src>fast;
    Yellow = Bullish AND src<fast AND src>slow;
    Brown = Bullish AND src<fast AND src<slow;

    Red = Bearish AND src<fast;
    Aqua = Bearish AND src>fast AND src<slow;
    Blue = Bearish AND src>fast AND src>slow;

    buysig = Bullish AND Ref(Bearish,-1);
    PreBuy = Blue AND Ref(Blue,-1) AND Ref(Blue,-2) AND Ref(Blue,-3) AND src<Ref(src,-2);
    BuyMore=BarsSince(Bullish)<26 AND Yellow AND src=LLV(src,9);

    sellsig = Bearish AND Ref(Bullish,-1);
    PreSell=Yellow AND BarsSince(buysig)>25 AND src<Ref(src,-2);
    SellMore=Yellow AND BarsSince(Yellow)>2 AND src<Ref(src,-2);

     

    //Plot(sig,”Signal Line”,colorBlue,styleLine);
    //SetGradientFill(colorLime,colorRed,0,GetChartBkColor());
    //Plot(macdv,”MACD”,colorGrey50,styleGradient);

    plotcolor = IIf(Green,colorGreen,IIf(Yellow,colorYellow,iif(Brown,colorBrown,iif(Red,colorRed,iif(Aqua,colorAqua,iif(Blue,colorBlue,colorWhite))))));

    Plot(c,”Price”,plotcolor,styleCandle);
    Plot(fast,”Fast EMA”,colorRed,styleDashed);
    Plot(slow,”Slow EMA”,colorBlueGrey,styleDashed);
    PlotOHLC(fast,fast,slow,slow,”2ma zone”,IIf(fast>slow,ColorBlend(colorGreen,GetChartBkColor()),ColorBlend(colorRed,GetChartBkColor())),styleCloud);

     

    // Exploration //

    pctchange = ((C-Ref(C,-1))/Ref(C,-1))*100;
    Filter = pctchange;
    AddColumn(C,”Close”);
    AddColumn(buysig,”Buy”);
    AddColumn(prebuy,”PreBuy”);
    AddColumn(BuyMore,”Buy More”);
    AddColumn(sellsig,”Sell”);
    AddColumn(PreSell,”PreSell”);
    AddColumn(SellMore,”Sell More”);
    AddColumn(pctchange,”Percent Change”);

    // Quick Scan //
    Buy = buysig;
    Sell = sellsig;

    // System Test //
    // DO NOT FORGET TO EDIT THIS PART TO FIT YOUR SYSTEM TEST SETTINGS!! //

     

    maxpos = 500;

    SetPositionSize(100/maxpos,spsPercentOfEquity);
    SetOption(“InitialEquity”, 1000000);
    SetOption(“AllowPositionShrinking”, True);
    SetOption(“MaxOpenPositions”,maxpos);

     

     

    2 users thanked author for this post.
    • #18562

      ME555
      Participant

      ขอบคุณครับ

  • #18557

    สารัฐ
    Participant

    ขอบคุณมากครับ

  • #19639

    Patan
    Participant

    พอดีลองเอาสูตรไปวางแล้ว มันเกิด error นะครับ ไม่รู้ผมเป็นคนเดียวไหมครับ ?

You must be logged in to reply to this topic.