Hi,
I’m new to programming and I wondering has anyone automated a buy and sell order incorporating the Keltner Channel indicator. This is what I mean in English.
Select a Dow Jones Index 5 minute chart.
Add the Keltner Channel indicator.
Set the period = 20
Enter a buy order at £5 per point when
a candle crosses the lower channel from below the lower channel.
Enter a price target = £50 or 10 points.
Set a trailing stop loss at 10 points.
Enter a sell order at £5 per point
When a candle crosses the upper channel from above the upper channel.
Enter a price target = £50 or 10 points.
Set a trailing stop loss at 10 points.
There you go:
DEFPARAM CumulateOrders = FALSE
Periods = 20
DN = KeltnerBandDown[Periods]
UP = KeltnerBandUp[Periods]
CE = KeltnerBandCenter[Periods]
IF close CROSSES OVER DN and Not LongOnMarket THEN
BUY 1 Contract at Market
SET TARGET pPROFIT 10 //10 pip TP
SET STOP pTRAILING 10 //10 pip Trailing Stop
ENDIF
IF close CROSSES UNDER UP and Not ShortOnMarket THEN
SELLSHORT 1 Contract at Market
SET TARGET pPROFIT 10 //10 pip TP
SET STOP pTRAILING 10 //10 pip Trailing Stop
ENDIF