Gorbie

GBPJPY 4h Strategy

146 0 11
Strategy + Indicator (with the same name)
Remove from Favorite Scripts Add to Favorite Scripts
//@version=2
strategy("GBPJPY 4h Strategy", shorttitle="gj strategy", overlay=true, pyramiding=0, default_qty_value=10000, initial_capital=5000, currency="USD")
fastLong = input(8)
slowLong = input(60)
fastShort = input(9)
slowShort = input(71)
profitLong = input(5450)
lossLong = input(2950)
profitShort = input(5970)
lossShort = input(2950)
mafast240l = security(tickerid, "240", sma(close, fastLong))
maslow240l = security(tickerid, "240", sma(close, slowLong))
mafast240s = security(tickerid, "240", sma(close, fastShort))
maslow240s = security(tickerid, "240", sma(close, slowShort))
if (crossover(mafast240l, maslow240l))
    strategy.entry("Long", strategy.long, comment="Buy")
if (crossunder(mafast240s, maslow240s))
    strategy.entry("Short", strategy.short, comment="Sell")
strategy.exit("take profit", "Long", profit = profitLong, loss = lossLong)
strategy.exit("take profit", "Short", profit = profitShort, loss = lossShort)


Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out