PureBytes Links
Trading Reference Links
|
Dickie, so the code would read
Avg = (H+L+C)/3)
Change = Avg - Ref (Close, -1);
intraChange = Avg - ((H + L) / 2);
not sure if this is how I'd proceed
Eric
--- Dickie Paria <babui@xxxxxxxxx> wrote:
> Fred - nicely done. Here's a further improvement.
> Instead
> of "Change = Close - Ref (Close, -1);" - use "Avg"
> instead of "Close".
> [Note: Avg = (H+L+C)/3)]
> When I was playing around with "Avg", I noticed - in
> a side by side
> comparison - that using "Avg" kept you in the trade
> longer....while
> using "Close" whipsawed you in a few trades (i.e.,
> would go negative
> and then quickly positive again).
>
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Fred"
> <ftonetti@xxxx> wrote:
> > I guess I looked a little too quickly ...
> >
> > You should be able to simplify by eliminating the
> jscript as it
> > doesn't appear to be needed ...
> >
> > Length = Optimize("Length", 35, 1, 100, 1);
> >
> > Change = Close - Ref(Close, -1);
> > intraChange = Close - ((H + L) / 2);
> >
> > PlusChange = IIf(Change > 0 AND intraChange > 0,
> Change +
> > intraChange, 0);
> > MinusChange = IIf(Change < 0 AND intraChange < 0,
> -Change -
> > intraChange, 0);
> >
> > BSPC0 = BarsSince(PlusChange == 0);
> > BSMC0 = BarsSince(MinusChange == 0);
> >
> > PlusCF = Sum(PlusChange, BSPC0);
> > MinusCF = Sum(MinusChange, BSMC0);
> >
> > PlusTCF = Sum(PlusChange - MinusCF, Length);
> > MinusTCF = Sum(MinusChange - PlusCF, Length);
> >
> > Buy = PlusTCF > 0;
> > Sell = MinusTCF > 0;
> > Short = Sell;
> > Cover = Buy;
> >
> > Plot(PlusTCF, "PlusTCF", colorGreen, 1);
> //Plots
> PlusTCF
> > line
> > Plot(MinusTCF, "MinusTCF", colorRed, 1);
> //Plots
> > MinusTCF line
> > Plot (0, "", colorBlue,
> styleNoLabel); // shows a
> blue
> > line through 0
> >
> > PlotGrid( 25, 55); // shows white grid line for
> black background
> > PlotGrid(-25,-55); // same
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, vin st
> <vinst1@xxxx> wrote:
> > > Fred ,
> > > How does
> > > Close - ((H+L)/2);
> > >
> > > look into the future? It is comparing the
> mid-point of
> > > the candle with the close of the same day.
> > >
> > > vin
> > >
>
>
>
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12htq0p13/M=362131.6882500.7825259.1493532/D=groups/S=1705632198:TM/Y=YAHOO/EXP=1123124253/A=2889190/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Put more honey in your pocket. (money matters made easy) Welcome to the Sweet Life - brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~->
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/
|