### Easylanguage Course

Module 1: Starting to Program
Module 2: Indicators and Functions
Module 3: Variables
Module 4: Inputs
Module 5: Exit Techniques
Module 6: Stop Orders and Limit Orders
Module 7 Using Multiple DataStreams in a Strategy
Final Strategy Coding Project
Module 8: Plot Studies and Their Uses
Module 9: Writing to Files
Module 10: How to Code Your Own Indicators and Functions

# Coding Project 1

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.

1. The first candle is negative
2. The second candle opens with a negative gap
3. 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.

1. Close[1]<open[1]
2. Open<close[1]
3. 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:

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.

Lesson Content
0% Complete 0/1 Steps