I wrote this code given below. It works well but gives trading signal within the selected time frame. I want the signal to appear only after the time frame / candle is completed.
SET PIVOT = (HHV(5)+LLV(5)+CLOSE)/3
SET ROCSUM = PROC(PIVOT,11) + PROC(PIVOT,14)
SET WMAROC = WMA(ROCSUM,10)
SET SMAVG = SMA(WMAROC,5)
CROSSOVER(WMAROC,SMAVG) = TRUE
For Sell - CROSSOVER(SMAVG,WMAROC) = TRUE
Please help me modify code for this purpose.