200 Day Moving Average Breakout Indicator
The purpose of this indicator is to detect when the price breaks below the 200-day moving average line.
Start by opening the indicator builder from the Indicators. Click the builder tab.
Now add a moving average operator in the top line. To do this, just select Moving Average from the drop down selector.
Next configure the settings of the moving average by clicking the cogs icon. Select the parameters tab. Set the indicator averaging period to 200 or your required setting. On a daily chart, this creates a 200-day moving average line. Click the display tab and change the plot series so that the line is plotted on the price axis rather than a separate axis. This will make it easier to spot the crossovers.
Click the top row to select it, so that the border is red. Now click the plus icon on the toolbar. This will add a new row above the moving average.
Set this to new row to the Subtract operator. The result now should be a line that outputs the 200-day moving average minus the price.
Now set the inputs to the Moving Average and the Subtractor as required. For the purpose of this example, we’ll use the median price.
This line should be positive whenever the price is below the moving average and negative when it’s above the moving average. To preview the result so far, click the spy glass icon.
We’re only interested in the places where the line changes from negative to positive or positive to negative. These are the zero crossings. To detect zero crossings we can use the Dirac delta function. To do this, add a new row above Subtract and set that to Dirac delta.
Click the preview button on the Dirac delta row. This should show all of the zero crossings. These are places where the price is crossing the moving average line.
As we only want to detect where the price crosses below the moving average, we can use the step function. Add a step function by clicking the top row, and then adding a new row above that one by clicking the plus icon on the toolbar. Set this to step function. The step function will output a constant value only where the input is positive. This will filter out the negative to positive zero crossings.
Now click the preview icon in the top row. The chart should show the places only where the the price is crossing down below the 200-day moving average.
Lastly, save the indicator by clicking the disk icon from the toolbar and choosing a name.