111

HO TUNG CHEMICAL CORP

沒有交易
在超級圖表上查看

HO TUNG CHEMICAL CORP股票論壇

who can help ...this code ...can not running it on trdingview ...
//@version=5
strategy("Double Moving Average")

fast_ma = input(title="Fast MA Length", type=input.integer, defval=10)
slow_ma = input(title="Slow MA Length", type=input.integer, defval=50)

fast = sma(close, fast_ma)
slow = sma(close, slow_ma)

buy = crossover(fast, slow)
sell = crossunder(fast, slow)

strategy.entry("Buy", strategy.long, when=buy)
strategy.entry("Sell", strategy.short, when=sell)

strategy.exit("Exit Buy", "Buy", profit=input(0.05, title="Profit", type=input.float), stop=input(0.03, title="Stop Loss", type=input.float))
strategy.exit("Exit Sell", "Sell", profit=input(0.05, title="Profit", type=input.float)