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

[amibroker] Re: Elder's Force Index in Ami - anybody have the AFL or point me?



PureBytes Links

Trading Reference Links

To investigate the past, move your cursor in some previous bar and 
see.

x=Cum(1);Lx=SelectedValue(x);
Cond=L<SelectedValue(L);
n=BarsSince(Cond);m=IIf(IsEmpty(n),0,n);
Plot(C,"",colorBlack,64);
PlotShapes(shapeDownTriangle*(x==Lx-SelectedValue(n)),colorYellow);
Plot(SelectedValue(L),"",colorGreen,1);
Plot(SelectedValue(Ref(L,-m)),"  ",colorRed,1);
Title="The selected Low is the LLV(L,"+WriteVal(IIf(IsEmpty
(n),Lx,n),1.0)+")";

Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx> 
wrote:
> 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 --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/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/