Building the entry logic

How will we know when to enter the market?

We define our long entry point as:

  1. When SMA10 is greater than SMA50

  2. When SMA10 (PREVIOUS) is less than SMA50 (PREVIOUS)

And our short entry point as the opposite of the above

  1. When SMA10 is less than SMA50

  2. When SMA10 (PREVIOUS) is greater than SMA50 (PREVIOUS)

Let's start!

1. Navigate to the Enter strategy tab inside the strategy page

2. Click on the start node to bring up the menu, then click on Connect Gateway

3. You should now have a gateway node attached to your mouse cursor. Click anywhere to define it. It's context menu should open once it's defined.

4. Let's define the condition SMA10 is greater than SMA50

5. We'll need to create another Gateway action to encapsulate our next condition. Click on Add Gateway under Truthy Action.

6. Let's define the condition SMA10 (PREVIOUS) is less than SMA50 (PREVIOUS)

7. Once both of these are true, we can then enter the market. Click on Add Activity under Truthy Action once more.

8. Select enter position long

9. Let's go back to our previous gateway SMA10 (PREVIOUS) < SMA50 (PREVIOUS) and define a Falsy Action: end.

10. We now have our long entry point. Let's review what we have so far.

11. Let's go back to the SMA10 > SMA50 gateway node and attach a new Gateway for it's Truthy Action.

12. Let's enter the following short entry point condition: When SMA10 is less than SMA50

13. Attach a Gateway node as a Truthy Action and enter our second short entry point condition: When SMA10 (PREVIOUS) is greater than SMA50 (PREVIOUS)

14. Connect an Activity as a Truthy Action to this gateway and select enter position short

15. Let's attach end events to the remaining Gateways without Falsy Actions

16. And our final strategy should look like this

17. Don't forget to click on save changes.