Please help me! BarsLast()

#1
AMI Without this "BARSLAST(N)"

N=High;
XPL=Ref(D,BarsSince(N));

XPL=Ref(D,BARSLAST(N));(Find the last condition holds to the current number of cycles).

I need this expression!

Kreangast
2013-5-23
 

KelvinHand

Well-Known Member
#2
AMI Without this "BARSLAST(N)"

N=High;
XPL=Ref(D,BarsSince(N));

XPL=Ref(D,BARSLAST(N));(Find the last condition holds to the current number of cycles).

I need this expression!

Kreangast
2013-5-23
Where to free download the software ?

Can you show a proper formula ?
What is D ?

Show chart examples
 
Last edited:
#3
Hi KelvinHand
Please look AMI code:
D= H-(ATR*0.3);
N=High;
"XPL=Ref(D,BarsSince(N));" //BarsSince(N) and BARSLAST(N) Both do the same work?
//If not, please help me to write into the same role
XPL=Ref(D,BARSLAST(N));(Find the last condition holds to the current number of cycles).
Plot(TimeFrameExpand(XPF,inDaily ,expandLast), "R1", colorGreen, styleThick);

AMI not BarsLast(),I I must use this function, which role is(Find the last condition holds to the current number of cycles)

Kreangast
2013/5/23
 

KelvinHand

Well-Known Member
#4
Hi KelvinHand
Please look AMI code:
D= H-(ATR*0.3);
N=High;
"XPL=Ref(D,BarsSince(N));" //BarsSince(N) and BARSLAST(N) Both do the same work?
//If not, please help me to write into the same role
XPL=Ref(D,BARSLAST(N));(Find the last condition holds to the current number of cycles).
Plot(TimeFrameExpand(XPF,inDaily ,expandLast), "R1", colorGreen, styleThick);

AMI not BarsLast(),I I must use this function, which role is(Find the last condition holds to the current number of cycles)

Kreangast
2013/5/23
BarsLast() is not provided, the meaning is not clear to me.
if you can provide the chart using the other software, there maybe work around.

I can find the definition of "Find the last condition holds to the current number of cycles".
I still cannot figure out the logic
 

mastermind007

Well-Known Member
#5
Have you tried LastValue?

Honestly even I do not understand what it is that you're attempting, Krean**!

If it is a metastock formula, provide exact complete formula which would compile without errors.
 
#8
Hi KelvinHand
I can find the definition of "Find the last condition holds to the current number of cycles".
//This what I'm looking

Hi mastermind007
If it is a metastock formula, provide exact complete formula which would compile without errors
//AMI through.

Ask you to look at the chart
Thank you ...
Kreangast
2013/5/23
 

trash

Well-Known Member
#10
The website provided by KelvinHand tells that barssince and barslast are similar and both need boolean.

This is what the website tells:

Code:
barssince
barslast 	

barssince(x):
barslast(x):

x: an array of numbers.

barssince(x): count the period number since the first x != 0;

barslast(x): count the period number since the last x != 0.
so something like what you have mentioned in the first post .... BarsLast(High) ... would be wrong because x is not boolean as in the example of the site barslast(x); where x = close/ref(close,1) >= 1.05;!

barslast(High) doesn't make sense to me. Every bar does have a high.

What is the chart showing?
Is it yours? If it is yours what is the problem? It is AmiBroker.
 

Similar threads