Trend systems are often used to identify entry and exit points, but they can be difficult to track for a portfolio of securities because they are constantly changing. You can’t afford to miss an opportunity when it presents itself. So we created this simple but widely used decision recipe.
Identifying the short-term or long-term trend of a security is an important initial action for many traders. You may want to begin an automation by first checking a symbol’s price relative to a moving average technical indicator.
This decision recipe automatically checks if an asset is above or below a specified moving average length to determine if it is in an uptrend or downtrend before proceeding through the automation.
You can use the decision recipe in scanner, monitor, and event automations.
For example, you could add the recipe to a scanner to evaluate if a ticker symbol is above a 50-day SMA and enter a position accordingly. You could then use the same recipe in a monitor automation to close the position if and when the security drops below the 50-day SMA.
This is a perfect example of how bots can automate once difficult tasks with simple, but powerful, actions.
The text is the output of AI-based and/or outsourced transcribing from the audio and/or video recording. Although the transcription is largely accurate, in some cases, it is incomplete or inaccurate due to inaudible passages or transcription errors and should not be treated as an authoritative record. This transcript is provided for educational purposes only. Nothing that you read here constitutes investment advice or should be construed as a recommendation to make any specific investment decision. Any views expressed are solely those of the speaker and should not be relied upon to make decisions.
In this video, I want to show you how to set up a moving average trend decision automatically right inside of your automations. You can use this decision recipe inside of any automations that you’re running on Option Alpha and you can use it in conjunction with scanners as well as monitors or event automations. It’s basically just using a trend decision and letting the bot check for that trend decision automatically.
To add this recipe in this decision, you simply go to the "+" icon anywhere inside of your automation editor then go to the decision action. After that, you’ll select the recipe from the list of available recipes. In this case we want to use this one here. The symbol price is above or below some moving average that we define.
Notice that when we select this, some of the fields here are variable fields that we’ll have to fill out. You can type in the symbol manually and you can always choose to check SPY, or if you want to you can create a custom input.
When you create a custom input like this and we name it something like “Ticker Symbol,” that field now becomes a variable field. We can set a default value for it, but we can also reuse this and swap out the ticker symbols on different automations in different bots that we’re running inside of the platform. Let’s just use the “Ticker Symbol” custom input for now and then we can keep moving forward.
You go to the next field and now you can check and see if that particular symbol that you’ll set when you create your bot and start running your automations is above or below some moving average. In this case we’ll check and see if the particular ticker symbol is above its 50-day moving average.
Notice that we just simply select any of these fields and make the appropriate change anywhere that we want inside of the decision recipe. We select what type of moving average we want. In this case we’ll stick with the symbol moving average, and then we click save. That now adds this to our decision block here for our actions and we click save one more time, and now we have this decision recipe added to our automation editor.
Now any time that this automation runs, it will first check and see if the ticker symbol’s price is above its 50-day moving average. If the answer to that question is yes, it will continue down the "Yes" path. Alternatively, if the answer to that question is no, then it will continue down the "No" path.
From here, you can layer and stack decisions and actions and whatever sequence or whatever process you use for trading and start to replicate your strategy automatically inside of your bots.