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.

Step:1 Define Quantifiable Rules
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.
- The first candle is negative
- The second candle opens with a negative gap
- The second candle closes above the open of the previous candle.
Step 2: Translate the rules into Easylanguage
Now we translate the above three rules into Easylanguage.
- Close[1]<open[1]
- Open<close[1]
- Close>open[1]
Step 3: Put it into an if-statement
Now we have the conditions and only need to put them into an if-statement, like below, coupled with an exit of your choice: