Gorbie

8ma55 GBPUSD 1h Strategy

Strategy + Indicator Script (with the same name)
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?
//@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)