Save Brokerage Upto 60% to 90%

can anybody help to create afl for my strategy

Discussion in 'AmiBroker' started by vsreeram77, Dec 7, 2017.

  1. vsreeram77

    vsreeram77 Active Member

    Joined:
    Jan 27, 2013
    Messages:
    109
    Likes Received:
    47
    Trophy Points:
    28
    Location:
    Trichy
    only parabolic SAR trading system

    --------------------------------

    indicators used :

    defualt parabolic SAR

    time frame :

    5 min

    trading time :

    10 am to 10 pm (commodity segment)

    buy entry :
    ----------

    parabolic SAR must be below price candle

    a bull candle open=low

    buy above high of the bull candle

    exit :
    --------

    when a price candle touches parabolic SAR

    sell entry :
    ------------

    parabolic SAR must be above price candle

    a bear candle open=high

    sell below low of the bear candle

    exit :
    --------

    when a price candle touches parabolic SAR
     
  2. Happy_Singh

    Happy_Singh Happy

    Joined:
    May 27, 2013
    Messages:
    1,486
    Likes Received:
    3,800
    Trophy Points:
    113
    Location:
    Here & Now :)
    Code:
    _SECTION_BEGIN("PSAR MODIFIED");
    ac = 0.02;             mx = 0.2;
    SR = SAR(ac,mx);
    Plot(SR,"SR",colorBrightGreen);
    L_Setup = C > SR AND O == L;
    S_Setup = C < SR AND O == H;
    
    PlotShapes(L_Setup*21,colorWhite,0,L);
    PlotShapes(S_Setup*21,colorWhite,0,H,12);
    
    BO = ValueWhen(L_Setup,H);
    BD = ValueWhen(S_Setup,L);
     
    Plot(BO,"BO",colorGreen,styleDashed|styleStaircase);
    Plot(BD,"BD",colorRed,styleDashed|styleStaircase);
    
    Buy  = Cross(C, BO);    Short = Cross(BD, C);
    Sell = Cross(SR, C);    Cover = Cross(C, SR);
    
    Buy  = ExRem(Buy,Sell);        Short = ExRem(Short,Cover);
    Sell = Cross(Sell,Buy);     Cover = Cross(Cover,Short);
    
    PlotShapes(Buy+Short*2,colorWhite,0,IIf(Buy,L,H));
    PlotShapes(Sell*4+Cover*3,colorWhite,0,IIf(Sell,H,L));
    
    _SECTION_END();
    
    This should get you started, try modifying it to get what you want

    Happy :)
     
  3. vsreeram77

    vsreeram77 Active Member

    Joined:
    Jan 27, 2013
    Messages:
    109
    Likes Received:
    47
    Trophy Points:
    28
    Location:
    Trichy
    Thanks lot dear
     
  4. vsreeram77

    vsreeram77 Active Member

    Joined:
    Jan 27, 2013
    Messages:
    109
    Likes Received:
    47
    Trophy Points:
    28
    Location:
    Trichy
    i get the default parabolic.. can you add buy/sell arrows as per my logic ??? kind help
     
  5. vsreeram77

    vsreeram77 Active Member

    Joined:
    Jan 27, 2013
    Messages:
    109
    Likes Received:
    47
    Trophy Points:
    28
    Location:
    Trichy
    the afl shared actually, plots whenever there is a bull/bear candle which have OPEN=LOW, OPEN=HIGH.. but i want to display for only first time
     
  6. deepu12345

    deepu12345 New Member

    Joined:
    Mar 19, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Awesome Job happy ji
     

  7. deepu12345

    deepu12345 New Member

    Joined:
    Mar 19, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    happy ji i want your help in coding will you ?
     
  8. vsreeram77

    vsreeram77 Active Member

    Joined:
    Jan 27, 2013
    Messages:
    109
    Likes Received:
    47
    Trophy Points:
    28
    Location:
    Trichy
    perfect trading for intraday :
    -----------------------------

    indicators used :
    -----------------

    ema close 100

    super trend 7-3

    parabolic sar default settings


    important rules :
    -----------------

    1. every day, new trading.. dont use any previous trend
    for buy/sell

    2. take fresh trend from 10 am (for commodity) and till
    10 pm

    3. no trade after 10 pm

    4. trading time is purely user defined.


    buy entry :
    -----------

    super trend must be buy trend

    atleast one price candle must be opened,high,low and close completely
    above ema 100

    parabolic SAR must be uptrend

    a bull candle OPEN = LOW, and if all the above are true, then take
    a buy above the high of bull candle

    stoploss :
    ----------
    when a price candle touching parabolic SAR in bottom line, exit buy

    or

    when a valid reverse sell signal comes.. whichever comes first will be stoploss


    sell entry :
    -----------


    super trend must be in sell trend

    atleast one price candle must be opened,high,low and close completely
    below ema 100

    parabolic SAR must be downtrend

    a bear candle OPEN = HIGH, and if all the above are true, then take
    a sell below low value of that bear candle

    stoploss :
    ----------
    when a price candle touching parabolic SAR in upside, exit sell

    or

    when a valid reverse buy signal comes..

    whichever comes first will be stoploss
     
Loading...

Share This Page