For 4 simple moving averages, the script tests every single combination for maximum profitability and finds the best pair.
Combinations:
sma1 and sma2,
sma1 and sma3,
sma1 and sma4,
sma2 and sma3,
sma2 and sma4,
sma3 and sma4
And then paint the pair which get best performance. sma lengths are optional, so you can change lengths as you wish.
You will see in some charts that for example sma1 and sma2 pair was best perfrmance and colored on the chart but then sma2 and sma3 pair got better performance, so script starts to paint sma2 and sma3. so it's dynamic based on best performance.
keep in mind => length1 < length2 < length3 < length4 will be better
I didn't have enough time to test the script, so please comment when you test it.
by LonesomeTheBlue