Thanks a ton, Mike. Will try from home and let you know.
Cheers, Girish --- In [email protected], "Mike" <sfclimb...@...> wrote: > > Try something like this: > Buy = ...; > Sell = ...; > > Indices = BarIndex(); > LastBuyBar = LastValue(ValueWhen(Buy, Indices)); > LastSellBar = LastValue(ValueWhen(Sell, Indices)); > > Filter = (Buy AND Indices == LastBuyBar AND LastBuyBar > LastSellBar) OR > (Sell AND Indices == LastSellBar AND LastSellBar > LastBuyBar); > > AddColumn(IIf(Buy, Asc("B"), Asc("S")), "Signal", formatChar); > AddColumn(Close, "Close"); > AddColumn(Volume, "Volume"); > Mike
