Hi, To answer your question:
AddColumn( Peak(Close,1,1), "Peak" ); AddColumn( Trough(Close,1,1), "Trough" ); However, please be aware that the values you see today may be different when you run it again tomorrow. Peak and Trough look into the future, meaning that future values can change past values. Your buy and sell accuracy will never be able to be reproduced in live trading. Refer to the following formula in the AFL library for an example of how to delay buy/sell until the signals would *actually* be seen in live trading: http://www.amibroker.com/library/detail.php?id=353 Mike --- In [email protected], "mahest72" <[EMAIL PROTECTED]> wrote: > > i have made simple afl > Filter =1; > Buy= C>Peak(Close,1,1); > Sell= C <Trough(Close,1,1); > AddColumn( Close, "Close" ); > AddColumn( V, "Volume", 1); > > but i dont know how to addcolumn to list peak and trough.can anyone > help me out > > regards > mahesh >
