[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Modify exsisting forumla



PureBytes Links

Trading Reference Links

Gordon,

Thank you so much. I think this is what I'm looking for.

Regards,
 Cordell

--- In amibroker@xxxxxxxxxxxxxxx, "Gordon Sutherland" <gosuth@x> wrote:
> Cordell,
>  
> I have dug-up some alternative code that just plots the buy/sell arrows
> on the Chart Pane for this Trend line Break System. Maybe this is the
> code you lost from your HD crash. The Scan/Explore seems to work OK for
> me.
>  
> FYI, I found the concept interesting and hence the code, but the system
> was not very profitable when back tested and so I did not develop the
> code further.
>  
> _SECTION_BEGIN("GBS Clayburg Systems");
>   /* JOHN CLAYBURG BASED SUPPORT/RESISTANCE LINES 
>      concept extrapolated by Gordon Sutherland to use 
>            Trendline Extensions instead of horizontal S & R Lines
>      Coded by Bob Johnson and Gordon Sutherland May 2004  */
>  
> /* PARAMETERS */
> ColLSC = ParamColor("SU Color",colorOrange);
> ColLRC = ParamColor("RE Color",colorBlue);
>  
> /* CATEGORY 3 SUPPORT BREAKOUT TRIGGER FOR SHORTS: */ 
> LL_3_6 = Ref(L,-6) > Ref(L,-3);
> LL_3_5 = Ref(L,-5) > Ref(L,-3);
> LL_3_4 = Ref(L,-4) > Ref(L,-3); 
> LL_3_2 = Ref(L,-2) > Ref(L,-3);
> LL_3_1 = Ref(L,-1) > Ref(L,-3);
> LL_3_0 = L > Ref(L,-3);
> Cat3Sup = LL_3_6 AND LL_3_5 AND LL_3_4 AND LL_3_2 AND LL_3_1 AND LL_3_0;
>  
> /* SUPPORT LINE ("SC") */
> y0=ValueWhen(Cat3Sup,Ref(L,-3),2); 
> y1=ValueWhen(Cat3Sup,Ref(L,-3),1); 
> x0=ValueWhen(Cat3Sup,BarIndex(),2)-3;
> x1=ValueWhen(Cat3Sup,BarIndex(),1)-3;
>  
> // looking into the future here, but it is
> // only applied to historical plots to determine
> // the length of the extension.
>  
> xsf=ValueWhen(Cat3Sup,BarIndex(),0)-3;
>  
> /* CATEGORY 3 RESISTANCE BREAKOUT TRIGGER FOR LONGS: */
> HH_3_6 = Ref(H,-6) < Ref(H,-3);
> HH_3_5 = Ref(H,-5) < Ref(H,-3);
> HH_3_4 = Ref(H,-4) < Ref(H,-3); 
> HH_3_2 = Ref(H,-2) < Ref(H,-3);
> HH_3_1 = Ref(H,-1) < Ref(H,-3);
> HH_3_0 = H < Ref(H,-3);
> Cat3Res = HH_3_6 AND HH_3_5 AND HH_3_4 AND HH_3_2 AND HH_3_1 AND HH_3_0;
>  
> y2=ValueWhen(Cat3Res,Ref(H,-3),2); 
> y3=ValueWhen(Cat3Res,Ref(H,-3),1); 
> x2=ValueWhen(Cat3Res,BarIndex(),2)-3;
> x3=ValueWhen(Cat3Res,BarIndex(),1)-3;
>  
> // another look into the future.
>  
> xrf=ValueWhen(Cat3Res,BarIndex(),0)-3;
>  
>  
> Plot(C,"C", colorBlack, styleCandle);
> Plot(O,"O", colorRed, 16+4096);
> Plot(H,"H", colorRed, 16+4096);
> Plot(L,"L", colorRed, 16+4096);
> Plot(int(V/1000),"VolK", colorBlue, 16+4096+2048+256);
>  
> // This bit is used to plot the buy/short arrows.  The loops below
> generate 
> // extraneous buys at the start of new resistance lines.  Reason unknown
> // so far.
>  
> ms = (y1 - y0)/(x1 - x0); // simple slope of support
> mr = (y3 - y2)/(x3 - x2); // simple slope of support
>  
> exts=BarsSince(Cat3sup);
> supline=y1 + ms * (3 + exts);
>  
> //Plot(supline,"Cat3Sup",colorWhite,styleLine);
>  
> extr=BarsSince(Cat3Res);
> resline=y3 + mr * ( 3 + extr);
>  
> //Plot(resline,"Cat3Sup",colorBlue,styleLine);
>  
> Buy=Cross(C,resline);Short=Cross(supline,C);
> PlotShapes(IIf(Short,shapeHollowDownArrow,shapeNone),colorRed,0,H,-10);
> PlotShapes(IIf(Buy,shapeHollowUpArrow,shapeNone),colorGreen,0,L,-10);
>  
> GraphXSpace=4;
> _SECTION_END();
>  
> Filter = Buy OR Short;
> NumColumns = 1;
>  
> Regards,
> Gordon  Sutherland
>  
> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
> Behalf Of ct1942
> Sent: Thursday, 19 May 2005 2:17 a.m.
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: Modify exsisting forumla
>  
> *         Lesmond,
> 
> Thanks for the reply. However, this is not the formula that I had when
> my drive crashed. 
> 
> This is the formula that I am trying to modify so that it will show
> the  buy and sell signals without all the support and resistence lines.
> 
> I have been able to get rid of the support and resistance lines.
> However, I cannot get the buy and sell arrows that appear in the
> indicator window to appear on my price chart or in the AA scan window.
> 
> Thanks, 
> 
> Cordell
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Lesmond V" <ebsn247@xxxx> wrote:
> > John Clayburg's formula was discussed here on Mar-06 - Mar-07 2005.
> The formula below has both plot and exploration sections:
> > 
> > http://finance.groups.yahoo.com/group/amibroker/message/79050
> > 
> our use of Yahoo! Groups is subject to the Yahoo! Terms of Service
> <http://docs.yahoo.com/info/terms/> .




------------------------ Yahoo! Groups Sponsor --------------------~--> 
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/