hi all
this the code but can not get the number of days since the event happened.
ABM = LastValue( ValueWhen ( GapDown(),Ref(L,-1),1) ) ;
ABM_DAYS = BarsSince (ABM) ; // number of days since happend
thank you
hi all
this the code but can not get the number of days since the event happened.
ABM = LastValue( ValueWhen ( GapDown(),Ref(L,-1),1) ) ;
ABM_DAYS = BarsSince (ABM) ; // number of days since happend
thank you
You are not using BarsSince()
correctly
It expects a Boolean type expression or an Array that logically represents a Boolean relationship.
ABM is a number, because of LastValue()
something like
BarsSince( ABM == L )
// or
BarsSince( ABM <= L )
// etc
This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.