Previous Days First Bar High/Low


#1

With the below code i get the current day’s first Bar High and Low ,how do i get the same for the previous day first bar ?
FBL=ValueWhen(Day()!=Ref(Day(),-1),L);
FBH=ValueWhen(Day()!=Ref(Day(),-1),H);


#2
FBL = ValueWhen( Day() != Ref( Day(), -1 ), L, 2 );
FBH = ValueWhen( Day() != Ref( Day(), -1 ), H, 2 );

http://amibroker.com/guide/afl/valuewhen.html

… but when you make a post on this forum, always remember to enter the AFL code properly. Improperly formatted code might result in syntax errors. Read here:


#3

Thank you very much !!!