//@version=5
strategy("双均线策略", overlay=true)
fastLength = input(9)
slowLength = input(18)
mafast = ta.ema(close, fastLength)
maslow = ta.ema(close, slowLength)
if ta.crossover(mafast, maslow)
strategy.entry("多", strategy.long)
if ta.crossunder(mafast, maslow)
strategy.entry("空", strategy.short)