I guess you need to eliminate excessive signals, Sell = ExRem(Sell,Buy);
Buy = ExRem(Buy,Sell); Then LastBuyPrice = ValueWhen (Buy,BuyPrice); Regards --- In [email protected], "Rob Boyd" <cadc...@...> wrote: > > I have tried using BarsSince (Buy) but if a second buy signal is encountered, it counts from the new signal. To overcome this I have tried setting a variable which tells me I am currently in a trade but the variable first needs to be initialized. I have tried > InTrade = IIf (IsNull (InTrade),0, InTrade); > // if null then set to zero otherwise keep current value. > But this does not work. > Many thanks > Rob >
