c2 Forex1hourstrategypt2
c2 Forex1hourstrategypt2
0 at
https://mozilla.org/MPL/2.0/
// © Gammapips
// https://admiralmarkets.com/education/articles/forex-strategy/best-forex-trading-
strategies-that-work
// You can take advantage of the 60-minute time frame in this strategy.
// The most suitable currency pairs to trade using this strategy are the EUR/USD,
USD/JPY, GBP/USD, and the AUD/USD.
// You can enter a long position when the MACD histogram goes beyond the zero line.
The stop loss could be placed at a recent swing low.
// You can enter a short position when the MACD histogram goes below the zero line.
The stop loss could be placed at a recent swing high.
//@version=4
strategy("Forex 1 hour strategy",
shorttitle="FX1HS",
overlay=true,
process_orders_on_close=true,
commission_type=strategy.commission.percent,
commission_value=0.1,
slippage=5,
initial_capital=10000,
default_qty_type=strategy.percent_of_equity,
default_qty_value=10
)
swingLow = lowest(24)
swingHi = highest(high, 24)
long = crossover(histogramLine, 0)
short = crossunder(histogramLine, 0)
plot(long ? 1e9: na, color=color.green, style=plot.style_columns, transp=80,
title="Long")
plot(short ? 1e9: na, color=color.red, style=plot.style_columns, transp=80,
title="Short")
plot(i_showSwingHi ? swingHi : na, color=color.yellow, title="Swing Hi")
plot(i_showSwingLo ? swingLow : na, color=color.white, title="Swing Low")