//@version=5 strategy("SMA Crossover Strategy", overlay=true) // Define the length for the SMA smaLength = input.int(50, title="SMA Length", minval=1) // Calculate the SMA smaValue = ta.sma(close, smaLength) // Plot the SMA on the chart plot(smaValue, title="SMA", color=color.blue, linewidth=2) // Buy condition: Price crosses above the SMA if...