- Topics: 5
- Replies: 332
- Posts: 337
With it being based on Heikin-Ashi candles, it’s a bit tricky, but it can be done.
We have a Heikin-Ashi script function, so you need to be sure the other scripts are being wrapped around that. Here is an example using the bullish candle after 3 bearish candles in a row:
//Set Heikin-Ashi Candles
C1 = HAC() ;
//Find Open and Close values using HA Candles
V1 = MA(C1, CALC=Open, BARS=1);
V2 = MA(C1, CALC=Close, BARS=1);
//Find Bearish Candles
RES1 = V1 > V2;
//Find where 3 or more Bearish candles happen in a row
RES2 = BARSTRUE(RES1, LOOKBACK=3) >= 3;
V3 = RES1 and RES2;
//Find Bullish Candle
V4 = V1 < V2;
//Find where 3 Bearish Candles are followed by a Bullish Candle
Here are the candles that match the criteria (grey shaded zone):
Keep in mind, you can’t apply this script to a Candlestick chart with Heikin Ashi candles already enabled, it would become a Heikin Ashi of a Heikin Ashi and the results wouldn’t match. This script has been written to work with the Back Tester.
- This reply was modified 9 months, 2 weeks ago by Matthew.