Strategy Overview
- Continuously enter iron butterfly positions in a basket of ticker symbols.
- Use decision logic to prevent overlapping positions in the same ticker symbol.
- Add opportunity filters to check for liquidity, probability of profit, rate of return, and probability of max loss before opening new trades.
- Build a monitor automation with multiple exits plus a "Switch" for exiting if the long strikes are breached.
- Leverage custom inputs throughout the bot template for flexibility.
Create the Bot
We discuss the bot's global settings, allocation, daily and total position limits, and show you how to connect the bot to an account.
Add a Scanner Automation
Follow along as we build a scanner automation. We show you how to create a watchlist of tickers and include a decision recipe to ensure the bot does not overlap positions. We also add multiple pre-entry criteria for the bot to evaluate before sending an order to the broker with SmartPricing technology.
The bot automatically filters opportunities for bid-ask spread, rate of return, probability of profit, and max loss inside the automation.
Plus, learn how to use custom inputs to make your automations more efficient.
We end the automation with an open position action that lets you customize the iron butterfly with specific expiration and option leg attributes.
Add a Monitor Automation
Next, we add a monitor automation to manage open positions. Learn how to add a position loop action to manage all your positions with the same decision logic.
This bot uses multiple criteria to exit trades, including defined profit targets with SmartStops, and an expiration filter to avoid assignment.
We also show you how to use a switch to exit challenged positions for ultimate flexibility.
Save and Share the Bot Template
Finally, we saved the bot as a template and shared it in the Community so you can clone the bot and add it to your portfolio instantly.
Transcript
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.
Welcome, everyone. Again, to the bot workshop here today. In today's bot workshop, we're going to be going over a number of different things. Here's kind of like the highlights for this particular event for us on the strategy workshop that we're doing. We're going to be building out a sequential iron butterfly.
So, targeting 45 DTE. That doesn't mean it'll always be 45 DTE, but it does mean that we're targeting a 45 DTE for this iron butterfly strategy. We're going to be looking at continuously enter new positions in a basket of ticker symbols. So we're going to use a symbol loop to enter new positions in a defined basket that we're looking at. And then we're going to be filtering through all of those potential symbols looking for that perfect entry.
We're going to be using some decision logic to prevent overlapping positions. So even that we're going to be trading a basket of ticker symbols, we don't want the bot to enter multiple positions over and over and over again in the same underlying ticker, okay? Really easy to do. We can filter that out with a decision.
Third thing that we're going to do is we're going to add a lot of opportunity filters. This is where I want to spend a little bit more of our time here today on this particular workshop is giving you guys a good example of how you can add multiple opportunity filters. We're going to add some for checking liquidity. We're going to check for the probability of profit. We're going to check for the rate of return. We're going to check for probability of max loss, all before opening a new position. Does that make sense?
And then fourth thing that we're going to do is we're going to build out a monitor automation with multiple exits plus a switch. So the switch is going to be pretty cool because what the switch allows us to do is automatically turn off or turn on certain parts of the automation. We're going to use a switch for allowing the bot to exit if the long strikes on either side are bridged. So if the stock goes really, really far out on either side, you get automatically exit the position. If those strikes are bridged, we'll use a switch to turn this on or turn this off as we're going.
Sixth thing that we're going to do is we're going to leverage lots of custom inputs. I have been doing an amazing job at doing this truthfully on the demos and on the workshops, but custom inputs are so flexible. So we're going to leverage a ton of custom inputs today on the workshops. We're going to spend a lot of time on this as well. So we make sure we have a really good, stable, flexible bot you guys use.
The first thing that we're going to do here is we're going to go ahead and create our new bot shell. So we're going to call it the sequential iron butterfly template. Let's just call it sequential iron butterfly bot, okay? First thing that we do is create a bot, we name it, and we go down here and click the drop-down for the account. This is where you're going to go ahead and tell the bot what account it's tied to.
Remember, you connect every bot to an account, okay? So it's really important. You connect every bot to an account. It could be a paper trading account, could be a live trading account, could be one of your live trading accounts like if you have multiple accounts, tedious amount of trade, you can do that here, right? So this is where you connect it. We'll just connect it to our regular paper trading account.
Next thing that we do here is give it an allocation. So in the allocation field here, we're going to tell the bot how much it has to trade. Again, this allocation is the total capital allocated to the bot for opening new positions. This does not mean that the bot will enter positions that are $5,000 apiece. It just means that it won't ever enter more than $5000 of capital allocated to new positions, okay? This is kinda like your final backstop, your fail-safe for your bot.
Next thing that we can do is we can go here and set our position limits. And this is really cool because you can tell the bot immediately to turn off scanners whenever this position limits are hit. So if you set the position limits as one new position per day and one position in total, that means the bot will never ever ever have more than one position going.
It could enter one position today, and then it's going to wait until that position is closed before it could enter a new position. It means it all happens intelligently, automatically by just setting these position limits. Now, remember, position limits never stop you from closing positions. You're never limited on closing positions. You can close position anytime you want inside of your bot.
This is just a threshold, a safe card to help ensure that you are only opening the number of positions that you want, okay? So we're going to go here, and we're going to go and add five positions per day and five positions in total. Again, you can modify this and change this, but for us, if the bot has five perfectly brand-new positions that it wants to open, we're going to let it open five positions, but no more than five positions going at one time. Okay? Does that make sense?
And then what we’re going to do is we’re just going to simply click the button to create our bot. So, our new bot basically has been created. This is the shell of the bot, and so now we’re going to click the button to go over and view our new bot.
So, here’s the deal. All we’re going to do here is we’re going to now start adding automations, okay? So we created our bot shell, if you will, right? This is our shell of the bot, and now we have to add automations to the bot. Now listen, automations are literally the brains of the bot. This is where you tell the bot what to do, what decisions to make, how to enter positions, how to send the orders over to your broker. It all happens in the automations.
Now remember, for this particular strategy that we’re building out, we want the bot the constantly look for new iron butterfly positions. But never open overlapping iron butterfly positions, okay? So if it finds a position and it meets all of our criteria, go ahead and add that new iron butterfly position. But don’t ever overlap a position.
What I mean by this is if we have an iron butterfly and SPY, we don’t want two. We want one at a time, sequential. One at a time. We want to open an iron butterfly, wait until it’s closed. However, it gets closed, then look to open another one. One at a time. Does that make sense? All good. Okay, that’s the meaning of sequential, one by one by one, not overlapping.
So the first thing that we’re going to do is we’re going to build out our scanner, okay? So scanners are super cool because what scanners allow you to do is scan for new positions. So inside of your scanner automation, we’re just going to click that little plus icon here to open up the window. To then choose or build out a new scanner.
What scanners do is they run every 15 minutes looking for new positions. So, you want to think about your bot as having basically like two sides of your bot. There’s everything that you’re going to do to look for and enter positions. And then there’s everything that you’re going to do to manage any existing positions that the bot has, right? So does that make sense? When you’re trading, this is what you do anyway.
Part of your trading half of your trading is looking for and finding new positions. The other half of your trading is managing existing positions. So here, inside of the scanner. We’re going to build out all the logic and all the decision that we want the bot to go through to look for and enter that new iron butterfly position, okay?
So we’re going to click the button to create a brand new scanner. Notice that if you’ve already created and saved other automations, you can save them into your library. You can reuse existing automations, create copies of existing automations, so you don’t always have to build it from scratch. You can download a template and use those automations on other people’s templates. Very easy to do, but let’s say we want to build out a brand new one from scratch.
So we’re going to click the button to create a new automation. Here we’re going to name it something really specific like scanner for sequential iron butterfly positions, okay? You can name it whatever you want, but I usually like to name mine something very specific. So I know exactly, exactly what this automation is doing. Okay?
Next thing that we’re going to do is we’re going to start adding decisions. Decisions start right here in the middle of the screen with the little plus icon. We just click the plus icon, and then we can add one of our automation actions.
Remember in the beginning; I said that the first thing that we’re going to do here is we’re going to loop through or scan through a little portfolio or basket of ticker symbols. So what we’re going to do is we’re going to add the action all the way at the bottom, which is a loop through a number of ticker symbols.
So ticker symbol loops are super powerful because what they allow you to do is to tell the bot, look, bot, go through this symbol, this symbol, this symbol, this symbol, and look for potential trades. So we just have to actually define the symbols that we want. So we just click the button for the symbols, and then we choose all the symbols we want the bot to go through.
For example, we can choose EEM, and then we can choose XOP, we can choose GLD, we can choose XRT, IWM, and QQQ, etc., etc., etc., right? So we choose all of our symbols here in the symbol field. Once you’re good to go, then you just select done. And then your symbols are now populated. Now, these are the symbols that the bot is going to scan through, and then go ahead and hit save.
So as soon as you hit save, now you can see that those symbols have been added as the first action that the bot is going to go through. You want to think about it like this; like your bot needs to know what symbols it’s looking for before it starts making decisions, right? The bot needs to know what data am I looking at. So, in this case, we’re going to give it a symbol loop and tell it to go through those particular symbols, and on each of those symbols, make the same types of decisions.
Again, this is just how you would trade anyway, right? If you’re looking at something, you’re going through the same progression of decisions over and over and over again, okay? So next thing that we’re going to do is we’re going to have the bot make some decisions. So next thing that we can do is add that pus icon here and then click on the action for a decision.
Decisions are crazy powerful. There’s an infinite combination that you can put together inside of your automations. Literally an infinite combination of things that you can do, but all decisions are are decisions that you want the bot to take. And the bot either gives you a yes or a no answer to decisions. So here, we can add a decision to our decision tree. When I click on the plus icon, you’ll notice that I’ve got lots of decision recipes to choose from.
Decision recipes are natural language recipes that allow you, the trader, to configure and tell the bot exactly what to do. And what we decided to do here at Option Alpha is make sure that these decision recipes are written in a way that you would naturally say them if you’re going to describe them to somebody else. Like the symbol’s price is above or below some value. The symbol’s price increase or decrease some amount by a day ago, or today, or five days ago, etc. Does that make sense? Just very natural language.
So the first decision that we’re going to have the bot make is we’re going to go down here and see if the bot can open a new position, okay? This is the first one here, and, again, there’s no right necessarily or wrong steps of like you ordering on these things. It’s just personal preference, so sometimes you could do this decision first. Sometimes you could do other decisions first, but I’ll show you how you can do it here in just this example, okay?
What I like to do sometimes is, have the bot ask itself first, can I open a new position? Right? That seems logical like did I already have all of my position slots filled up. So I want to ask the bot to ask itself, can I open a new position? It’s a very simple decision. Bot can open a new position. Meaning that it doesn’t have its five positions allocated that it already had, that we have set as our position limits.
So I’m going to go here, I’m going to save that decision, and then I’m going to go and save that decision to the automation editor. So now what you can see here is you can see that when the bot starts running, it’s going to loop through these symbols and first ask itself; can I open a new position? If the answer is no, then it will simply just end the automation and start back over again and just keep checking every fifty minutes. Okay?
The next thing that we’re going to do is we’re going to have the bot, now, check and see if it already has an existing position in that ticker symbol. So now we’re going to go and add a decision, and then we’re going to go down here, and we’re going to go to this recipe right here, which is the recipe to check and see if the bot already has an existing position in that ticker symbol.
And we can do this really specific because, in this particular bot, we’re not only checking to see if it already has a position in that symbol, but does it already have an iron butterfly position. So now we can do kinda like a double-check right here inside of this recipe. So bot has exactly 0 positions with a certain type. So you can again define the type here, and we’re going to define it as iron butterfly. So the bot has 0 positions that are iron butterflies with this particular symbol that we’re looping through.
Now notice in the symbol field, I can fill in the symbol. Now that doesn’t really help us because if I fill in the symbol like EEM, then the bot always checks for just EEM. Does that make sense? So instead, what I want to do is I want to connect this input, this symbol. I want to connect it using custom inputs right here to the actual symbol field that it’s looping through.
So this is a really cool way for the bot to intelligently check each and every symbol that it’s looping through. So when it starts, it’s going to look at EEM, and then it’s going to ask itself; do I have a position that’s an iron butterfly in EEM? Yes or no. Then it’s going to move to the next symbol. Do I have an iron butterfly in XOP? Yes or no. What about GLD? Yes or no. XRT? Yes or no. Does that make sense?
So every time that it loops through, it’s going to pull whatever symbol it’s currently looping through at the time. Okay? It’s going to pull that symbol that it’s currently looping through at the time. Now once I’m good to go here, and I connected that as a custom input, I’m just going to go ahead and save this to my automation editor.
Now you start to see that our automation starting to build out in this decision tree of yes, no decisions, and logic that we want the bot to go through is now starting to be created. Okay? So when the automation runs, it will first look at EEM. And in EEM, it’s going to ask the bot; can I open a position? Yes. Does the bot already have 0 positions with that symbol? No, it already got a position. Fine, skip EEM, don’t go any further, and now start using XOP. Right?
Now look at XOP and see if XOP. If the bot has a position in XOP. So the first thing that we’re going to do is we’re going to check and make sure that the bot doesn’t have an existing position with that symbol. The next thing that we’re going to do here, and this is going to be a little bit different, but I want to do it this way because it’s so, so easy to now build out your automation once you tell the bot what position you’re ultimately wanting to get into.
The next thing that I want to do is I want to add the open position action. Okay? I don’t want to leave it here, but I want to add it because, at this point, I want to tell the bot what position I want the bot eventually get into. And once we build out this open position action, it makes using the filters and everything else so much easier. And I’ll show you why here as we go, okay?
So down the yes path, if we don’t already have an existing position in that symbol, then I want the bot to potentially open a new position. Okay? So here’s what we’re going to do. We’re going to add an action called open position, and again, notice where I added it. I’m clicking on the plus icon down the yes path because I only want to open a position if the bot has exactly 0 positions, no positions, with that underlying symbol.
You can actually go in here and just modify this copy, and you can say, does the bot have room for a position in this symbol? Whatever you want to do. You can modify the action caption, make it a lot easier for you to read as you go, right? You don’t have to use to logic that we build in that.
So does the bot have room for a position in this symbol? Yes, because it has 0 positions already, great. So what I’m going to do is I’m going to add an action to open a position. Now I tell the bot to go ahead and open a short iron butterfly position. So I’m going to select the one all the way at the bottom, which is the short iron butterfly position, okay?
When I select this, now I have my position entry screen. This is where I’m going to tell the bot everything that I want to do to enter this new position in this iron butterfly. Okay? Everything that I want the bot to do to enter this new position in the iron butterfly. So what I’m going to do here is I’m going to first select the symbol field.
Now again, you can select the symbol field, and you can choose EEM if you want to, right? You can choose the actual symbol, but that doesn’t really help because what we want to do is we want to connect it to whatever symbol the bot is looping through currently. If that make sense, we want to connect it to whatever symbol the bot is currently looping through.
So we’re going to click on the little blue icon to the right. You can see I’m hovering over right now and select it and highlight it in grey. I’m going to click on that blue icon to the right of the symbol field, and I’m going to connect the symbol to whatever symbol the bot is currently looping through right now. Do you notice how it creates the new custom input? This custom input is now flexible. It’s going to open a position in EEM or XOP or GLD or whatever the tickers are that you’re looping through when it gets to this step for that ticker.
Next thing that I’m going to do is I’m going to select the date, the expiration date that I want to use. Notice that when I slide over the expiration date field, I’ve got lots of different choices here. This is where you can be uber specific on how you want the bot to open positions when it comes to expirations. So you can do an expiration between X and X days, or on or after certain date, or later on in your monitor automations, you can adjust positions by matching the expiration of an existing position. So you have one position you want to match the expiration and make an adjustment, you can do that.
So here what we’re going to do is we’re going to go and select this second one down, which is at least 45 days. So, we’re going to select the drop-down here, go down to 45 days, and then we can choose any series or only monthlys. That I don’t mind doing any series now because what we’re going to do is we’re going to add a lot of liquidity filters to this template. So if you do any series which would include weeklys or quarterlies or any of those expiration series, just make sure that you add some liquidity filters to it so that you can filter for good liquidity. Does that make sense?
So you can choose only monthlys, or you can choose any series. We’re going to keep it at at least 45 days, any series which would enter any weekly or monthly that’s at least 45 days from expiration. Once we’re good to go, we simply click the button to save, and now you can see that that expiration field has now saved at 45 days.
Next thing that we have to do is we have to select our short call strike. We can just leave our short call strike as a 50 delta, and now we have to select our long call strike. Notice for any of these strike fields. We have so many possibilities. There’s so many different ways you can cut and slice and dice this thing. You could do it based on delta or particular strike, or you could choose a dollar amount above and below the underlying price or percentage above and below the underlying price. Or standard deviation above and below the underlying price. Or you can choose a dollar amount above and below a particular leg of the position that you’re building out.
So all the logic that you would need to build out the exact type of position you want is all in here, again, as recipes. Okay? As recipes. Just really simple little decision recipes. You just tell it exactly what you want it to do. So, in this case, for the long call, we’re going to go ahead, and we’re going to choose a five delta long call. Again, you can go in here and modify this if you want to, or we’ll just going to set it as a five delta long call. And then we’re going to go ahead and save that long call as a five delta.
Next thing that we’re going to do is we’re going to do the short put strike. This time what we’re going to do is we’re going to use this recipe here, which is to match the short put strike to be the exact same strike as our short call strike. So we’re going to use this recipe to say we want the short put strike to be the same strike as our short call strike that we already have said earlier.
This ensures for this particular iron butterfly that the short strikes of the position are exactly the same. Exactly the same, right? Super cool. So we can save that. Now you can start to see that our recipes are starting to build out. We’ve set our short strike as a 50 delta. Now we set our short put strike to be the same strike as the short call leg. Last thing that we can do is we can now set our long put leg here, which we can set again as a five delta.
This makes our iron butterfly a really, really wide iron butterfly. By the way, if you haven’t listened to podcast episode 211, we went through a ton of training on iron butterflies, even did a little bit of research where we went through and compared two different backtest for iron butterflies. It’s podcast 111. It’s one of the most recent shows. Go ahead and check that out as well. Okay? You can see how you can be ultra, ultra specific with your legs, and you’re setting up your iron butterfly.
The beautiful thing about this is you don’t ever have to do this once you do it once. It’s all set up, ready to go, completely automated for the future, okay? So, you don’t have to go in and keep choosing all these strikes like you do now manually. You can just set this up automated here inside of your open position action.
Now, let’s go to the amount. So the amount is this amount here. The amount here is where you tell the bot how much or how many contracts that it can trade. Now, if I select this slide out over for the amount, you can see I’ve got some additional recipes here as well. You can tell the bot to specify the number of contracts where you can physically type in the number of contracts.
So, you can tell the bot, look, bot, I want you to get into one contract each. That’s it—just one contract. Or you can tell the bot that you want to get into five contracts each, right? So you simply just modify this to the number of contracts. Or you can tell the bot, and these are pretty cool. You can say, bot, you can do up to $1,000 of risk for each position that you get into.
So think about this, right? The bot will automatically factor in the premium, the width of the strikes, how much risks the position has, and then it will automatically do up to, but not over, $1,000 of risk. That means that some positions might be two contracts, some positions might be three contracts, but they’ll all be under $1,000 of risk. Pretty cool, right?
You can even do it based on percentage. This is my favorite way to do it because what you can do is you can set it as percentage, and then as your bot grows or doesn’t grow, your position sizing automatically adjusts as you go, which is insanely cool because if you don’t follow proper position sizing, I think, that’s one of the number one reasons you could blow yourself up is you just over allocate position because you forgot to check.
So you can say, I want this bot to allocate 5% of the bots allocation to each position, or of the bot’s net liquidity, or of its available capital, right? Those are all slightly different things because of how the bots are moving money and increasing and decreasing their position size, but you can set it to one of those. Okay? And yes, the bot does subtract and factor in the credit from the spread for these calculations. Of course. Okay? Cool stuff, right?
So you can do any of those. Later, when you do adjustments, you can match the quantity of an eisting position. So later, when you do adjustment, if you want to adjust the position, you got five of one on one side. You could match it, and the bot would intelligently just add five because it knows it can match, okay?
So for now, what we’re going to do is we’re going to set just one contract. Keep it super simple, super smooth, and you guys can go in and make adjustment to this if you want to in your template when you save, okay? Last thing that we have to set here is we have to set the price. The price is the fun part. I think it’s the fun part because this is where you tell the bot how to send orders to your broker.
What we have here is we have something called smart pricing. Smart pricing is where you send timed limit orders to your broker. If you’ve ever sat there and you’ve submitted trade, and you’ve waited, and then it doesn’t fail, and you cancel and replace the order, right? Have you guys done that before? I mean, I know, I have. I raise my hand, and you’ll see me in the background, but like, right? You’ve done that before.
So this is what smart pricing does, but it does this intelligently for every position. So you can set smart pricing into different pricing types like you can say use normal smart pricing. So if the bid-ask spread is really wide, then what you can do is have normal smart pricing try four different prices, ten seconds apart. Looking for best pricing and working its way up or down on the bid-ask spread.
You can use additional ones like patient, which would try less prices closer together because, or speedy because you want to get into the position, or you can try patient which is try more prices more evenly spaced in time. It really just depends on how you want to trade and how you want to put these things together, okay?
So, in this case, for opening a position, I would do something like patient because I’m opening the position. I don’t need to rush to get in or out of it, so I would try patient smart pricing, and I would maybe try the bot to try up to 80% of the bid-ask spread. Right? Up to 80% of the bid-ask spread. So the bot can try a little bit beyond mid-price, but maybe not all the way through the spread.
Again, it just depends on if the spread is wide or narrow, how many prices it would try. But if the spread is wider, it’s going to try more prices. So it’s always constantly looking for better pricing for you. Okay? Or you can turn it off completely. Like if you don’t love this and you’re like, ah, forget it. I never want to try to get better pricing, right? Like you’re just I want to get worse pricing every time. I just want to do 100% of the bid-ask spread every time and always shave slippage. Great, just turn off smart pricing if you want to. That’s up to you, okay?
I’ll turn it on; I’ll keep it at patient, and then we’ll do 80% of the bid-ask spread. And then what we’re going to do is we’re going to go ahead and save this. So now what we’ve done is we built out our full, full, full open position action. Remember, we do this right now. We take our time with it when you’re building out your bot and building out your actions because now, we never have to do it.
Yes, if the price moves and the market changes, and the strikes change, it would automatically adjust. Automatically adjust as you go. So now what we’re going to do is we’re going to go ahead and save this to our scanner. So now we’re going to save this to our scanner. This is our open position action, okay? This is our open position action.
Now that we have this open position action here, what I want to do now is I want to do something super cool, which is use this open position action that we spent time building out. And I want to add some filters for this potential iron butterfly, okay? I want to add some filters. So this logic is all great and cool; loop through some ticker symbols, check and see if the bot has an existing position, right? And then open an iron butterfly.
Sounds great. Most traders might do this. I don’t like to do it this way because I’m not telling the bot to check for things that are important to me like liquidity, rate of return, probability of success, etc. etc., etc. Would you guys agree? Like you don’t go into the market, and just, I hope, cover your eyes, and blindly just click on things and say, I hope this one works out. No, you’re checking maybe volume or open interest. You’re hopefully checking probabilities, right? So this is what we can do with the bots.
So listen, follow me on this because it’s super, super cool to do this. Now that you have your ope position action created, what you’re going to do is you’re going to click on the gear icon on that open position action, and then you’re going to select the choice for precede with. And what we can do here is we can inject a decision or action before this step. So this is really fun as you’re building out your automations. You can add decisions and actions in between. You can delete, you can remove, you can order, right? It’s super easy to do.
So we’re going to click the gear icon and then click precede with. That means that we’re going to do this ahead of this open position action and we’re going to go up here to the decision. We want the bot to make more decision before it gets to the point of opening a position. Sounds logical, right? Sounds like it makes sense.
So we’re going to add another decision, and this time we’re going to go down to the section in our recipes called opportunities. Okay? Now opportunities, you guys see this right here where it says opportunities? It has all these opportunity-based recipes that are listed here. Okay? Opportunities sound like what they are. The reason that we named them this is because your bot doesn’t have a position yet.
Opportunity recipes are evaluating a potential trading opportunity. Like, bot, I want you to look at this potential trade and determine if it meets my criteria before you send the order to your broker, right? That’s what you would want to do. Like when you, I don’t know, go to a restaurant, right? Like you’re going to look at the menu before you go to the restaurant, right?
So you haven’t eaten the food yet, you haven’t gone there, you haven’t placed your order. You’re looking at the menu. This is what opportunity recipes do. They evaluate a trade before you get into it. Okay? So the first one that we’re going to add here is we’re going to add the bid-ask spread. Super super simple one to add, insanely powerful one tab. One of my favorites.
So we’re going to click on this recipe here which is an opportunity’s bid-ask spread is less than a certain amount. This is an easy slam dunk, no-brainer filter for automations. Guys, this is; guys, girls, everybody who’s in here. This is the easiest, dead simple automated thing that you could do that would improve your trading. It’s just don’t enter positions when the spread is insanely wide.
Like, would you guys agree? Like that’s the easiest possible thing you could do, and you could do it with bots. So now what we’re going to do is we’re going to select the opportunity. You gotta tell the bot, like- the bot’s like, I don’t know what opportunity you want me to look at. There’s a million different trading opportunities out there.
So when we hit the button to select, now what we’re going to do is we can see there’s a recent trade that we built out. So because we built out this trade already, right? Because we built out this trade already, it’s here inside of our recent section, which means, well, guess what? We don’t have to build it out again.
Once you built out a trade, the bot is intelligent enough to know that you are potentially looking at the same opportunity, right? Like you told me, you want to get into this position, so do you want me to evaluate the same position that you built out? And we just confirm and say yes. Yes, I want you to evaluate that iron butterfly position I’m about to get into that I might want to send an order to, and tell me if the bid-ask spread is less than a certain amount.
Now here’s what we’re going to start really going crazy with some custom inputs. Now I could put ten cents in here, and I can put ten cents, and then I can save it. And it would always look for bid-ask spread less than ten cents. And if I ever wanted to change it, I can always come right back in here deep into the automation, and I could modify this, and I could say, okay, now I want it to be 15 cents.
You guys understand? Super easy. We’re just hard typing in, just physically typing in the amount that we want it to check on. But if I want to make this a flexible field that I can easily change on the fly as I’m starting to see different automations run, or different market conditions, maybe the market is crazy one day, so I want the spread to tighten up. I want to make this a flexible field.
What I can do is I can go here to the button, to the blue button next to that field, and I can click that blue button to create a custom input. So, when I create a new custom input for this field, I’m literally creating like a changeable, inputtable, flexible field for this automation. So I’m going to add a new custom input, and I’m going to call this one bid-ask spread threshold.
And I can give it a default, right? I can give it a default, and I can say maybe the default is, say, 15 cents. So if the bid-ask spread is wider than 15 cents, I don’t even want the bot to try to enter position. The spread is just too, too wide. So you can give it a little description here too, so you know exactly what it is. The maximum spread for a bot to enter a new position.
So now I have this custom input called bid-ask spread threshold, and so now the 15 cents goes away, and now inside of my automation, I have this custom input. And again, we can modify this, and I’ll show you where to modify it once you’re done or once we’re done building out this automation, but this is now an input that we can modify and be flexible as we go.
Once I save, it’s going to ask me, okay, Kirk, where do you want this action to precede? Do you want it to precede the yes path or the no path? In this case, you can tell it which side of the automation editor to put it on, and we’re going to put it on the yes path. So now where we’ve done, it is I’ve added one filter to my bot.
 So does the bot have room to open a new position? Yes, it does already have an existing position. Great. Bot, can you please pull that opportunity for me and check and make sure that the bid-ask spread is less than my bid-ask spread threshold. I don’t know about you guys, but still, after years of doing this and like going through this now for like year. It still gives me chilis that we can do this, like literally give me chills.
You can tell the bot to check the bid-ask spread and make sure the bid-ask spread is less than your threshold before it sends the order to your broker. If the bid-ask spread is not less than your threshold, and the answer for that particular symbol is no, then it just simply goes down the no path. That’s it. Simply goes down the no path.
Guess what? We can actually test this logic right here inside of the automation. And we’re going to do it right now, so you guys can see this as we’re going through it, okay? By the way, I would encourage you, highly, highly, highly encourage you, and everyone in our team here would be like, yes, please, Kirk, say this. Please test your bots as you’re going through them. Like test out your logic. You can do this right here inside of the automation.
So up at the top, next to the button for your library where you can save your automations, there’s a little awesome button here called test. And you can test your bot logic right here in the automation. So now, it’s going to ask me what bot do want to I run this test on? Well, I want to test it on this bot. Notice you can also stress test your logic against other bots that you have.
So if you’re building out an automation that you know a bunch of bots are going to use, you can just stress test it right here. And just test it on other bots as you go. And it’s going to ask you what input you want to use for this particular test. So if I want to modify and stress test different levels or probabilities, or whatever, now you can see where your inputs are, one place where your inputs can be used just for testing purposes. Right? Just for testing purposes.
So I can say, okay, yes, I want to test this logic that I have with a 15% bid-ask spread threshold, okay? So what I’m going to do here is I’m going to click the button to start the test. Now the test is going through those symbols. So look here, right here, down here, where I highlighted, right? EEM. The bot loop through each of the different symbols that I told it to loop through, and then it made the same decisions for every single symbol.
And it told me what the answer to each of those decision was. Can a bot open a new position? Yes. I know that because the bot doesn’t have any position, but at least it would know, right? Does the bot have exactly zero positions that are iron butterflies for this particular symbol? Yes. You can even go over and check out the actual decision log here, and you can see what data the bot is using. Zero position for EEM that are iron butterflies. Great, of course.
Now, check this out. Pull the information for an EEM, iron butterfly, at least 45 days out, right? 50 delta, five delta, bla bla bla bla bla. And see if the bid-ask spread is less than our threshold. Do you remember what our threshold was? Out threshold was 15 cents. So right now, right this second, as I was testing this using live data right now, as the market is moving, the bid-ask spread for that particular EEM positions was 31 cents.
So the bot said, nope, it’s not less than my threshold. So now It went down the no path, and it wouldn’t send the order to your broker. So let’s toggle over and check XOP. So now we’ve toggled over, and now we’re looking at XOP. So now where the bot is evaluating the next symbol in our loop. Okay, so it went through and checked in the snap of a finger EEM. Now in the snap of a finger, it goes to check XOP.
So, all the same decisions make sense. Now we go down here. Is the bid-ask spread narrow? No. Oh my God, look at this. The bid-ask spread is super, super wide right now in XOP. Insanely wide. So, of course, we wouldn’t want to send it, right? Of course, we wouldn’t want to send it. But here’s a beautiful thing about it. It might be wide right now, but later this afternoon, tomorrow morning, the next day in the afternoon, the spread could be narrow.
Like why should you have to do that anymore as a trader? Always blew my mind that there wasn’t something that did this. Like why do we have to always check and monitor and be tethered to the computer? Just let the bot constantly check for this stuff for you, and when the spread is appropriate, send the order. I mean, it just makes logical sense, like when there’s a great pricing, send the order to your broker.
Let’s go over to the next one, GLD. So check this out. With GLD, I don’t know this is going to happen. This is light pricing right now, okay? GLD, the bid-ask spread, met the threshold. Yes. The threshold in GLD was 14 cents. So what did the bot do? Now the bot said, I would have. Again this is all test, this is not actually opening a position, but the bot would have sent an order to your broker to open a position.
Again, you can stress test all of your logic right here inside of the bot, right? So the GLD position made a lot of sense. The bid-ask spread was narrow, great. The bot skipped to trade in something that wasn’t liquid and enter to trade in something that was. And then you can keep going on and on. So XRT here, you can see, resulted in a no. IWM, no. QQQ, no. EFA, no. Oh my Gosh, all of them are going to be no except for GLD. Okay, and XLF. So XLF was liquid enough with some of the other ones. Right?
So here’s what we’re going to do. We’re going to go ahead and exit out of this test. See how easy that was? Test. If I want to make this test wider, I can say it tested on 90 cents. Of course, like, everything would work on 90 cents because I’m just stress testing it at different level. Super, super easy to do.
Now, here’s the deal. I don’t want to just check the bid-ask spread. Do you guys agree? There’s other things I could check. So what I want to do here is I want to click on this bid-ask spread decision recipe that we added. I’m going to click on it, and I’m going to add a group of decisions. I’m going to add a group of decisions. I want the bot not only to check the bid-ask spread. That’s cool. But I also want the bot to check some other things for this potential trading opportunity.
What are the other ones I want to add here that I want to spend some time on is the opportunity rate of return. So I want to pull the opportunity, pull the opportunity that we’re looking at. Again, you can just select the recent opportunity that way. You don’t have to plug it in a million times. Bot knows exactly what opportunity it’s looking for. Go ahead and save that. And I want to check a rate of return.
In this case, I want to check a rate of return being greater than some amount. Now remember, with iron butterflies, it’s going to calculate your possibility of making that maximum amount vs. the lowest amount or the risk that you take, right? So that’s how it’s going to factor in—the maximum amount you can make vs. the risk on the trade.
We know that this number for iron butterflies has to be really big because we’re not always going to get that maximum amount. We’re not always going to pin the strikes right at the middle point every single time. Does that make sense?Â
So we know it’s going to be a higher amount, but this also filters out any trades that have really bad pricing where you’re not getting compensated enough for the position.
I know, I always say, does that make sense or sense, the common thing I say. Okay. So it’s going to filter out trades where you’re not getting enough premium for the position that you’re entering. That’s a really smart thing to do. Smart thing is to let the bots make sure there’s enough of a rate of return. There’s enough premium vs. the risk that you’re taking to make it worth your time.
So here’s what we’re going to do. We’re going to do a rate of return of 40%. So if the rate of return is not greater than 40%, forget it. We don’t want to do it. Again, we can type in 40% here, or we can create a custom input. We just click on the little blue icon to the right to that field, and then instead of reusing the existing input, we’re going to add a new input. And we’re going to call this Rate of Return threshold.
Actually, I want it to be ROR, just in case people come along later. Rate of return (ROR) threshold.
Number that we’re going to use is 40. This is the percentage rate of return for new positions. Has to be over this amount. I don’t care what you guys say in your descriptions; just please make it descriptive enough for you. I mean, like this is for your own sanity. I do this for myself like just tell yourself what it is and what it needs to be for you, so you remember if you come back in later. Okay?
So once we’re good here, we’re going to hit save. And now that’s a 40% rate of return threshold, right? So if that iron butterfly does not generate a 40% credit risk rate of return, don’t enter it. So we’re going to save this, and now we have two decisions that we want the bot to go through before it sends the order. Okay? Before it sends the order. Follow the yes path. That’s what this decision block is doing. Follow the yes path, which goes down to where? Open an iron butterfly position.
If the bid-ask spread is less than our threshold, and the rate of return is greater than our rate return threshold. Okay? Both have to be true—notice we can swap this here by just changing that button to or. We can change it to or. So one or the other has to be true. I don’t like that in this scenario. In this scenario, you can use other in the scenario, but in this scenario, I want both of these to be true. I want great pricing on the spread, and I want the rate of return to be high enough to get into the position.
So if the spread width is too low or too high, immediately stop and don’t even check the rate of return. That’s what’s going to happen, right? Both of these have to be true, so if the first one fails and gets a no answer, it doesn’t even bother to check in the next one because you told it to do and. Both of these have to be true.
So what I’m going to do is I’m going to go ahead and save this to our automation. Now I’m going to go in here, and I’m going to test this logic. We’re going to test it again. We’re going to put the bid-ask spread really, really high, just so that it clears that bid-ask spread hurdle, so we can start to evaluate the rate of return of some positions. I am not saying you should do this to your automations when you start running them for real. This is only a test.
So I’m going to make the bid-ask spread really wide, and I’m going to use that 40% rate of return threshold. Now I’m going to click test, and I’m going to go down for EEM. Now, look at the decision block for EEM. The bid-ask spread, of course, clear that hurdle, but the rate of return would have failed. You’re not getting enough premium for the iron butterfly position right now to possibly enter and send the order to your broker.
I don’t know about you guys again. It gives me chills. It can calculate this as you’re going and try to figure that out for you. So let’s look at some other ones. Let’s go over here and now check out this one which is XOP. So in XOP, assuming that it had lower spread, look at the return on XOP. The premium on XOP right now and it uses past mistakes anyway, the premium right now is great, right? The premium right now is great in XOP. Spread’s a little wide, but the premium is good. The premium would’ve cleared that threshold.
You’re getting compensated a lot more for the relative risk that you’re taking in XOP vs. in EEM. Next one here, let’s look at GLD. GLD clears the threshold for pretty much most of them, right? So GLD has a really low spread, and the rate of return is just over our threshold. Right? So, if we use some of our regular, normal settings for the bot as we go, which we’ll do here in a minute. Then it probably is going to enter a position in GLD.
All right, we’re not going to stop there. We’re going to add some more. We’re going to add some more. Not smores; we’re going to add some more to this as we go. Okay, we want to check the rate of return threshold. Now we’re going to add another decision to this block, and we’re going to use this probability recipe. I love this one. You can check different probabilities inside your bots.
So here, I want to pull the same opportunity. Again, we’re just reusing the same stuff over and over again. Once we built it once, now you see why we did that because we can just rebuild it over and over and over again. We want to check the chance of profit. I want the probability of profit to be over a certain threshold. Again, this all makes logical sense. Why you would want to do this? Like if you’re not checking this right now, like what are you checking?
So check and see if the chance of profit is more than some amount. We can type in something like 50% if we want it to. But that doesn’t help us; we can make it flexible. So we’re going to create a new custom input. We’re going to add a new input field for this, and we’re going to call this the prob of profit. We’re going to set the default to 55%, which is a pretty decent threshold for iron butterflies. They’re usually around 50-60% threshold, right? We’ll set at 55 now. It’s gotta be at least 55% probability of profit. And then you can say probability of profit on the iron butterfly position. Okay. One t instead of three t’s, and we’re good to go.
So now we have our new custom input. We can check bid-ask spread, we can check the rate of return, and we can check the probability of profit. Again, we’re using and statements between all of these because we want them all to be true in order for us to send the order to our broker. If one of these is not true, forget it, don’t send the order to the broker. They all have to line up. But we’re not done yet.
I told you guys, we’re going to dive deep into these filters. These are the things that I don’t see people doing enough inside the Community right now. Use them. They are so powerful for you.
So we’re going to add another filter. We’re going to go down here; we’re going to use the same recipe. We’re going to use the same recipe to filter, again, that same opportunity. And this time, we’re not going to filter the chance of profit. We’re going to filter the chance of max loss. We want the chance of max loss to be less than some amount. So this is pretty cool. So it’s going to calculate the probability that the stock ends at a point that creates a maximum loss scenario for that iron butterfly.
So yes, calculate the probability of making money on it. That’s good. But also calculate the probability that I encounter a maximum loss scenario on the trade. Again, I don’t see people doing this enough, which is why I am going through it here inside of the workshop. So I want to create a new custom input for the maximum loss. I’m going to call this probability of max loss. We set the default value here of max loss super low, 5%. Five, five percent, okay? Maximum probability of max loss on an iron butterfly position.
So if the iron butterfly that I am about to get into has a probability of max loss over 5%, forget it. Don’t enter the position. Everything else could be great, but if that probability of max loss is over 5%, then don’t do it. That’s pretty cool, right? Like you can tell it like, if the probability of max loss is 50%, would you want to know? Would you want the bot to check that? Like everything could be good, but you’ve a 50% chance of reaching a maximum loss potential. Probably want to have your bot check that.
So we’re going to add a probability of max loss in here. But we’re not done. This is all cool, right? You guys like this? But we’re not done yet. We can keep going. Keep going, keep going, keep going. And it’s 5% of the max loss, 5% probability for that position. Like 5% probability, you reach that level. We’re going to add even more.
By the way, you can split these up into multiple decisions if you want to. I just like to add them all here in this one decision. We’re also going to check and see if the opportunity has some good liquidity for the different legs, right? That’s an easy one to check. So we can check and make sure there’s enough liquidity.
bid-ask spread would probably do this by default for you, but you could also check one by one. So you could pull in the opportunity that you’re checking and look at the short call leg or the short put leg. It doesn’t matter; you can just toggle this back and forth. You want to look at the short call leg and make sure that the open interest, and notice all the things that you can check for an individual leg.
You can micro analyze an individual position every single time the automation runs. And I know you can’t do this as a normal human because it’s impossible to do. You can’t do this. So you can micro analyze every component of an individual leg in an opportunity. So we can say we want the open interest for the short call leg to be greater than some value.
Again, you can type in the value like 1000 if you wanted to, like 1000 contracts of open interest. But what we can do here is again use a custom input. We can use a custom input called short leg open interest and say maybe the default is 1000 contracts, so let’s just use a lower default right now so we can see if it works.
And then this is the minimum open interest on any short leg of the iron butterfly. Okay? 500 contracts. If it doesn’t have 500 contracts, forget it, skip it, bot. Check again in 15 minutes. If in 15 minutes it’s got 500 contracts of open interest, great.
So we added the decision to check the short call leg. We can add another decision to check the short put leg, which is what we’re going to do. I told you I wasn’t going to stop at these. I’m going to add lots of these. So now we’re going to pull the same opportunity, and now instead of checking the short call leg, we’re going to check the short put leg. We’re going to check the same open interest, and we’re going to check the same value, and because we already created a custom input, this is what so cool about this. So follow me on this for a second.
Because we already created a custom input for open interest. We can click this blue icon and select the same custom input that we just created. Do you see how I did that? So I’ll delete it and add it again. So because we created a custom input, we can select the blue icon and connect this to the other input that we used, which means that we can change the custom input one time, and it flows through. Flows through all the way. Once we’re good to go, we simply hit save.
Now we’ve got all these different checks that we want the bot to go through. There’s a lot of checks. And note how you use those inputs is to make those more or less flexible depending on how you want to trade. So once I have all of these in place, then I want to go ahead and save. Okay? Once I have all these in place, I want to go ahead and save. I’m going to modify this, right? That’s a bunch of stuff right here.
Did this iron butterfly has all my filters? That’s it. I can just say that, right? If I click on it, I can see all the filters that it’s choosing. But I’m just going to modify it, so I just know exactly what it’s doing inside of the automation. Now we’re going to test this again. So we’re going to test this logic now. Again, let’s set some high bid-ask spread threshold. So we want to clear that bid-ask spread threshold just for now in the test. In reality, we set it lower and let it do something small.
Rate of return has to be 40%—probability of profit over 55. Max loss no more than 5%, and short leg open interest for both; the short call leg and the short put leg, has to be 500. Okay? You ready to go? We’re going to start the test. Click the button to start the test. Boom, test is done. Now we go down here to EEM, and we see where did it fail.
Well, we know that EEM failed right away at the rate of return threshold. So the bot didn’t need to make any other decisions because we told it as soon as you fail on one of those decisions, don’t enter the order. So the bot saves us a little bit of processing power and cost by just not making that next decision because you told it to forget it. Don’t make that other decision.
Let’s go here to XOP, okay? Let’s see where XOP failed. Oh, XOP was close. XOP was really, really close. All right, forget the bid-ask spread because we know it’s high. The rate of return was 67%. The probability of profit was 58%. And the probability of max loss was 5%. Exactly 5%. We told it had to be less than 5%. So probably at the next run, that one would have gone to the next step. But do you see how now it’s starting to make more decisions for you? That’s pretty cool, right?
Okay, so let’s go to the next one. Let’s go to GLD. GLD’s rate of return was great. Probability of profit just under that threshold that we needed. Just under that threshold that we needed. Again, could’ve been the next automation. The next time it runs, pricing was better, market conditions were-, right? It could’ve been at the next time it runs; market conditions were way better for this opportunity. That’s okay. Let the bot check, right?
Next one, XRT here. You can see probability return was great, probability of profit, 42%. Maybe that’s good for you, you can adjust them as you go, but now you can start to see where things are kinda coming in. Let’s go to the next one, IWM. IWM, great rate of return, bad probability of profit. QQQ, again, same thing, right? You go all the way down through all the different decisions. You can see exactly what the bots are doing at every single step.
And then you go to this all these ones that are really, really wide, right? For the time being. And if you want to test this logic, you can say, okay, I want to test this logic. Let’s say 7%. Let’s see if XOP crosses this threshold. So now XOP, look at this, right? In this case, with XOP, you pass almost all the liquidity checks, except the open interest does not high enough just yet. And it might be higher later, which is great. But if you want the open interest check in there, you could have the open interest check in there, right?
In this case, it met all of your criteria except the open interest check. And that’s okay; this is why you test. This is why you go through this logic to ask yourself now what I have gotten into this position like is that enough liquidity, right? Maybe it is, maybe it’s not. Right? I don’t know. What do you guys say in here? Like is that enough? But a lot of these pass the master. If you want to call that. It passes the requirements that we want it for.
Last thing I want to do here is I want to set a ticker list as an input, okay? I want to say ticker list as an input. You’ll notice that we did a lot of inputs for things inside of our filters, right? We did a lot of things inside of our filters. So now what I want to do is I just want to do the same thing, but with this ticker list.
So inside of this automation, these are tickers that we told the bot to use. In this case, if we ever want to change these, we have to go all the way in here and modify these tickers. We can do this a little bit easier by now creating an input for these tickers, okay? We can do these a little bit easier by creating another input for these tickers.
So I’m going to go over here to the icon to the right that I’m hovering over right now, a little blue icon. I’m going to click on that to create a new input for these symbols, and I’m going to call this my ticker list. Whatever you want to call it, right? You can call it targeted tickers. Whatever you want.
Then you can set all your defaults. So these are the defaults that it will use unless you change it, which I’ll show you here in a little bit on how you can change it. And then you can give it a description. The list of tickers the bot will scan through for new positions. Whatever you want to call it. Then go ahead and save.
So now it’s got a custom input which is so, so cool because now you can swap out these tickers super, super fast as you add this to other bots, or different bots, whatever, without having to go all the way inside of this automation. And then we’re going to go ahead and save.
So now it’s going to loop through my targeted tickers. Again this is my, all these new inputs that I’ve created are all listed here for organization for you, and I’m ready to go. So once I’m going to, I’m done building out this automation, okay? Or making any changes to it. Now I’m going to go ahead and just exit out of the editor, and now look what pops up.
Now, this is where I’m not testing anymore. This is really important, so pay attention. I am no longer testing. Now my automation is built out, and these are the inputs that I’m about to set for this automation. Now it’s pulling the default values cause it’s the first time that we’re using this. But now is where I decide the hard numbers that I want the bot to use.
So, I will go here, and I will say, okay, use 15 cents. Rate of return threshold, maybe we’ll set it at 35. Probability of profit that can be 55. Max loss 5%. Short leg open interest, 500. Targeted tickers, that’s my default list, right? And then I’m going to go here and save. And now my automation has now added to the scanner section.
Now watch this for a second, okay? Watch this for a second.
So now what we’re going to do is we’re going to say let’s say you want to go and change something inside of that automation. If I highlight the row and just click on the row, I can modify any of these fields that I use as custom inputs. Let’s say I’m not getting enough trades, and I want to reduce this to 250. Just simply make a change here to this input. I don’t have to dive all the way into the automation. I can just make a change and then hit save.
And now my new custom input is being used inside of that scanner automation. So you go in, and you go like, ah, I don’t want to do this. I need to change my tickers. We’ll go down here to your ticker list.Â
You’re like, I don’t want XRT anymore, I want TSLA. Whatever, okay? You just swap out TSLA and XRT. And now you save. And boom! You’ve got now a new list of tickers to go through. Right? That’s it. Boom! Done.
You want to go in here, and you want to change the probability of profit? You want to make it higher, so it’s 6%. Probability of max loss under 3%. You change these, save it, and you’re done. Now we have our scanner automation built. You guys ready to build the monitor?Â
Remember, inside the scanner, this is everything to get to a close position action. Everything to get you an open position action. You’re telling the bot everything it needs to do to open a position. Great.
Now we’re going to build out a monitor automation. So we’re going to add a new monitor automation. We’re going to build it out. We’re going to call this our monitor for sequential iron butterflies. Okay? That’s what we want for the iron butterfly. And now remember this monitor automation; here’s the thing to remember, this is a new automation that is used as a monitor. This is a new automation that is used as a monitor, which means its goal in life is to manage positions for you, right? Its goal in life is to manage positions for you.
So you’re going to tell the bot all the things you would want it to do and all the scenarios in which you would want to close the position. Do you want to close it with a profit? Do you want to close it when it’s at a loss? Do you want to close it when it gets near expiration? Like, tell the bot all the different scenarios in which you would want to close the position.
So the first thing that we’re going to do is we’re going to add an action, and just like we started our scanner with a symbol loop, this time we’re going to start this monitor automation with a position loop. I know. That’s super cool, right? Because you can now loop through all the positions that you have. Just like a symbol loop, it’s looping through symbols looking for positions. Now that you have positions, you can use a position loop to have the bot pull in all the information and loop through each existing position that it has.
So we’re going to add a position loop, and we’re going to specify that we only want the bot to go through iron butterfly positions. Now, in this case, with a bot like this where we’re only entering iron butterfly positions, you could say any position. But if you ever used this automation someplace else, because you can. You can use automations and interchange them in bots as you’re going. Maybe you’ll have a bot that also enters some other type of position.
I always like to specify exactly the type of position I want this iron butterfly to manage. And all the positions, yes, they were made by this bot. This particular bot that’s trading. Any iron butterfly positions go through this automation. Now I’m going to save.
So, bot, anytime I have a new position, loop through that position and start to make decisions, okay? So let’s add some decisions. Well, I’m going to go to my recipes here and notice I can use all the same decisions recipes that I had before, but now I have this extra-special category in here which I can use called positions, right? It’s called positions. What do you think position recipes are used for?
Well, they’re only used inside of your monitor automations because you have to have positions in order to make decisions on positions, right? Kinda seems intuitive. Now we can start to make decisions based on how many different criteria of any position that the bot has. Any position that the bot has, right?
So what I’m going to do is I’m going to say, okay, I want to see if the premium on the position. We’ll use this first decision here. This is what I always like to do, by the way, is I always like to check for a profit first. Seems like the easiest one to do is like does the bot have a profit on a position? Every time that my monitor automations run, I want to first check and see if I have a profit. Cause if I have a profit, boom, send an order to the broker right away.
So now, you going to fill out your recipe. Select the position. What position? Well, we're going to select the position that it's currently looping through. Whatever position that is. If it's got five positions, it'll go through each of the five positions one by one by one, right? Make sense. It'll go through them one by one by one. It will check this one, then that one, and that one, and that one.
Check and see if the premium decreased by a certain amount. Now, remember, iron butterflies, when the premium decreases, then that means you have a profit. You could also use premium increase as a stop-loss decision inside of your bots. But in this case, we're using it as a profit decision. So did the premium decrease by some amount since it was opened. Say 50% or 25%.
Again, you can type this in, and then it'll always use 25. It will check every single position to see if the premium went down by 25%. Or you can create a custom input for this field and make it flexible like I'm going to do now. Profit target. Default value 25%. The percentage decrease or an iron butterfly position representing a profit. Okay?
So now I can check did the position go down by my profit target? If you want to, you can rewrite this description to make it more descriptive of how you're using this. Do I have a profit? Do I have a profit? That's it. Do I have a profit on this position? Yes or no. Super, super easy. Do I have a profit? Yes or no. If I have a profit and it's going down the yes path, what do you want the bot to do? Super simple. Close.
Please bot. Yes, go ahead, take some money off the table for me. So down the yes path, I'm going to add an action, and the action is going to be a close position action. What position do I want to close? Because you gotta tell the bot what position. Well, I want to close whatever position you're currently looping through. Whatever position you're currently looking at, if it gets to this step, close that position.
And now you have to tell the bot how you want the orders sent to your broker. Because that's the only other thing that the bot needs to know. The bot knows exactly what position. You don't need to tell the bot what position. The bot knows. The bot is connected to that position through the input. Now you need to tell it how you want the orders to go to your broker.
Well, if you have a profit, I would be like normal or patient for taking that profit off, right? I would be normal smart pricing, and I would do something like, I don't know, 60% of the bid-ask spread. So try some pricing, try to get better pricing, but if you don't get better pricing, you can go 60% of the bid-ask spread. Which means it will likely sit there for a little bit. Maybe it might take multiple attempts to fill the trade, and that's okay.
Do you guys understand that's okay? Like I think too many people are rushing to get in or out of positions. But like it's okay if the bot sits there for a while and enters an order. The order gets canceled, and now it has to go back and enter another order the next time. That's great. That's what I want the bot to do. Try for great pricing; if it doesn't work, try again the next time.
But it depends on how patient or impatient you are for getting positions off, okay? So, we'll let it go 60% of the bid-ask spread and then go ahead and save. Really, really easy to do. Do I have a profit? Did it go down by 25%? Yes? Okay, great, close the position. If the answer is no, what other things would you want to check before the position's closed?
Do I have a profit? No. Okay, bot, smarty pants. Go ahead and check and see if the position expires in a certain number of days. Super simple. Here's the recipe right here. Position expires in less than exactly more than a certain number of days. So we're going to select the position. Again, you just connect it to the position it's looping through. Repeat for each iron butterfly position. Yes, thank you. The position expires in less than a certain number of days.
Let's say three market days, okay? If the position expires in three market days, what do we want to do? Close the position. So now we add another action to close the position. And now notice, we have two close position actions added to our monitor automation. But they're under different market conditions.
You're telling the bot all of the different conditions in which you are allowing the bot; you, as the trader, you are allowing the bot to close the position. Bot, if you have a profit, you may close. If you don't have a profit, please check and see if the position expires in three days. If the position expires in less than three days, yes, you may close the position. 100%, right?
This is the control that you have. You are telling the bot all the decisions you want it to make. These are your workers. They are working for you, making the decisions you don't have to make anymore. Or don't have time to make or forget to make or whatever the case is. Now, the position expires in less than three days. No. let's say the position doesn't expire in three days. What would you want to do at that point? What other decisions would you want it to make?
Here's the one that we're going to use, okay? You can modify this and do as many as you want inside of your account, okay? But here's the one that we're going to make. We want to check and see if the bot is getting challenged on the long strikes, on the long strikes, okay? Cause that makes sense to me that I might want to close the position if the bot is getting challenged on the long strikes.
If the stock has made a gigantic move, gigantic move, I might want to close the position if the underlying price is above my long strike or below my long put strike, okay? So what I'm going to do here is I'm going to add a decision first, and I want to make a decision to see if the position, if the position's underlying price is above or below some threshold that I set which would be the strike.
So is the position, what position? Well, whatever position am looking at, is the underlying price above my long call strike? Which is just all the default settings for this particular scenario. So if I sold an iron butterfly and I bought the long strike $20 out, if the underlying price is now $21 higher, maybe I close the position. The position's underlying price is above my long call strike. Let's go through and save this.
And then I'm going to add another decision here to see if the position's underlying price is what? Below my long put strike. So I'm going to check both of these. In this case, all I need to do now is I need to swap this to an or statement. So, Mr. Bot, check and see if the position's underlying price is above my long call strike or because the stock can't be in two places at one time, right? Or, the position's underlying price is below my long put strike.
Super, super easy. If the stock has breached one of those long strikes, then what do I want to do? Potentially in this scenario. Did the stock breach one of my long strikes? What do I want to do in this scenario? I would want to close the position. Did the stock breach one of my long strikes? Yes. Okay, go ahead, close the stinking position.
There you go, bot; you got all the different scenarios in which you could close the position. So here’s what I’m going to do. I’m going to click on the gear icon of this decision that I’m on right now, and I’m going to go down to the choice for “precede with.” Just like we did before in some of the other examples.
I want to precede this decision with another decision. And I’m going to precede this with a decision, and I’m going to call this decision all the way at the bottom of the list, and it says, switch. Switches are so cool, and you’re going to love them. We use them inside a lot of templates already, and they literally have the ability to turn off or turn on a switch which can turn off or turn on parts or entire versions of your actual bot. Okay?
So I’m going to select the choice first switch. And I’m going to create my switch. I don’t have a switch here, so notice when it says select your switch, I don’t have a switch. I’m going to add one. I’m going to add an input that’s a switch, and I’m going to say close. The name of the switch is going to be close if the long strike is breached. You would turn on to close the position if either long strike is breached.
They get very, very specific to what you’re doing. The default value for this switch could be off. I will default it to off for now. If you want to close it, you just come in, and you can just turn it on. I’ll show you how to do that here in a second. So once I add this, now I’m going to check and make sure that I only go down the yes path if that switch is turned on. That makes total sense. Close if long strikes are breached is turned on. Yes, great. I want to add this to the yes path, which means that as it starts to make its decisions, it would only check and see if the strikes are breached if my switch is turned on. How cool was that?
So inside of my automation, I can micro-control certain decisions at the flip of a switch. I can micro-control certain decisions at the flip of a switch. Once I exit out of this automation builder, now you can see my new input show up. What is your profit target that you want to target? 25%. Do you want to close if your long strikes are breached? And watch this. Turn it on. If I turn this on inside the automation, it will now go down that path if it gets there.
If I don’t want to turn it on, turn it off. You want it on? Turn it on. In your version of the template, you come in here, and you turn it on if you want to. So when I save this now, my automation gets added to my monitor section. If I, later, like once you clone the template if you want to come in here. You want to switch this? Just click on the automation and turn it off. Done.
You want to come in here, and you want to change the profit target. You’re like, Kirk, I want a bigger profit. And yes, of course, I want to close if the strikes are breached. Great, turn it on. And then you can see your new inputs right here. That’s why custom inputs are so powerful because that fast. That fast, you can do this, inside.
Okay, so this new bot is completely built out at this point. We have our scanner built out. It’s going through a list of tickers, asking some really important logical decisions, filtering trades, and if everything checks out, sends an order to our broker, enter a new position. Then the monitor automation starts picking up the slack of the new positions, starts managing that new position. First checks for profit. If it has a profit, close.
Then checks to see if the position expires in three days. If it does, close. Then it checks to see if a switch is turned on, and if that switch is turned on, then it checks to see if the stock is breaching one of your long strikes. And if that’s the case, then it closes. That’s a lot of different decisions and automations right inside of you. Before you get to the long strikes being breached, you could add another decision to check and see how long the position has been opened.
So only if you are breached, and if it’s late in the expiration cycle, could you close the position? You see how you can group things together like that? So, an early spike in the trade would not close the position. Make sense? You could add this right here inside of this group decision right here. So you’re going to check and see if it’s spiking and if it’s late in the expiration cycle.
If it’s early in the expiration cycle, and it’s a spike, maybe you don’t close. And that’s one way that you can avoid it. So again, just think through this logic as you’re building out your bots. You can build so much logic into this. So much logic and watch what other people do in their bots. There’s so many things you could do. I mean, we haven’t even scratched the surface with like tagging and using position and bot tags for statuses.
 Genesis three series is crazy as we start to go. Like genesis one, two, three bots and all the videos around it show you can progressively get more advanced with your bots as you go. So here’s what we’re going to do now. You can have a direction time of the spike to filter out open craziness, yep, totally. You could say run the automation. It’s gotta be after. You could say that you want the automation to run. Let me go in here and show you, right?
You could say that you want the market to be after a certain time every day. Like you’d only close if the spike is after two o’clock or something like that, right? Yeah, you could do that. Or if it’s Wednesday. I don’t know. Whatever you want to do with it, you can do that.
So here’s I’m going to do. I’m going to go ahead and save this bot as a template. Here’s what a template does. So you have the super cool awesome bot that you’ve now created or a version of it. You can save this as a template. The template sounds just like what it is. It’s a template that is saved in your library. It memorializes this bot for you.
Guess what? News flash. We do not limit the number of templates that you can save. So if you’re just starting out, you can run ten bots, say on the starter plan, but you can save a hundred templates if you want to. Save a bunch of different ideas and then run ten at a time and see what works, okay?
So we’re going to save this as a template. You can save it as a new template; by the way, you can overwrite existing templates. So if you make changes, you can just save and update an existing template. Super, super fun. So now we’re going to save this as our sequential iron butterfly, and we’re going to call this one our bot workshop. I’m going to say enters sequential iron butterflies around 45 DTE with now overlapping positions, okay? Something really easy.
We’re going to set the position limits; you can set the cool little bot icon. I don’t know, let’s do something a little bit different. We’ll do this, and we’ll do like a calendar or something like that. I don’t know, what are we doing here? I don’t know. We’ll do a dog, okay. Doesn’t really matter. Go ahead and save it.
Now you can go and view your template. So these are all templates. Templates, templates, templates. These are not bots that you’re running. These are just a library of different ideas. That’s why we tell people all the time, especially if you’re new. You said me, me, me in here, for you’ve never seen this, go in, clone a crap ton of templates and save them to your library. Right? That’s what you do.
Just clone a bot. Save it to your template. You don’t have to run it. You can just go in and look at what it’s doing. So inside the template, it’s fixed. It memorizes all the different things. You can’t modify it in here because it’s a template, right? But you can create a bot from this anytime you want. You just go to the button to clone a bot from the template.
You can add tags. You can add your own private notes. So like all of my private notes about this template. This doesn’t get shared when you share the bot. These are your private notes. Maybe your research that you had, your different logic, your ideas, things you want to remember about it, right? So you could do this in here, right? And you could add text to this. You could add notes to this. You could do it right here inside your library.
Whenever you want to create a bot, you just spin up a new bot here and just create a clone. And now you’ve created a clone from that bot template, right? And you can go into your automations; you can modify anything in here. You’ve got a brand-new bot to work with. Or, if you don’t want it, you can just simply exit out of it.
So templates live in your template library. See my templates. These are all of your templates that you have. You have your sample templates which, by the way, these are where some of the ones I talked about, like the genesis template and other ones that are good sample templates you can go through. These are where they are. You have the top ones in the Community, popular ones that have been shared. Most cloned templates. They’re all right here. You can start with those.
In this case, I want to take this sequential iron butterfly one, and I want to share it into the Community. So I want to share this into the Community—New Iron Butterfly Template. I’ll modify the text from the bot workshop. Enjoy! Ready? Okay. Here we go. I’m going to create this template. And that template is now in the Community right now.
In the Community, right, right, right, right now. You can go in there. You can clone this and now guess what? Viola! You have this entire bot that we built out on the workshop together right inside of your account. When a template gets updated, guess who gets a notification that there’s a new version? You do. And then you can clone that new version, look at it, see what gets new, right? There’s a version history.
So if I update this, I can share a new version. And then all I would want to do is just simply clone that template and start running that or replace the automations like just swap up the automations with the new one. Yep. Sometimes you don’t want the new version. Maybe there’s a new version that gets created, and you don’t want that new version, right? So at least you get notified, and then it’s your choice what to do with that new version.
So you can add a comment and then attach a template. Save your version if you make a different version. Call it like bot workshop, you know, Paul’s version, Ann’s version, James’ version, Steve’s version, whatever. And share it back to the Community. You can share it as opposed and share that back, post back, and say, hey guys, here’s my version. I did this, you know, I modified this, whatever. Like here’s my version, enjoy! And then you share it back.
If you’re brand new like I’d love to know what the coolest thing you saw was. If you’re already a bot superstar and you’ve been here a number of times, I’d love to know what you saw that you didn’t know yet. Let me know in the chat, in the comments. I would love to know what that is.