PureBytes Links
Trading Reference Links
|
Hope this helps:
--------------------------------------------
Opt1 = Param("%Zig(Change)",0.1,0,1,0.05);
Opt2 = Param("Min.AllowableDuration",1,1,20,1);
Z = Zig(C,Opt1);
Buy = Z < Ref(Z,1) AND Z < Ref(Z,-1);
Sell = Z > Ref(Z,1) AND Z > Ref(Z,-1);
Buy = Buy AND BarsSince(Sell) > Opt2;
Sell = Sell AND BarsSince(Buy) > Opt2;
Short = Sell;
Cover = Buy;
Eq = Equity(1);
Plot(C,"",colorBlack,styleBar);
Plot(z,"",colorWhite,styleLine);
ShowTriangles = ParamToggle("Arrows","HIDE|SHOW",1);
if(showTriangles)
{
PlotShapes(IIf(Buy,shapeSmallUpTriangle,shapeNone),5,0,BuyPrice,0);
PlotShapes(IIf(Sell,shapeHollowDownTriangle,shapeNone),4,0,SellPrice,0);
PlotShapes(IIf(Cover,shapeHollowUpTriangle,shapeNone),5,0,CoverPrice,0);
PlotShapes(IIf(Short,shapeSmallDownTriangle,shapeNone),4,0,ShortPrice,0);
}
Title = "{{NAME}} - {{INTERVAL}} {{DATE}} "+_DEFAULT_NAME()+" : {{VALUES}}"+"\n"+
" BarsSinceBuy: "+BarsSince(Buy)+"\n"+
" BarsSinceSell: "+BarsSince(Sell)+"\n" +
" NextSiganl: "+(BarsSince(Buy)-BarsSince(Sell))+"\n";
--- In amibroker@xxxxxxxxxxxxxxx, "lucianomt" <lucianomt@xxx> wrote:
>
> I tried this but only got this:
>
> P = ParamField( "Price field" );
> change = Param("% change",5,0.1,25,0.1);
> Plot( Zig(P, change), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
>
>
>
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "brian_z111" <brian_z111@> wrote:
> >
> > It's built in....see charts >> indicators >> Zig
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "lucianomt" <lucianomt@> wrote:
> > >
> > > Could somebody post the code for the ZigZag indicator? Thanks!
> > >
> >
>
------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> 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/
|