Putting a lot of what we’ve learned so far into practice, we’ll now code a strategy that buys on the popular bullish engulfing candlestick pattern.
The first step is to define the pattern. Looking closer at the image above, we see that a bullish engulfing could be defined with a few conditions.
Now we translate the above three rules into Easylanguage.
Now we have the conditions and only need to put them into an if-statement, like below, coupled with an exit of your choice:
If Close[1]<Open[1] and Open<Close[1] and Close>Open[1] then buy next bar open;
If barssinceentry=5 then sell next bar open;
In the exercise section below, you will find more candlesticks to practice on.
Login
Password
Signup Here Lost Password