Thanks. I tried out the AFL inside a loop and it worked: > if ( ( buy[i] == 1 ) and ( buy[i-1] == 0 ) )
However, if the day before my buy day is a sell day from a previous buy, would buy be 0 and sell be 1: Monday = Sell from previous trade (SELL = 1; BUY = 0?) Tues = Buy <<<- today only Weds = In trade Thurs = In trade Fri = Sell
