Gorbie

8ma55 GBPUSD 1h Strategy

Strategy + Indicator Script (with the same name)
開源腳本

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?
//@version=2
strategy("8ma55 GU 1h", shorttitle="gu 1h", overlay=true, pyramiding=0, max_bars_back=720, default_qty_value=10000, initial_capital=5000, currency="USD")
fastLength = input(8)
slowLength = input(55)
price = close

mafast = sma(price, fastLength)
maslow = sma(price, slowLength)

if (crossover(mafast, maslow))
    strategy.entry("Long", strategy.long, comment="Buy")

if (crossunder(mafast, maslow))
    strategy.entry("Short", strategy.short, comment="Sell")

strategy.exit("exit", "Long", profit = 960, loss = 1400)
strategy.exit("exit", "Short", profit = 960, loss = 1400)