PureBytes Links
Trading Reference Links
|
Your n is the BarsSince(L<LastValue(L))
because :
n bars ago the condition
L<LastValue(L)
was true.[yellow triangle]
[The low for that day is from the red line.]
Since then, the last Low is the LLV(L,n).
[The last Low is from the green line.]
All the intermediate lows, from the yellow triangle till the end are
higher than the last Low.
x=Cum(1);Lx=LastValue(x);
Cond=L<LastValue(L);
n=BarsSince(Cond);
Plot(C,"",colorBlack,64);
PlotShapes(shapeDownTriangle*(x==Lx-LastValue(n)),colorYellow);
Plot(LastValue(L),"",colorGreen,1);
Plot(LastValue(Ref(L,-n))," ",colorRed,1);
Title="The last Low is the LLV(L,"+WriteVal(n,1.0)+")";
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "Kropotkin" <backup_dayad@xxxx>
wrote:
> I'm familiar with these functions. but I can't figure out how to
use
> them to calculate what I want: ie how many days since an expression
> was lower than today's value...
>
> e.g. to know how long since the price was as low as today's low. ie
> today is an n-day low. what is the formula for n?
>
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "louwcoetzer" <lcoetzer@xxxx>
wrote:
> > Hallo !
> >
> > What about these options from the AmiBroker User's guide ?:
> >
> > LOWESTSINCE
> > - lowest value since condition met Lowest/Highest
> > (AFL 1.4)
> >
> >
> > SYNTAX lowestsince( EXPRESSION, ARRAY, Nth = 1 )
> > RETURNS ARRAY
> > FUNCTION Returns the lowest ARRAY value since EXPRESSION was
true
> on
> > the Nth most recent occurrence.
> > EXAMPLE lowestsince( Cross( macd(), 0 ), Close, 1 ) returns the
> > lowest close price since macd() has crossed above zero.
> >
> >
> > OR maybe:
> >
> > LLV
> > - lowest low value Lowest/Highest
> >
> >
> >
> > SYNTAX llv( ARRAY, periods )
> > RETURNS ARRAY
> > FUNCTION Calculates the lowest value in the ARRAY over the
> preceding
> > periods (periods includes the current day).
> > EXAMPLE The formula "llv( close, 14 )" returns the lowest closing
> > price over the preceding 14 periods.
> > SEE ALSO The hhv() function (see Highest High Value ).
> >
> > Kind regards,
> >
> > Louw
> >
> >
> >
> >
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "Kropotkin" <backup_dayad@xxxx>
> > wrote:
> > > How do I calculate how many days since an expression (e.g.
> > bollinger
> > > bandwidth, or Low) was lower than today's value? ie, if today's
> > low
> > > is the lowest price for n days, what is the formula for n?
> > >
> > > Thanks
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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/
|