Making an EMA Crossover
Making an EMA Crossover
Last updated
Making an EMA Crossover
Last updated
This guide will walk you through setting up a simple EMA (Exponential Moving Average) crossover strategy using two Indicator Blocks.
Select EMA as your Indicator
Set the Indicator settings for the EMA
Save the Indicator
Select "Exponential Moving Average (EMA)" from the dropdown.
Set the period to 200 (for a slow EMA).
Save the settings.
Drag a Condition Block onto the canvas.
Connect both EMA Indicator Blocks to this Condition Block.
For "Line 1", select the output from the 50 EMA.
For "Condition", choose "Crosses Above".
For "Line 2", select the output from the 200 EMA.
Save the settings.
Drag an Open Trade Block onto the canvas and connect it to the Condition Block.
Configure it to "Buy" when the condition is met (Green Dot Connection).
This will "Buy" when the EMAs crossover (bullish)
Click the "Compile" button to generate the code for your strategy.
This strategy will execute a buy when the fast EMA (50) crosses above the slow EMA (200). You can add more conditions or modify the strategy as needed.