【发布时间】:2021-08-31 14:59:34
【问题描述】:
代码
//@version=4
strategy("Sagargy1")
fast=20
slow=50
fastMA= ema(close, fast)
slowMA= ema(close, slow)
strategy.entry("Buy", strategy.long, when=close[0] > close [1] and fastMA > slowMA and close[0]>vwap)
strategy.entry("Sell", strategy.short, 10, when=close[0] < close [1] and fastMA < slowMA and close[0]<vwap)
plot(Buy, color=color.green)
plot(Sell, color=color.red)
plot(Buy, color=color.green)
plot(Sell, color=color.red)
【问题讨论】:
标签: pine-script algorithmic-trading tradingview-api