ok thanks. please let me know why this is happening because the script does not look back into historical data so long. Alma has 10 bars period which correspond to 120 on 5 mins chart and price difference has a period of 6 bars on 5 mins chart. scale has a period of 100. but 100 bars on 60 mins it should correspond to 1200 bars in the 5 mins timeframe.
So I suppose it should not happen but maybe I am wrong.
thanks again.