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

Re: [amibroker] Event Date



PureBytes Links

Trading Reference Links

Questions to help me with AFL

1. What is the purpose of the alltimehighbar line? I don't see the variable 
referenced anywhere.

2. Why is lastvalue(highest(high)) used instead of just highest(high)?

3. Is the alltimehighbar variable returning the bar number of the highest 
high? Such as #67 out of 300 data periods?

Use the following formula to find the all-time highest and display its 
value and date:

alltimehigh = LastValue( Highest( high ) );
alltimehighbar = ValueWhen( high == alltimehigh, Cum(1) );

alltimeyear = ValueWhen( high == alltimehigh, Year() );
alltimemonth = ValueWhen( high == alltimehigh, Month() );
alltimeday = ValueWhen( high == alltimehigh, Day() );

"All time highest was " + WriteVal( alltimehigh );
"on the " + WriteVal( alltimeyear, 1 ) + "." + WriteVal( alltimemonth, 1 ) 
+ "." + WriteVal( alltimeday, 1 );

/* Draw also a vuy arrow on highest day */
buy = high == alltimehigh ;
sell = 0;


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com