Hi
Could I ask that you programme to use in Pro Real Code the following
3 Candle signal Indicator
To go LONG
1. Body of the latest candle is greater than body of each of the 2 previous candles
2. Previous candle must be bearish
3. Close of latest candle is higher than close of the previous candle
To go SHORT
1. Body of the latest candle is greater than body of each of the 2 previous candles
2. Previous candle must be bullish
3. Close of latest candle is lower than close of the previous candle
More info can be found via this link
http://www.fxcodebase.com/code/viewtopic.php?f=17&t=1648&p=3284&hilit=3CS#p3284
Many Thanks
This should do:
DEFPARAM CalculateOnLastBars = 500
Offset = 10 * pipsize
Body = abs(close - open)
Bearish = open > close
Bullish = close > open
IF close > close[1] THEN
IF Body > Body[1] AND Body > Body[2] THEN
IF Bearish[1] THEN
DRAWARROWUP(barindex,low - offset) coloured(0,255,0,255)
ENDIF
ENDIF
ELSIF close < close[1] THEN
IF Body > Body[1] AND Body > Body[2] THEN
IF Bullish[1] THEN
DRAWARROWDOWN(barindex,high + offset) coloured(255,0,0,255)
ENDIF
ENDIF
ENDIF
RETURN
Below an Auto-System based on the above code / strategy.
Spread = 4 on attached results.
Coded and tested improvements gratefully received.
//https://www.prorealcode.com/topic/3-candle-signal-indicator/
DEFPARAM CUMULATEORDERS = False
Body = abs(close - open)
Bearish = open > close
Bullish = close > open
IF Bullish[1] and close < close[1] and Body > Body[1] AND Body > Body[2] THEN //Chandle[20](close) < 60 and > -70 < 60
Buy at high + 5 * pipsize stop
SET TARGET PPROFIT 160
SET STOP PLOSS 40
ENDIF
IF Bearish[1] and close > close[1] and Body > Body[1] AND Body > Body[2] THEN //Chandle[20](close) < 40 and < 40 > -30
Sellshort at low - 10 * pipsize stop
SET TARGET PPROFIT 115
SET STOP PLOSS 45
ENDIF