//@version=4
strategy("Parabolic SAR Strategy 2", overlay=true)
start = input(0.02)
increment = input(0.01)
maximum = input(0.2)
psar = sar(start, increment, maximum)
if (psar >= high)
strategy.entry("買", strategy.long, stop=psar, comment="買")
else
strategy.cancel("賣")
if (psar <= low)
strategy.entry("賣", strategy.short, stop=psar, comment="賣")
else
strategy.cancel("買")
//plot(strategy.equity, title="equity", color=color.red, linewidth=2, style=plot.style_areabr)
strategy("Parabolic SAR Strategy 2", overlay=true)
start = input(0.02)
increment = input(0.01)
maximum = input(0.2)
psar = sar(start, increment, maximum)
if (psar >= high)
strategy.entry("買", strategy.long, stop=psar, comment="買")
else
strategy.cancel("賣")
if (psar <= low)
strategy.entry("賣", strategy.short, stop=psar, comment="賣")
else
strategy.cancel("買")
//plot(strategy.equity, title="equity", color=color.red, linewidth=2, style=plot.style_areabr)