u/Chandima-Wijerathna

I’m working on a Pine Script strategy where buy and sell signals are generated based on a moving average crossover. The logic works, but I’m getting repeated buy or sell labels on multiple candles after the condition becomes true.

For example, once the fast MA crosses above the slow MA, I only want one buy signal at the crossover candle. Instead, my script sometimes keeps showing buy signals while the condition remains true.

reddit.com
u/Chandima-Wijerathna — 18 days ago