Bot tags give traders visibility into a bot's statefulness so you can quickly see the bot's active state and the current market environment. Tags are an incredibly powerful way to instantly check in on your bots and positions and tell your bots how to dynamically adapt to the market.
Use bot tags to assess and react to markets, tickers, your portfolio and positions to automatically adjust entry and exit criteria.
For example, if volatility increases, you can tag your bot accordingly and tell it to reduce position size.
In this workshop, we detail many unique ways you can utilize tags in your bots with multiple examples to help guide you through setting up tags for different scenarios.
We examine a stateful example for an automated portfolio that is trading multiple strategies based on changing market conditions and help you discover new ideas for tagging bots and positions. We'll show you how to add tags, reset tags, and remove tags from your bots.
Click here to view and clone the "Stateful Tagging" example automations from the workshop.
If you're not an Option Alpha member yet, you can sign up for a free 30-day trial to access the Community and hundreds of shared bot templates!
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.
Hey, what’s up, everyone? This is Kirk here again at Option Alpha, and welcome to the live workshop here today. We’ve got a really super cool workshop for you guys. One that I’m personally very excited about because I think that this is a big differentiator for you and for your trading. I think this is a next-level type of thing that you can do as a trader.
So I’m super pumped to get into bot tagging and statefulness of bots. I think you guys are really going to enjoy this. I haven’t really seen this conversation happen anywhere. And so did a lot of prep work for this one to really kind of, hopefully, drive home a couple of really key points for you all. I truly think that bot tagging, position tagging is a wicked powerful, wicked smart resource. And I don’t think that people are using it to its full capacity.
I try to give you a framework because I work really well with frameworks. I don’t know if you guys do, but if I have a framework in my mind of how structurally something should happen and structurally how it works, that makes it super easy for me to then input my own, you know, parameters in my own like thought processes around it. So that’s what I did today. I tried to put together a structure, a framework for you guys. So you can use those moving forward. Okay?
All right, so let’s get started here. So here’s what we’re going to go through, kind of our overview for this workshop. Number one is I want to discuss high-level around stateful bot building and trading. I think it’s really important because think that you guys do this in your minds already. You do this mentally, maybe even subconsciously; you don’t even know that you’re doing it. But now that you transition to auto trading, start to remove your emotions, become more systematic. I think this is where it really helps out, okay?
We’re going to review an elementary example using weather and clothing to help you learn. Again, this is just my take on it. This is how I think about it. It’s building this framework. I hope that this really helps. I would probably guarantee that this webinar and workshop today probably helps more than just trying to do it yourself. So I really spent a lot of time kind of prepping for this one and making sure this one was, you know, a knockout home run.
Number three, we’re going to switch to a stateful example for an automated portfolio that’s trading multiple strategies depending on market conditions and just how we do it. We’re going to discover new ideas for tagging bots and positions, and I think you guys really will see how tags get added, how you reset tags, how you can remove single tags. You can reset all tags, take out some tags. There’s a lot that can be done with tags.
Time permitting, we’re going to explore bot tagging logic inside the hexabot. So when we did the hexabot, we really spent a lot of time going through and working through bot tagging logic to understand what the bot was doing and what it was currently working through, and it actually helps the bot itself kind of understand what paths to take.
What does it mean to be stateful? So this is just one trader's take. I’m not saying this is the end all be all because I know you guys are super wicked smart people. There’s insanely wicked smart people in here. So I grabbed the couple definitions that I thought were the most relevant to trading, right? so there’s stateful and it can mean different things for computing and computing servers, and enterprise companies, right? but really this is my take on it and why I think is most relevant for traders.
So number one, I think it’s the idea of being capable of retaining some sort of information about transactions or sessions or market dynamics and then referring to that process and being aware of its condition. Perhaps really in detail, which you can get really detailed on this, of the activity in which it participates. So it’s basically like the bot is taking notes as it goes along. That’s what I kinda think about in my mind and just like using tags to let the bot take notes of important junctures or important things that are happening as it’s running through automations. You could call tags notes in your mind if you want to and think about that, but that’s how I think about it.
And then the second part is that stateful services keep track then of these sessions or transactions or notes that allow them to react differently to the same inputs based on that history. So like based on what happened before, it can now react differently. Is that you’re basically taking your bot and making it a little bit more dynamic, right? You’re giving it some more control to adjust and to add and flow with different things that are happening in the market or with the bot itself or with positions.
Why should I care as a trader? This is really the big one. Look, this is the one that I think is the differentiator. I think, for you, as a trader if you can really like buy into this and start gravitating towards this. I think you see a demonstrative difference in your trading moving forward. I think you’re more calm. I think you’re more like elevated as a trader. You basically level up to yourself as a trader. Okay?
So why should I care as a trader? This is, again, my take on this. You’re already acting in a stateful capacity as a manual trader, but you might be prone to classic emotional biases. So think about it, when you’re trading right now, you’re basing your new decisions that you make; what positions you get into and what positions you get out of if you’re manually trading. You’re basing it off of the history of the market because you know what happened last week, you know what happened to your positions. You kinda know what happens, you know, what your portfolio looks like, like how much cash you have available, how many positions you have on, right?
You already have that in your mind and now either consciously you’re making these calculations or subconsciously you’re making these calculations. But as a manual trader, you are prone to classic emotional biases and psychological investor biases, right? Recency bias, you know, what’s some of the other ones? There are some of the other ones out there. The bias about holding on to things like legacy bias, right? You’re prone to these biases already. Okay?
So by using bot tags and position tags, what I think you can do is you can push statefulness to your trading bots, right? So you can do the same thing, which you are normally doing which is tracking things, making dynamic decisions on the fly, but now you push that to the bot which can do that unemotionally and more systematic, right? So you get better performance tracking, you get better execution of the strategy, all the values, and benefits of automated trading or using some sort of system.
This means bots can retail information and they can be aware of conditions around it and the bots can react differently if needed. I want you to like think about this for a second and just like really hone in on this. This is insanely cool. If you take the time to kind of put this stuff together, if you want to, right? Or, you know, mix and match from what you see in the community. You can have your bots retain information, tags itself at a certain point, be aware of different market conditions or conditions of the bot portfolio, and then using that information react differently. Okay?
And so what we’ll do today is we’ll do kind of a very basic example, then we’ll start doing some more advanced stuff and then we’ll look at the hexabot which does this crazy. There’s other bots in the community, which do this on an even crazier level where they tag like position one, first position in, last position in. It’s insane what they can do.
All right, so here’s what I think, right? I think you basically have, and this is not the end all be all, okay? So I’ll say this. This is not the end all be all to how it’s done by any stretch, okay? So please do not say that this is like, you know, come back and say, wow, Kirk said that you had to have four ways to do it. Okay, you don’t. Here’s how I think about in my mind and I hope this presents basically a framework to use. But I think about it in four quadrant metrics.
When I think about bot tagging, position tagging, I basically think about it in four quadrants, okay? and you could use a part of this. You could use a subset of this if you wanted to. So you don’t have to do all of these. You could do a portion of these, but I think about them in here. So top left one is entry assessment. So, again, you could do this inside of a single automation, you could split it out. I’ll show you different ways you could do it here today in the workshop, okay?
So I think the first quadrant, the top left, is the entry assessment. So basically you’re asking the bot to assess what is the state of the market or the ticker I’m targeting to trade. That’s really like, again, there’s multiple ways you can do it but that’s what we’re going to be going after here today. It’s like do some sort of entry assessment like assess the situation here. What is the situation in the market currently?
The next quadrant down, which is entry reaction, okay? so like now you’re going to react to the assessment, right? That’s the whole idea around statefulness is to assess, track and then react to it potentially is how should I adjust my entry based on these conditions? Okay. So now your first thing you’re going to do is entry assessment, that’s quadrant one. And then you go down to the green box which is entry reaction. So taking that information that you use to tag the market, the bot, blah blah blah, and making potentially different decisions. Now, that doesn’t mean that you have to make always different decisions. It just means you could be looking for one particular set of criteria and then you make different decisions, okay?
The next quadrant over is the like right half of the slide here is kind of the exit side. So you could do the same thing on exit, which is you can assess the state of the market again, if you wanted to, like what’s the market situation and how might that dictate how I exit my position. or you can assess your portfolio like how many positions do I have, what’s my total PNL or you can assess individual positions like what is this individual position’s PNL?
So there’s all types of assessment that you can do at the exit level where you’re starting to manage your positions, right? And then the bottom right quadrant is exit assessment or exit reaction, which is, okay, how do I adjust my portfolio based on management of these different conditions? So now you’re basically taking, okay, what’s happening in the market? What’s happening in my portfolio? Essentially what’s happening in my bots or my positions and how should I adjust. Should I move my profit targets lower? Should I do something else, right? Should I exit all my positions, right? Like what should I do? Should I keep all my positions on? Should I remove my profit targets, right?
You guys are making these decisions all the time, okay? But this is how I kinda think about it. There’s an assessment level and then there’s a reaction level based on those assessments and then if you split left and right, there’s an entry like criteria scanners and all that. And then you have your monitors, which is your exit.
What you’re basically doing is you’re basically trying to assess what you should do around every corner and curve, okay? So, for example, if you’re driving down this road, your mind is making an assessment as you’re driving down this road and your mind is telling you, okay, what’s happening? What’s the environment that I’m in? I’m in a nice sunny environment. There’s blue sky. It’s open road. There’s nobody coming next to me, right? The road looks pretty, like, dry, it doesn’t look wet or snowy, right? So you react differently. You potentially drive a little bit faster. Maybe you don’t pay attention as close. Maybe you have one hand on the wheel vs. two hands on the wheel, right?
If you’re like me, you downshift and you try to hit third gear around this corner. So you do different things as you’re kind of driving down this road, okay? Now, what happens if the market conditions and the environment changes. What if you’re driving down this road now, right? So now you’re driving down this road. This road is completely different. It’s a whiteout snowstorm. You have a car in front of you. You can barely see. So now you react differently. Maybe you slowed. I hope you slow down, right? You slow down. You pay attention. You turn off the radio. You certainly not on your phone or like paying attention to any of that stuff. You react differently based on these conditions.
And so what I want to do is I want to give your bot the potential to do the same thing. Does that make sense? Now, look here’s the thing about tagging and statefulness. Most of the times we’re driving on roads like this, right? Especially if you live anywhere in the south, you rarely driving on roads like this. But when you come to Pennsylvania, or you come up here to the north, potentially you’re going to drive on roads like this for a season and that’s okay.
And that’s what we want our bots to do. We want our bots to recognize if they’re in a different environment, if something is different than they adjust for just that environment and then come back to the regular kind of environment that they’re in. So this is just one example and then we’ll go through more as we go.
If you are looking at your bot, right? And you have an entry assessment that you want to check and see if the VIX is over 50, okay? this is just one thing that you could potentially check. So you want to assess every day or even right now like is the VIX over 50? Now most of the times it’s going to be under 50, right? Just like you’re driving down a normal clear route, right? But the time that it’s crazy and the weather is really bad and the VIX is over 50, what do you want to do? You want to react differently, so you might enter now iron butterflies and reduce position sizing, right?
So 99 times out of 100, you’re entering your regular standard positions. Whatever you want to do. Now, with position size, when the VIX is over 50, you react differently, right? You tag the bot as VIX elevated, blah blah blah, we’ll give you some examples and then you adjust how you enter positions.
On the exit side, let’s use another example. Let’s say that the bot has a massive open profit, right? so now what you have is you have this massive open profit on all your positions. So it doesn’t matter what is going on in the market, it doesn’t matter what the market conditions are. The only thing you’re checking this time is do I have this massive open profit? Do I have this big fat profit that I’m sitting on and if I do, then go ahead and exit all my positions regardless of my typical profit targets, right?
So that’s a really cool use case for like you abandon all of your traditional profit targets, right? Your regular 50%, you know, 75%, 25%, whatever because if the sum of all your positions right now is a massive profit, maybe you just want to completely get out of the market, right? So you could do that where the bot is stateful and aware that the sum of everything it has is a big fat profit and then you exit all positions. Okay?
All right, so here’s what we’re going to do. What I’ve already built is I’ve already built a sample for you guys, okay? And it’s this one right here. This is the stateful tagging bot workshop sample, okay? So if I go to the automations here, I want to give you just another, just one more elementary example with weather and clothing because I think as we start to build this process together you’ll start to understand and I hope it makes a little bit more sense as we then get really deep into an actual example with bot tags.
So the first thing that you would have is you potentially have a scanner and your scanner is the assessment level, which, again, going back to our slides. Remember our slides, right? There’s some sort of assessment that you do and then there’s some sort of reactionary decision that you make, right? And that’s kind of how I think about using bots and tags and positions and tags and stuff like that, okay?
So the first one is the scanner called what’s the weather forecast, okay? And it might look something like this. So the first thing that you do when you fire up your brain automation for the day is you go in and you check, and you basically tell your brain, okay, it’s a new day so let’s check the weather, right? and this is an important step where sometimes what you have to do is you have to reset the parameters, like yesterday was done, today is a new day, right? You could see how this hopefully will start to transition over to bots and trading.
So the first thing we do is kinda reset our brain and say, hey, it’s a new day, let’s now check the weather forecast. Okay? Then we go down to a decision. And the first decision that we get to is is it expected to rain today? Like is there with rain in the forecast for today, right? And the answer to that question could be yes or no. yes, it’s expected to rain. Okay, great. So what we’re going to do now is we’re going to go ahead and we’re going to tag the bot as our tag or our weather forecast, whatever, I’m going to say bot. But tag ourselves as possible rain, right?
So note what we’re doing here, and I think this is a really important part is that as we are going through the process at major junctions, we are documenting what has happened or what the current state is, right? Do you guys see that? So it’s not, and you can do this at the end if you want to, you can do it midway through, you can do a combination to this. But what we’re doing is we’re documenting so that the bot is tracking what the current state is.
So in this case, we’re tracking our weather forecast and our state right now is possible rain, right? that’s our state. Okay, we documented possible rain as expected today. Awesome. The next thing we want to do is make another decision like, okay, well, there’s rain expected but is the chance of rain over 50%? Right? That seems like a logical thing like there’s rain in the forecast. Okay, well, is there a lot of rain in the forecast, like we’re going to get a hurricane, or you know, is there just like light sprinkles here and there, right? It’s probably going to be a nice day but a light sprinkles here and there, right?
Okay, yes, the chance of rain is over 50%. Awesome. Okay, tag my weather forecast as get a raincoat plus an umbrella because it’s likely to be really really rainy all day. In fact, if you come to where I live in Pennsylvania, that’s most likely the case. It’s going to be super rainy all day, okay? Now, if rain is not expected, we’ve reset ourselves for the day. If rain is not expected, then we tag it as sunny day, right? There’s no rain in the forecast. Okay, awesome. But just because it’s a sunny day, doesn’t mean that we don’t think about other things, right?
Now we think, okay, well let’s make another decision. Is the temperature going to be 70 degrees? Well, it’s going to be sunny, but is it going to be sunny cold or is it going to be sunny, you know, kinda comfortable? And so if it’s sunny and over 70 degrees, tag myself as I want to wear shorts today. And if it’s sunny but the temperature is going to be under 70 degrees, so the answer to that question is no, then tag myself as wearing pants.
All right, so let’s close this one out, and let’s get down to the next one. So then what I can do is I can, in my brain, once I’ve assessed the weather and then your bot, once you’ve assessed the weather, then what you do is you start taking some actions, right? So inside the bot, basically what you’re doing now is you’re taking that information and now I’ve split this into two automations because of the framework I used with you guys, right?
Where you have assessment and then you have reaction, but you could do this in one automation if you want to, just be a bigger automation. We did this in the hexabot. We did a lot of it in the hexabot, but now what you’re doing is you’re taking that information of the market condition, the weather in this case. And you’re reacting differently by putting on different sets of clothes and changing what you wear for the day.
So now you ask the question. Okay, now, did the weather forecast expect possible rain? And that’s all I’m looking for. So, in this case, you’re looking for to assess like was there possible rain? Yeah, there was rain. Okay, great. Was the chance of rain over 50%? Yes, great. Wear a coat and bring an umbrella. So you have now adjusted the way in which you are going to react to the weather that day, right? You’ve assessed the weather and now you’ve adjusted the way you’re going to react to the weather.
Now if there’s rain but the chance of rain was not over 50%, then you don’t need a raincoat. So no raincoat needed but bring an umbrella. That’s what you’re going to do, right? You’re going to bring an umbrella but you really don’t need to wear a raincoat or a poncho or whatever. Down the no side, same thing happens. Was the temperature expected to be over 70 degrees with no rain? Great, wear shorts and a t-shirt. No, it’s going to be sunny but the temperature is going to be low. Awesome, wear pants and a long sleeve shirt.
Do you all see how you can go through the same process just now assessing what tags were added based on market conditions, okay? I know this is a very basic elementary example, but I really hope that it drives home the importance of doing the assessment and documenting it as you go, and then using that information for your bot.
So here’s what we’re going to do. Number one we’re going to go through, again, and this is kinda like the four quadrants that we work through. So the first thing that I would do and you could do this inside of your bots too is I would run my scanner to say like what is the state of the market, okay? Again, you don’t have to do it this way, but because you can run multiple scanners, this is a great use case for running multiple scanners inside of your bots if you want to. Run a scanner that just does the tagging if you wanted to and then run something that reacts to the tagging or throw it altogether if you want to in one, okay?
So, the first one that I would run is something called like scanner one state of the market. And the goal of this is to assess what’s going on in the current market, right? That’s what you’re doing. Like what’s going on in the current market. So using our framework from before, let’s walk through this.
The first thing that we’re going to do in this particular scanner is reset the bot tags. We’re going to reset the bot tags to having no tags like clear the deck of what’s going on. Now look, this is really cool because you could do this if you run this automation like in the morning. You could do it once if you want to, or like I like to do in some of my bots, particularly the hexabot is I reset the bot tags every time the scanner runs because the market conditions can shift so dramatically and if they did, I would want the bot to react immediately.
So one of the key things that I do in mind, again, you don’t have to do this, is I reset the bot tags a lot. And I don’t care, and the bots don’t care. They’re just processing information, so they can reset the bot tags all the time and basically preestablish the new market conditions every time they run, okay?
So first thing I do is go ahead reset the bot tags. Next thing I’m doing is making a decision, right? Is the ticker price above the 200-day moving average. Now, look, I’m going to tell you guys right now this is just an example, but it hopefully kind of like uses that same framework that we looked at. So go ahead and make all the decisions you want, but the concept still remains the same, okay? So is the ticker price above the 200-day moving average? Yes, great. Tag the bot as being in an uptrend, right? That’s what you could do. You could tag the bot that you’re trading because if you’re trading a bot that’s surrounded in one ticker, tag the bot as being in an uptrend.
Remember what you’re doing here. Just like you tagged the weather as possible rain, you’re tagging the state of the thing that you just analyzed that is critical for you to make decisions on, right? So with weather, it’s not so much important to understand like when the sun comes up and when the sun goes down and if it’s partly cloudy or mostly cloudy. It’s probably more important to understand if it’s going to rain or not, right?
So, inside your bots, determine what are the things that are really important to you that would then lead you to make different decisions. And one of those things could be trend like is the ticker in an uptrend or downtrend, okay? So, in this case, tag the bot as being in an uptrend. Now, you don’t have to do anything else after that right now, but you’re just documenting as you go. So we’ve tagged now trend, right? and notice if we’re not above the 200-day moving average, we’re in a downtrend so we tag the bot as downtrend, okay?
Next thing that we’re going to do is that if we’re in an uptrend, you want to make potentially different decisions. I don’t care what you guys do. I’m just showing you how you could do it here. In this case, you would say is the tickers' intraday RSI reading, the 14-day RSI. Like do I have a buy signal on RSI, right? That’s basically what it is. So is the RSI below 30 for the intraday reading, right? Yes. Okay, great. Tag the bot as having actively an RSI buy signal and if it’s not a buy signal then everything else for us would be considered neutral because maybe we’re just looking to enter one type of position or maybe a series of positions. Okay?
So now you have tags based on different paths as being uptrend with a buy signal or uptrend with some neutral signals, right? So that’s how you would kinda look at it. Remember that what we’re doing here, right? what we’re doing here is we’re tagging and documenting the different states that would be important to us for coming back to making new decisions. Now down the downtrend side, maybe when we get into a downtrend, we don’t care so much about RSI. Maybe in those market conditions, what we care about more is we care about, maybe and let me just like draw on the chart here. But in a downtrend, we don’t care about RSI. What we care about more is we care about IV rank.
So if IV rank is above 50, we want to tag the bot as having high IV and if it’s not above 50 then we just want to, and this is a popular one I like to use, which is just tag the bot as waiting for a better opportunity. This is a no trade environment potentially for, like there’s gotta be environments where you say, like, nope, I’m not trading in that environment and that’s okay. What you can do in those environments is you can go ahead and tag the bot as the state of the bot which is it’s waiting. Like it hasn’t really found a path in a valley, like an opportunity to trade and that’s okay.
And what you can do is you can tag it as waiting for better opportunity, so that you know later and your bot knows that it’s currently in a state where it doesn’t find anything but it still continuously looking. Now, let me say this. The reason why we would want to reset our bot tags potentially a lot more often is because what if RSI is currently at 31, right? so just run through this with me, so you can think about it.
If RSI is currently at 31. Let’s say the bot first goes through its scanner. Goes down the yes path, tags itself as in an uptrend, then the decision says is RSI a buy? The answer would be no, right? For that 31. If it’s currently at 31, then it would tag itself as neutral technical. And that’s okay if you want to do that and let’s say you run your automation to tag your bot in the day, in the morning, and nothing else for the rest of the day. Great. So for the rest of the day, it’s using this as its new state.
But if you want to, let’s say, run the automation every single time and reset the bot tags. Now the next time that the automation runs, let’s say that RSI has dropped to 29. Well, in that case, it will continue down the path, tag itself as uptrend, and then go down and tag itself as RSI buy signal. And because you reset the bot tags up at the top, it’s going to remove the neutral technical signal that you gave it earlier. So basically it’s going to react differently to that market environment.
So what we’re going to do now is we’re going to take all this information that we’re running right now. Okay? Or all this information that we’re collecting basically is we’re going to take this information and we are now going to transition over to reacting differently to it. Now, somebody said how many tags do you have in here? Well, there are a lot of different tags in here, but notice that the bot would only have essentially after it completes this automation., only two tags at any point. Because it’s only going to end down at these paths, right?
And so even though there’s multiple states, the bot only would ever end up with two active tags being on. Either I’m in a downtrend or I’m in an uptrend. And I either have an RSI buy or neutral or high IV and waiting for a better opportunity. So this is where you can add multiple tag environments, even though you may not even have all those environments trigger at the same time.
So here’s what we’re going to do. At this point we’ve now assessed the market environment, would you guys agree? And we have some information potentially on the environment or potentially some paths of information, okay? So now what we’re going to do is we’re going to go to our next automation that we’ll run and because I can order these automations, I can put them one behind the other one, right?
So the next automation that runs is the stateful position entry, which this automation is answering the question what position type should I enter? I’m now using the information that I collected from my first automation run for the market conditions or the environment that’s important to me and I’m now using this information to now potentially make different decisions. So the first thing that I have the bot do is to check and see if the bot has a tag that is in an uptrend, right?
Now, remember, I’m going to check now because I’ve already tagged the bot as the environment that it’s in for the position I’m looking at. So does the bot have a tag uptrend right now? Right? And if it has the tag downtrend, it will go down the no path, right? That’s all it’s basically doing. So does the bot have a tag uptrend? If the answer to that question is yes, then the bot would go down the yes path. And then it will assess and make a decision. Does the bot has a tag RSI buy signal, right?
Notice we’re doing the same thing we did in the weather analogy, right? Is it going to rain? Is the likelihood of rain over 50%, right? We’re just doing the same thing here and if the bot does have a tag for RSI, then potentially you want to open a short put spread. So now you are changing dynamically what position you get into based on the market conditions that you assess.
Now you can put this all into one automation. You can, but I’m deliberately splitting it out for this workshop so that you can, in your mind, compartmentalize a little bit and split out the different actions that you’re performing, okay? Assessment and then reaction. Now if the bot has uptrend turned on, and RSI buy signal is not inside the bot. Basically, the bot has the neutral technical so it does not have RSI buy, and the answer is no, then I want to open a neutral iron condor position.
If we’re good on this side, are we in an uptrend? No? Does the bot have a tag for high implied volatility? Yes. Great, open an iron butterfly position. Awesome, that’s what I want the bot to do. And if the bot is not in an uptrend and does not have high implied volatility, I just want it to end and not do anything. Remember, we tag the bot as waiting for a better opportunity because we knew we weren’t going to take any action in those environments, right? so we just simply just let it end, let the bot end and we wait for better opportunity.
So we don’t have to always make a trade at the end of a branch, right? We can, of course, go in and, you know, make different types of trades, but we don’t have to. Now here’s the other thing we can do in here too. This is a little bit starting to get a little bit more advanced as we go, okay? But inside of these open position actions that you are getting into, you can also tag the position when it’s opened.
Now, this is pretty cool for a couple different reasons. Number one is that you can make different decisions on these positions as I will show you when I give you an example. We’re going to build an example of this together. You can make different positions based on the state in which the position was opened or the type or however you want to tag it. What I like to do is I like to tag the position as the state in which it was opened.
So in this case, it was opened during an uptrend and within RSI buy signal because the only way it would’ve gotten all the way over here to open a position is in those environments. So that when I go back and analyze it or if I want the bot to make different decisions on it, I know the environment that the position was opened in. Remember being stateful is first about tracking and documenting the history and what’s happened. And this is one of the ways in which you can do it. That’s pretty cool, right?
So what you can do here is now for different environments, right? So look at this environment right here. For this one, the bot is in an uptrend, but RSI is not a buy signal so I’m in neutral technical. So what I did here is I said, okay, we’re in an uptrend but we’ve got neutral technical. That’s why I opened this iron condor. Now, this is important because later when we start doing some advanced stuff in the workshop on like checking the position tags, we can again make different decisions based on the tags and the environment that the position was opened in. Okay?
And then, of course, you have your last one here which is your iron butterfly. And notice the environment that the iron butterfly was opened it, right? So you have you’re not in an uptrend, you’re in a downtrend and high implied volatility. Great. So what you do is you tag the bot position as downtrend high IV. So now you’ve opened positions. You’ve gotten into positions, you’ve opened positions. You’ve tagged those positions, right? That’s all you’re doing. Okay? It’s just your opening positions and going through all of your stuff.
Let’s move to the monitors now. Okay? Let’s move to the monitors. Remember, let me just go back to the slides here for a second. What we just did, right? What we just did is we assessed the market and we adapted and changed, right? What we were doing based on the market conditions. We entered a put spread vs. an iron condor vs. an iron butterfly, etc., etc. Now what we’re going to do here is we’re going to focus on the exit side. Okay?
First, we’re going to assess and then we’re going to react. And I put these as two different automations inside of here. So here’s what we’re going to do the first one. So I’ve got three here. These are going to be fun, okay? The first monitor is, again, monitoring the state of the portfolio. In this example, and you could do it again a million different ways. I’m not telling you exactly how to do it. Just giving you an example, you can run through. In this example, we’re monitoring the state. We’re answering the question. What’s the state of my bot, okay? What’s the state of my bot.
So the first thing that I can do here is I can, again, reset the tags because I can split these up between the scanners and monitors. So that I can reset for each environment, right? Monitors will run and scanners will run and I can reset the bot for all of those different environments that I want based on what I want the bot to do.
Now the first thing that I can do is I can have the bot make a question to itself, right? And I can do a very simple decision like this and, again, this is just an example. So, guys, bear with me. Don’t like use this as like gospel of how you should do it, okay? But the first thing I can do is I can have the bot ask itself a question. Remember, I’m asking the bot in this automation what’s the state of my bot? Does the bot have more than three positions with any type, okay? That’s just one question I could ask the bot.
If the bot does have more than three positions, right? So it’s starting to get like a slightly full portfolio, maybe my position limit is six or something like that for this bot, right? Then what I can say is I can tag the bot as starting the process of operating under conservative management, okay? So think about this, right? Like if you have a more full portfolio, right? You might want to operate under a conservative management style, right? You got a lot of positions. So maybe you’re willing to adapt the way that you’re trading a little bit because you’ve got so many positions going at one time.
So I tag the bot just currently based on that. That might be the differentiator for me. Now, I don’t know if this is the differentiator for you. It could be, it could be something else. We’ll go through more examples here, but you’re basically just assessing the state of your bot like try to assess like, okay, what do I have in here? What’s my PNL on positions? Maybe how much capital do I have available? Any of those things and assess the state of your bot.
Okay, now tag yourself. And before you even keep moving forward, right? Before you even keep moving forward, you can tag your bot as conservative management. Now, we’re going to ask the bot to make another decision. Okay, we know it’s got more than three positions. But does the bot have ten positions? Maybe if we give the bot a position limit of three, we would want to know when the bot has ten positions. Now, when the bot has ten positions, it would, of course, just stop scanning for new positions. That’s fine, but now we might want to adjust the way in which we exit positions.
So if the bot has more than 10 positions, we tag the bot as full portfolio, which is kinda cool, right? it’s not that- we know the bot has the full portfolio, but we tag the bot has having a full portfolio and then we make another decision called that checks and see if the bot's PNL on the day is greater than 10%.
So pay attention here for a second. This is a really important one. If the bot’s PNL is greater than 10% and we have a full portfolio. This is where those like being aware of the state of the environment of your portfolio or your bot or whatever. If we have a full portfolio, 1tenpositions, fully allocated and our daily PNL is greater than 10%, which means that we’re up 10% on the stinking day, on our whole portfolio that we have. Then what I would want to do is I would want to tag the bot as exit all positions.
So here’s the thing, right? Remember what we’re doing here. Now down this path, we’re under conservative management regime style, whatever you want to call it. We’ve got a full portfolio and we’ve tagged the bot as get out of all of my positions immediately, right? For whatever this environment is. It doesn’t have to be this, right? But exit all positions. Okay, that’s a great thing to do. We’re now tagging the state of the portfolio. The new state of the portfolio.
And remember, we might only get over here maybe 1% of the time, right? Remember it’s like driving on that icy blizzard road. Most of the time, you’re probably never over in this direction, maybe. Maybe 10%, 5, I don’t know, whatever. But when you get there, go ahead and make some really important decisions, right? That are critical to you. So that’s what you’re doing. Now you’re exiting all of your positions. You’re tagging the bot to exit all positions.
Okay, let’s clear the deck here for a second. If the bot does not have exactly ten positions, and remember, up above we already reset all the tags. It’s not going to tag itself. It’s not going to check for PNL over ten. It’s not going to do any of these other stuff, right? The only thing it’s going to do is it’s going to tag itself as using 50 profit targets, which really is like 50% profit targets, okay? That’s all you’re doing. You’re just tagging the bot as saying like, okay, because we’re under conservative management now with a lot of positions. Basically, like slide down my profit targets. That’s the goal of what I’m trying to build here in this example.
Let’s go over to the other side. I think it’ll kinda help as we go through the other example. If the bot does not have more than three positions, right? maybe we’re still targeting 10 positions. We want the bot to get into a lot of positions, but we’re targeting 10 and it’s currently does not have more than three. Okay, that’s fine. Let’s tag the bot as operating now under standard management. Like we don’t need to be overly conservative, right? We could start a standard management procedure, which means that we’re going to have probably higher profit targets, right? Than traditionally because we’re still building out the portfolio, so we can allocate more, we can take a little bit more risk, whatever it is for you. Like, again, I’m just showing you an example of how you can, you know, split and part the sea here.
The next thing that we would do is we would check and see does the bot maybe have exactly one position. So, in this case, if we know that the bot doesn’t have more than three. Is it only operating on one position right now? And I’m just using examples, again, by the way, folks. You can do all sorts of decisions in here. You could do does the bot have a low capital? Is the allocation, you know, like high? Is my maintenance requirement over a certain amount? So many things you can do, but like put all of your criteria in here to again start to split and make different decisions and document it.
So here, if the bot has exactly one position. So it’s only just running off of one small position. I may want to make another decision like is the bot’s open PNL greater than 500? Now, look, if I have $500 and I know I’m operating under one position, what would I want to do potentially? Potentially what would I want to do? I would want to, again, tag the bot as exit all positions. I know I’ve only got one position, but the bot’s open PNL is greater than $500. Great, tag the bot as exit all positions.
Notice we’re using the same tag we’re using down here, but this was entered under different circumstances, right? You can reuse the same tags to trigger the same type of activity under different environments. Now if we’re operating under the standard management over here, standard management, and we know the bot has not more than three, but it doesn’t have exactly one. Maybe it has two positions, okay? Or the bot’s PNL is not greater than $200, then what we want to do is basically we want the bot to continue to operate with 75% profit targets.
Notice that this standard management here is 75% profit targets, that’s the standard procedure, whereas the conservative approach is to operate under 50% profit targets. There’s one down here as well. Notice how we’re just reacting to different market environments and the different states that the bot is in. Now let’s work through some of the stuff that we have for this. So now all we’re doing, again in this first monitor is we’re just tagging the state of our portfolio. Like what do we want the bot to do based on what it has actively opened and working etc. okay?
Number two, stateful position management version one because, of course, I couldn’t do just one more example. I had to do another another one as we go. So stateful position management version one. I want to walk through this and then we’ll send a couple positions through here and we’ll kinda assess it.
So here’s what we’re going to do. We’re going to go and now execute this automation. And remember, actually, let me back out here. Remember, you can order your automations, right? So we are going to run automation monitor one first. Then we’ll run two, then we’ll run three. We can run them in a specific order because what we want to do is we want to tag the state, then we want to use those tags to make different decisions, okay? So, look, here’s what we’re doing in this case, okay? This time around in monitor two, we’re starting to react to the market environment that we’re in or the state of our portfolio that we’re in.
So what we do? We first check and see if the bot has a tag called exit all positions. Remember, those rare circumstances, those rare circumstances where the bot had either a full portfolio with 10% today or just one position that was over $500. Whatever that was, then what it will do is it will say, yes, the bot has a tag. Exit all positions. Great. At that point, what you would do is you would repeat through each of your positions, right? You don’t need to start and this is what a really cool thing. You don’t need to start a repeater or a loop at the front of your monitor automations. You can actually because you’re using bot tags, you can check the state of the bot, right? The state of the bot first and then use different loops for positions.
So if the bot has a tag exit all positions. You’re going to repeat through each position and close the position. Would you agree? Right, that’s all we want to do. Like we already knew because of the last monitor automation, we had the right environment to close every position we had. Okay, so just use that information to now tell the bot close all positions. That’s it.
And now, what the bot will do is it will close all positions. Now, some people get really, really stinking creative and smart in the community and they tag types of positions coming in like position one, position two, position three. And then they have really wicked automations that say exit one-two, and leave three and four on or exit the first five, and don’t exit the last five. I can’t go through all that today, but go explore the community. I’m telling you guys, there’s no limit to what you can do here if you can think it through.
So now what you do here is let’s say you don’t have a tag exit all positions, right? the environment was never present to exit all positions. Great. Does the bot have tags for 50% profit targets? Yes, right? Because that’s the only thing that could’ve done is it could tag itself as that conservative environment with 50% profit targets. Great. All right, repeat through each position and then when you repeat through each position, go ahead and tag or go ahead and check and see if you have a return on those positions of 50%. And if so, go ahead and close the position.
Now, if the bot did not have a tag for 50% profit targets, right? So maybe it was operating now under a different environment. Remember, this was the conservative environment and if it was operating under a different environment, maybe the standard environment where it had tagged itself as using 75% profit targets. Great, go ahead and repeat through each position and check and see if the return is greater than 75% on any of those positions. Right? And if so, then go ahead and close the position, right? If the return is greater than 75%, then go ahead and close the position.
But notice what we’re doing here in this particular automation. This time in this automation, let me just zoom out a little bit, is we are using the state that we assess the bot to be in or a part of the state depending on how you do this. We’re using a part of that to then tell us under what different environment we would want to manage our positions. Either we’re going to do exit all, we’re going to do 50% management environment, or we could do 75% management environment. These are the different states and they match up with the different states that we had when we were assessing our bot portfolio. Do you guys see that?
Now what we’re going to do is we’re going to do one a little bit more advanced. Now that is based on bot-level assessment, right? We’re setting the state of the bot and then we’re using the state of the bot to exit positions based on traditional profit targets if you want to. Again, you can get wicked crazy with this if you want to.
Next thing we’re going to do is we’re going to do this one. This one here, we’re going to build it together this time, so pay attention. Pay attention. We’re going to build it together. It’s not pre-built. We are going to build it together right now, together on this bot workshop. Number three is you can do stateful position management V2, which means should I exit certain types of positions based on how the position was entered and based on how the new environment that we’re in, okay? So we’re going to build this one together.
So if I open this one up, you’ll notice that now I am starting this with a repeater. I’m just, or a position loop. I’m just starting this and saying, okay, I want to pull in the information for each position. This time, I want to individually check positions and potentially make different decisions for those positions. Earlier, I might have already started the process of checking for profit targets and stuff like that on positions. I could do that again here too and do it as a different version, different way of doing it, okay? You could do both, you could do one. You could do the other, it doesn’t matter.
The first thing that I’m going to do is I’m going to make a decision for my positions, okay? So I’m going to make a decision and I’m going to scroll down to position level decisions. Now, notice that the position level decisions are available and can be used because I’m pulling in the information in the position loop. In the position loop, I’m saying, hey bot, loop through all these positions and pull in some information, okay?
Now what I can do here is that all the way at the bottom of this list, there’s a beautiful recipe called the position has any of these tags. Now, how cool is this? What I can say is I can say my position, let’s connect it to each position I’m repeating through or looping through. If the position has any of these tags, I might want to perform different actions. So for example, if my position was opened using an RSI buy signal, remember, do you guys remember earlier? And if you don’t you can go back and watch in the recording.
When we open some positions, we tagged the state of that position. In some of those cases, we tagged it as uptrend, downtrend, neutral technical, RSI buy signal, whatever. So here we can individually pluck out. Think about this, this is actually kinda crazy. You can individually pluck out positions that were specifically tagged on their way into the portfolio. I mean talk about like literally mind-bending statefulness that you can do inside of your bots. So if any of my positions has a tag for RSI buy signal, I want that individual position to start going down a different management path. Everything else potentially could go down a different path and we can start to build out different decisions.
So let’s build out one of these things right now. So let’s say that the individual position that I’m currently looking at, and it could be literally one out of ten. It could be two out of ten. It doesn’t matter. But any position that has a tag RSI buy signal, so anything that was entered using an RSI buy signal, let’s do this. Let’s make a different decision for that position and let’s check and see if the symbols intraday RSI signal, right? that same symbol I’m looping through. If that RSI signal is now a cell signal.
Remember, we entered the position with an RSI buy signal, and now let’s check and see if there’s an RSI sell signal. And if there’s an RSI sell signal, we might want to close that position because guess what? We entered that position knowing full well that the entry was mostly triggered on an RSI buy signal. So maybe we want to close positions that were opened with an RSI buy signal whenever we get an RSI sell signal. So that now is pulling out literally one position. Nine positions could go this way, and just the one lone ranger that’s tagged as being that goes this direction. Pretty stinkin’ cool that you can do that.
Now you still might want to do something else down here, right? So if that’s the case, you would exit on that position, but what you can do here if you go down the no path like what if the RSI is not a sell signal? You can’t just let the position just linger out there forever, right? so now you do the same thing. You come back in here and you say, okay, let me check the bot, right?
Does the bot have any of these tags? Does the bot have 50% profit tax, right? Because remember, the bot already tagged itself. We’re doing kinda an extra check on the position, but notice what we’re doing here is we’re checking the position whereas here we’re checking the bot tag. Position tags, bot tags. You can check both of them. Make some match. Super fun. Super fun to throw them all together in a big soup of auto trading. Okay?
And so does the position have a 50% profit target? Great. Okay, go ahead and close the position. Just execute a working order that sits there, right? Think about this. That sits there as the trade price times 50%, right? Just like a 50% profit target. You could do that. No, it doesn’t have the 50% profit target. Great, close the position at a 75 because we know, right? We know that the bot is not at a 50% profit target, which means it’s probably at the 75 and it already hasn’t closed, right? the position, right? so you could do stuff like this.
You could again start to now split the sea here and start to make different decisions as you go. What happens to all of these other positions that don’t have an RSI buy signal? Well, let’s see. If the position and there was also high IV. Do you remember that? So let’s see if the position has the tag high IV because we know, again, that the environment, the position was added in was a high implied volatility environment. And we know because we’re taking our time with this that you can’t have an RSI buy signal in this example and high implied volatility.
Now, you could add multiple tags and some of your other examples and we’ll show you that. But, does the position have high implied volatility tag? Okay, yes, well let’s make a decision. Let’s see if implied volatility has come back down. So we go to the symbol rank here. We connect it to the symbol we’re looping through and we see if now implied volatility rank has gone below, let’s say 40. I think we entered high implied volatility above 70 or something like that, or 40, or 50. So, is implied volatility rank now low. Right?
Maybe if implied volatility rank is low, you immediately want to close the position, right? Because now the one position that was entered in high implied volatility, you are extra checking to see if that position now has low implied volatility. Just that position. Everything else continues down the path, right? Everything else continues, you know, checking the different regimes and environment that you’re in. And then you keep going, right?
No, it’s not there. Okay, great. Now we add the tags, right? Or add the decisions. Okay. What tags does the bot have? Does the bot have any of these tags? Remember, we are checking for 50% profit targets, right? And so on, and so on. Okay, I’ll leave these blank here for the sake of time.
Now, do you notice what we’re doing here? And this is really important here, so let me know if you guys, like, really, really captured this. This time what we’re doing in this particular V2 example is we are looking at individual position tags as you go and we’re pairing these with both level tags whenever you get to the point of not having that right specific position that you’re plucking out.
You know, a lot of people, what they want to do and I hear this all the time. We hear this in support. We see this in the community. As they’re like, well, Kirk, what if one position has blah blah blah characteristics? And what I tell people is like identify what those characteristics would be and pluck that position out using tags or decisions out of your automations. That’s it. Like identify those characteristics and then pluck that position out. And one way you can do that is you can identify the way that the position went in and use different criteria for how to analyze that position that you are now, like, removing from the flock and analyzing differently.
Now, look, you can continue down this path for all of these as you go, right? So you could do if you wanted to, in this example, you can make more decisions based on the different environments that the position was entered in. So down here you have another environment. Does the position have any of these tags? And in this case, it would be something like neutral technicals, right? That was one of the ones that it had, neutral technical or you can have even more that’s like downtrend, or uptrend, or whatever. But all you’re basically doing here, just like we talked about before, is you are identifying the environment that would give it different characteristics how you would adapt the strategy differently, and then you’re making all of those decisions that would relate to that particular state. That particular state of the position or state of the bot.
And so as you work down, what you can do is identify the different states and different characteristics and group them together like we started doing here. Now I’ll build out the rest of these before I share this into the community, so you guys can see how that works, okay? So you have a working model, but let’s go through this, okay? Here’s what we’re going to do. We’re going to go ahead and save the progress here that we have here and let’s now, I’m going to remove these. I’m going to remove the weather ones because I really don’t want the weather automations running inside of my bot when we go through some examples here, okay?
So I’m going to remove the weather ones and I’ve ordered my bot specifically to run scanner one first, which is let’s assess the market, and then scanner number two, which is we’re going to assess the state. Okay, let’s give the bot some more capital. Let’s give the bot some more positions so that we can do a lot of crazy stuff today, okay. And then let’s go ahead and we’ll just go ahead and run this thing automatically, okay?
So here’s what we’re going to do. You can run an automation instantly, by the way, just right over here. Let me turn on my cursor highlighter. Right over here, the little icon here. Go ahead and click that. I’m going to select the automation that we’re going to run first. We’re going to run state of the market first and we’re doing this deliberately to run them in sequence, okay? So we’re going to run the state of the market. We’re going to use SPY.
So I’m going to run this automation, okay? Now what it did and this is super important as you go through the logs. It shows you the logs right here, which you can look at the logs right here, or what you can do to know what the bot’s doing is you can go to your log tab, okay? I’m going to turn off the automations from running automatically because I want to trigger them myself.
So you can turn off, or you can go to the log and you can see the first scanner was run. And I encourage you to go through the log and look at this stuff, okay? Here’s the log. Here’s what happened today at 2:12 when we ran this. First, it reset all the bot tags. Completely new tags, right? Then it assessed the ticker above the 200-day moving average. No. So it tagged the bot as being in a downtrend. Then it assessed is the ticker IV rank above 50. Yes, it’s above 50. Okay, tag the bot as having high implied volatility, right? That’s what we were doing here.
I don’t know if I had something on the end of that branch, but I think I just had, yeah, just the tag. Just the tag the environment that it’s in, okay? So that’s it. That’s all it was doing now it’s just literally tagging the market environment that it’s in. Do you guys see how it’s doing that? Now if I go back to the dashboard, look what has now showed up on our dashboard. Bot-level taggos, okay? Bot-level tags. Downtrend, high implied volatility. Magically that’s where those came from because it’s tagged the bot. So now the bot has those tags present and available for the bot to use. Okay, great.
Now let’s go back to our automations. Now that we know the environment that we’re in, let’s run the second scanner. So I’m going to go here and click and run the automation instantly. I’m going to go down to my second scanner. I’m going to run this on SPY. It’s the same one that we had before, right? Same ticker that we’re looking at and run the automation. Okay, now I have the here and here. Oh, they don’t match up. Oh, no strikes there. Okay. So what I’m going to do is I’m going to go to my log and let’s just look at the log here and then we can adjust as we go. Okay?
So here, notice what the bot is doing. The bot has a tag. Does the bot have a tag uptrend? No. And we know that that’s true because the bot has a tag, what? Downtrend, right? The bot has a tag downtrend. Does the bot have a tag high implied volatility? Yes, it does have a tag high implied volatility. So what the bot was trying to do was to open a short iron butterfly. Not a match up those strikes. Let me go in there and just match up those strikes because I forgot to do it this morning.
So let me go in here. I’m going to open this one and say my short call strike is a 50 and I’m going to do the same strike. Which one did I do? Short put. Here we go. Same strike as my short call leg. Here we go. So my short put strike is the same as my short call leg. Go ahead and save this. Throw it in there. Let’s run this automation again. The scanner again. We’re going to run our stateful scanner number two. Okay. Same decisions that we got here. Do you guys see? Now because we have the tag high implied volatility and we have the tag downtrend, it’s opening an iron butterfly position.
Do you guys see how it does that? How it’s just literally going through the logic of what we just presented. If you go to the log here, you can see we ran that automation at 12:16. It’s going through and it’s just using the data that the bot gave it. The state of the market that we were analyzing to make a decision on the position, okay?
So now if I go to my position, I can see I’ve got a new iron butterfly position. Now what’s super cool about this is, remember, we also were tagging the position on the way in. Do you guys remember that? We were tagging the position on the way in. The position was tagged as being open in a downtrend with high implied volatility. So now we can let the bot use that information to make adjustments to our potential positions.
We’re going to go through and now what we’re going to do is we’re going to go ahead and run our monitors. Right now, the tags on these are downtrend and high implied volatility, okay? Now watch what’s going to happen here because that’s what happened at the scanner run. But now, if I go to my monitors, I can run one of my monitor automations. We’re going to run this first one first, okay? We’re going to run the first one first.
Your ticker is set up as just an input. So it’s just right here inside of your automations. You can set them up as an input or you can set them up as a bot level input. Super easy. So I’m going to run my monitor one first. So I’m going to go here run an automation instantly. What automation do I want to run? I want to run monitor one, which again, is going to check what’s the state of my bot. Now you guys know what the state of your bot is because we’re watching this in real-time. We have one position. doesn’t have a big profit, right? Because it just got entered. So I’m going to run this automation.
Great. It first reset the bot tags, right? Because now it’s assessing something new. Does the bot have more than three positions? No, the bot has one position. Well, we know that’s true because we’re here right now. But guess what? You might not be here. You might be, what, letting your bots run during the day like I do, right? So now the bot knows. Nope, I’ve got position. I’m intelligently assessing my current state. You’re just telling the bot to make decisions for itself.
Okay, great, tag the bot as operating under standard management, okay? Does the bot have exactly one position? Yes, it does. Is that bot’s open PNL greater than $500? Nope. The bot is currently down three bucks because we’ve just entered in and it’s fluctuating around. So tag the bot as operating with standard management and 75% profit targets, okay? 75% profit targets.
So now what you can do is go over here to your dashboard and guess what? Guess what happened? Look how exciting this is. You’ve got new tags based on the current environment. The bot’s operating under standard management and now it has 75% profit targets that it’s using. So now if you come in here and you’re just kind of like checking in on your bots doing your high-level assessment, you know the current state of your bot is doing. You’re like, oh, okay, this bot’s operating under standard management. It’s using 75% profit. That’s the state of the bot right now.
When we release tags and position tags, I don’t think you guys understood how powerful this really is. This really expands things quite considerably for you. Okay, so let’s run the next automation though. So the entry tags are raised and replaced with the exit tags only because in monitor one we told it to reset all tags. If you wanted to, you could tell the bot to reset or change the tags or remove tags, so that you can clear just the management tags.
So what you could do here if you wanted to, and I’ll just delete it and readd it, is I can precede this, and I can tag my bot, and I can say untag the bot at the beginning just with my management-related tags like 75% profit targets, standard management, conservative full positions, and exit all positions, right? So instead of resetting all tags, I could just, literally, target the tags that I know this bot would enter in this automation and reset those specific tags. And you can untag and retag all over the place if you wanted to.
I’m just going to go ahead and precede this with resetting the tags. You can leave it blank to reset the tags, which is what I do. Just so we have this good for the video.
Now what I’m going to do, I’m going to run another automation. Remember, we have one position. We’ve now tagged the state of our bot portfolio. So now we’re going to run monitor number two, okay? We’re going to run monitor number two. The tag limit currently is ten, but in the next version that’s rolling out soon like pretty soon. It’s going to go up to 20. 20 tags at a time, which is a lot. There’s a lot of different stage that you could do with that. That’s bot level tags, then you can do a lot for a position tags too.
So now I’m going to run monitor too, which is now to basically use those tags to make different decisions. Okay, so let’s run this automation. See what we get. Great. Does the bot have a tag exit all positions? No. Remember it did not have that tag. Does it have the tag 50% profit targets? Nope, it does not have the tag 50% profit targets. Does the bot have the tags 75% profit targets? Yes. Remember, that’s the state of the bot right now. Standard management 75% profit targets, right? Great. Repeat through each position, and check and see if I have a 75% profit. Do I have a 75% profit? No, of course, cause I just entered the position.
So that’s fine, but notice what it’s doing is it’s specifically went down the path that you told it to take based on the current tags in the bot. So, if I go here, we’re operating under standard management with 75% profit targets. Guess what the bot was doing inside of the log? The bot was operating under 75% targets like you told it to do in that environment.
Now let’s do it one step further, right? Let’s go to our automation here. Let’s run monitor number three because maybe because the position was entered in high implied volatility, we might want to exit the position if it goes down a different path, right? So we’re going to run monitor three, which is now assessing specific tags and states of individual positions. So, okay, let’s run the automations. And it says repeat through each position. Great.
Does the position have any of these tags? Well, remember, only position right now is SPY and it was an iron butterfly, so does it have an RSI buy signal tag? Nope. Does it have a tag for high implied volatility? Yes, it does, right? Remember the position, the position has a tag for high implied volatility. Not the bot, the position because that individual position was opened during high implied volatility.
Is the symbol’s IV rank below 40? No, the symbol’s IV rank is above 40 right now. Well, we know that to be true right now because we entered the position when IV rank was above 50. So, we’re going to check and see if does the bot have 50% profit targets? No, just continue down the path. I don’t think I built out those like exits, but you can see how it’s working.
So here’s what we’re going to do now, okay? We’re going to get out of this one, okay? We’re going to get out of this one and I want to explore hexabot. Now, this one’s going to start to get crazy. It’s going to start to bend your mind. Definitely going to bend my mind a little bit more because I got a headache still on this one, but I love this stuff and I want to show you what I think is now, like, something that now takes this and kind of really puts it on steroids. And look, I can’t cover everything in what we’re going to show you. There’s no way I can possibly cover every little iteration, but what I want you guys to take away from this is just the exploratory idea of using tags in different sequences and orders to tag different states, okay?
So first thing I want to do is I just want to like cover some of these hexabots right now, okay? So like this first one here, EEM. If I go to this particular hexabot, okay, that’s running. This hexabot has a number of different tags. It’s tagged as a hexabot because that’s how I like to do it. And it’s tagged for the ticker that it’s targeting or trading. It only trades one ticker. So my hexabots are very specifically set up for each ticker and I run multiple hexabots for each ticker, okay?
But look what I do here. The current market is strong downtrend with neutral technicals and the bot’s state is waiting for a better opportunity. That’s what the state of the bot is. So when I come in here and I quickly glance at EEM. I don’t need to look at the chart of EEM anymore. I don’t need to check the technical on EEM and I don’t need to ask myself and dig through the bot and wonder like why isn’t the bot entering positions because I know why.
I know the bot is waiting for a better opportunity. All the decisions and all the checking that it made and I’ll show you this as we dig into it, told the bot that it should not enter a position right now even though it could. So think about that. It told the bot don’t enter a position right now because you could enter a position. Notice we don’t have a new position today. We’ve closed some positions, that’s great. Right? But we haven’t opened any positions. That’s because it’s waiting for a better opportunity. That’s awesome. That tells me what the state of the market and the bot is right here using bot level tags.
Here's the thing guys, and this is, guys, ladies, girls, everybody in here. The key with it, if we go back to where we were doing in the beginning, is just document what the state is as you go. Tell your bot, give your bot a little helping hand to document the current state of what it’s going through right now. Like is it raining? No. Is it sunny? Yes. Are we in a downtrend? Are we in an uptrend? Whatever. Just document it as you go. That’s all you gotta do.
So now what I can do is I can look at each individual position. This is the same hexabot that we’re in and notice I’ve got a short call spread and I’ve got some iron condors currently, okay? So let’s click on one of these. This iron condor specifically. If I go down to my tags. Notice this iron condor at the time that it was entered. This is what’s so cool. At the time that it was entered. It was in a week downtrend, okay? week downtrend with neutral technicals. So I entered an iron condor position.
Now these tagging. I do a lot of tagging like this because I want to use it later for journaling and tracking and all that stuff. And right now, I’m working through my first and second profit closes. My first and second DTE profit closes. That’s what I’m working through actively right now. So the bot’s trying to work through and like close positions using that logic, that set of parameters. If I go to this one, which is our short call spread. This short call spread was likewise opened or was differently opened in a strong downtrend with neutral technical. So this is a little bit different environment than what currently dealing with other ones, right?
And it’s just a short call spread. I’m not working. I’m not close to expiration on this one, so I’m working through different set of management criteria, okay? Now if I go to a different hexabot. Let’s just click on the next one. GLD, okay? GLD has tags that says it’s in a strong downtrend and it’s got neutral technicals.
Now this time, notice there’s no tag here for waiting for a better opportunity. That’s because it’s already opened a new position today. So it’s not doing anything except just sitting in a good place where it had closed position and a new position open today. Like activity, that’s what I wanted to do. I wanted to enter positions. I want to keep trading. So it’s not waiting for a better opportunity. It found an opportunity today, execute a position, and now we’ve got that new position in place.
If I go over to my tab here for positions and I open up this position. See what I’m doing here as well? I’m in a strong downtrend, neutral technicals, short call spread. Boom got it. I can also go to any of my close positions. Let’s go to some of my close positions here like this one. It doesn’t matter. This close position and notice I tag on the way in and on the way out, my positions. You could do that both. We talked about it in the podcast about the hexabot. We documented it in the document, so you can see it.
But, look, on the way in it was a strong downtrend, neutral technical, and it was closed using the first DTE profit close. Think about that for a second. That tells me specifically the environment that led to the close. It reached its first days to expiration profit close. That’s why the position closed. Let me try to find a different one that closed for different reason. Okay, this one closed for a different reason here. It was still a strong downtrend, neutral, but notice this one close for an accelerated profit target close.
So what’s cool about this later is that I can take this information and using the new journal software that will come out. We can now analyze like what environments and what tags and what areas did I generate more money on. Was it accelerated profit targets, first days to expiration profit targets? If anything else, I just know why the position was closed. I don’t have to dig and understand anything. I can just, I know the state of the position being closed in, right?
I can like look at it and go, oh, that’s why the position was closed, right? let’s go. There’s probably some losers in here too. So let’s look at a loser. Okay, here’s a loss. Here’s a losing iron condor, okay? Here’s how it was opened. Week uptrend, neutral technical. It was challenged near expiration, so I close the position. Boom shakalaka. Get these things off, right? And know what they’re doing. Use tags to adapt to the market environment and then document your process as you go.
So when I come in here, I don’t have to wonder, hey, why did my bot take that position off? No, no, no. I know why it took it off because it was near expiration and it was a challenged exit. That’s why it closed the position. And I can even just see here. Like here’s the open in June and then the close was a month later. This position just frankly never worked out. That’s it. It just never worked out. So it closed it based on my criteria. Okay?
All right. Let’s dig deeper into these, so you can see this too, okay? So here’s how the monitor works inside, or the scanner works inside of the hexabot, okay? And I gotta like scroll all the way over here. First thing that we do. I’m going to skip scanning enabled for a second and I’m going to just go through some of these decisions, okay?
So one, the first decision here. Let me just try to zoom in just a little bit more as we go, okay? The first decision here is can my bot open a new position today. Really simple decision, right? But then notice what we do. We tag the bot. We untag the bot scanning pause for laddered entries. Why would we do that? Like, think about that for a second, okay? Why would we untag the bot scanning pause for laddered entries?
Well, it’s because whenever we try to enter positions in the hexabot, we are trying to ladder positions at different intervals. So what I try to do is that if I can’t open a new position and if I’ve determined that the bot has exactly zero position or doesn’t have zero positions and open a position really recently, like maybe in the last day or so. What I do is I go over here down the no path, which I told you, this one was a big one, right? I go over here down the no path. I reset all the bot related tags for trend and technicals and all that stuff like that. I reset all of those tags and then I tag the bot pause for laddered entries.
So what I’m doing in this very like little small microcosm statefulness is I’m letting myself in the bot know. Hey, you could have entered a position, but you need to pause it for a little bit until we space the position entries out over time. The way that I like to do my hexabots is I don’t want to enter positions every single day. I want to space them out a day or two apart, right? So a position today, maybe a position next Monday. Maybe a position Wednesday, and then Tuesday, whatever. That you space them out.
So if I am able to open positions, right? Then the first thing I do, if I’m able to open positions and now I’m inside my laddered entries days is I untag the bot scanning paused for laddered entries. I removed that specific tag. So what’s cool about this is that you can remove individual tags as you go. Add individual, remove individual. Remove all, add all. Reset. Do whatever you want. You can do crazy stuff with this.
Is market volatility below my threshold? Yes, great. Reset all the technical and trend related tags. This is what we kinda did earlier in the workshop where we reset the tags. I just do a reset of technical tags all below. And what I do inside of here is I reset all the trend waiting for better opportunity blah blah blah blah blah, right? I reset all of these. I, basically, want the bot to have a clean slate analysis for the exact environment that’s going through every time it runs.
You don’t have to do that. I do that. You could do it once a day. You don’t have to do it this way. I do it this way. So that the bot is reassessing the current environment around every corner, right? It’s like driving down the road. You don’t look at the road and then close your eyes and drive for four hours. No, you reassess the road at every turn, right? Constantly. That’s what I want the bot to do. Constantly reassess the market.
So first thing I do is I remove all of these tags so that it can reset itself for their appropriate environment. So now I ask the question is the ticker above its long-term moving average? What do you possibly think I do if it is above its long-term moving average? I start to reassess, right? And assess all the different environments that the bot could potentially be in and then notice what I would eventually get to in some environments, right? I would eventually get to a point where I’m assessing whether it’s in an uptrend, a downtrend, overbought technical, neutral techincals, right? I’m just literally taking it all the way over here, right? Based on all the analysis I do for this automation.
I’m now tagging the bot as strong uptrend, overbought technical, or strong uptrend with neutral or if I go over here, right? Notice what I’m doing in this environment, which is a different path that the bot is taking. I’m tagging it uptrend overbought. Not strong uptrend regular, an uptrend neutral. And if I go all the way over here, right? I can do weak uptrend, or however, you define it. Or all the way over here I could do strong downtrend with oversold.
Okay, now look. Based on whatever market criteria I’m on, and this is a really cool one that I do. So really pay attention here. This kind of a good one at the end. I really want to tie this together. So I hope you guys understand how this one works, okay? So here’s what we’re going to do. Based on whatever environment you get into, right? Strong downtrend, strong downtrend with neutral, whatever. I do a pre-entry check which I talked about on the podcast, so I’m not going to do that.
So if we do not pass the pre-entry check, which is just some very basic simple opportunity-based recipes, bot-based recipes. What I do is I tag the bot disabled scanning. This is key. This is so key to do this in environments like this, right? And again, I’m showing you more advanced version of how you can use tags, but I hope it make sense. But I tag the bot disable scanning.
The reason that I want to do that is because something did not work in pre-entry check. Either the position wasn’t available, I don’t have enough capital like some things not working in the bot. Not that the bot is broken but like I don’t need to be entering a position. That’s really what it is, right? So I don’t need to be entering a position. So what I do is I tag the bot disable scanning. That’s it. Tag the bot disable scanning. Now keep that in the back of your mind because we’re going to go back to the top of this automation here in a second and look at that first decision.
Remember I skipped over it that says scanning enabled? We skipped over it for a minute. Now I have the bot ask another series of questions like did I fail due to capital? Like I was trying to enter this position, and for some reason, I didn’t pass the pre-entry check, right? This is just you asking the bot questions and having the bot document its process. Did I fail at the pre-entry check or did I fail due to capital? And if the answer is yes, I send myself a low capital notification because I want to know like, hey, you don’t have enough capital. You could’ve entered a position, but you don’t have enough capital. And then I tag the bot as not enough capital.
Do you guys see how I’m just literally taking notes as I go? You can think about tags as just taking notes on your trading activity inside the bot. Okay, we documented now. Not enough capital available down that path. What happens if I did not fail due to capital? Well, the only other reason I could fail in my pre-entry check was because the opportunity wasn’t available. Like I was trying to target exactly 30 days or whatever you’re trying to target and there was no trading contract available at exactly 30 days, right?
That’s just the opportunity you were targeting wasn’t available. So, again, I send myself a notification and I tagged the bot opportunity unavailable and the specific type of opportunity that was unavailable was a short put spread because that’s what I was trying to get into here. If I would’ve passed the pre-entry check, I would’ve opened a short put spread. So if it’s not available, I tell the bot exactly what opportunity is not available. This is all really key stuff, okay?
Now, look what happens down the yes path if I did pass the pre-entry check. If I passed the pre-entry check, but I failed at the opportunity filters. Guys, this is the most crazy. I love this stuff so much. If I failed at the opportunity filters, like the bid/ask spread wasn’t good enough. The probability of profit wasn’t high enough. The return on capital wasn’t good enough. Then whatever the reason is that I failed, right?
I know I have enough capital. I know something is out there I can trade. I’m not low on capital, right? The opportunity is available, but what I’m lacking is I’m lacking a good opportunity. So I’m waiting for a better one. I’m waiting for the bid/ask spread to come down. I’m waiting for, you know, the return on profit to be higher, the probability of profit to be higher, whatever. So tag the bot as that state.
Remember earlier, the bot was already in that state where it was looking at some positions and saying, okay, you know, our state right now is waiting for a better opportunity.
It’s not disabled for some reason, or not, you know, waiting for laddered entries or whatever the case is. So in the case of the hexabot, if I just zoom out here a little bit more. You’ll see all the different things that I’m doing for different states and environments, I’m just tagging different environments, right? Do you guys see that? I’m just literally tagging different states and environments that the bot could be in and then making different decisions based on those environments. Okay?
Now back up at the top, there was this first check that we did. So let me just zoom in on this one again, okay? Back up at the top, there was this first check that we did, which was the first thing that we want to do is we want to check and see if the bot has scanning enabled. And so notice we’re simply checking does the bot not have the tag scanning disabled? Because remember at some points, if we wanted to, we could disable scanning for the hexabot. Something is not working in a target position that we’re going after is not available, so we disable scanning.
So if scanning is disabled for some reason, and the answer to this question is no. We go all the way over here to the right-hand side, and we go through this basically like scanning disabled process. So first thing we do is we rip out all of the technical stuff again because we don’t care about it. For some reason, right? Scanning was disabled. So do we care about the trend and all this other stuff right now? No, we don’t. We don’t care about any of that stuff because right now scanning is disabled.
Okay, great. Was scanning disabled due to not having enough capital? And what is the bot doing? The bot is just simply checking. Did it tag itself when it disabled scanning? Did it tag itself as not enough capital available? So you just like rechecking that tag. Okay, great. Now, this is the craziest one, so you guys know. The craziest one to me is that you can have the bot recheck its own capital again, and again.
So I love this particular recipe collection group because if I was disabled for not having enough capital, which is the state of the bot, I can make some all sorts of crazy decisions to see if I have enough capital now. Maybe the position didn’t have enough capital by a dollar, but now it does because the premium is higher, or maybe I added some capital to the bot. So what the bot can do now, what the bot can do now, is it can check does the bot have enough capital now?
Stateful assessment of the bot’s current state. We know that it didn’t have enough capital. Does it have enough capital now? And if it doesn’t we tag the bot as actively monitoring capital available because that’s what it’s going to do. If the bot doesn’t have enough capital, it’ll keep running through here and keep monitoring and checking over, and over, and over, and over again to make sure that it has capital before it starts trading.
Now, look, if the bot does have enough capital available now. Then what it’s going to do is it’s going to re-enable scanning. How does it do that? Well, it’s going to do that by ripping out the tags, untagging disabled scanning, untagging not enough capital available, untagging actively monitoring capital, and untagging waiting for a better opportunity because now it’s going to reset its state. Its new state is, okay, I’ve got enough capital. It’s a clean slate. Let’s try this again. Does that make sense?
Like it’s like refilling the engine and all your gauge is changed and you reset your miles for this trip, right? So now that the bot has assessed its own state, re-evaluated it. It can untag itself for all of these things and basically clean the deck if it wants to. And then I send myself a beautiful little notification to let me know that this happened as well.
You don’t have to do stuff like this, but I did because I want to know. Hey, good news. I’ve been monitoring the capital available. Looks like you’ve got enough capital to start looking for positions. I’ve reenabled scanners automatically to look for new positions. And how did it reenable scanning? Because it removed the tag disabled scanning. That’s it. That’s all you want it to do, right?
So now it’s going to start scanning again. Okay, let’s go through one more. So if I was scanning disabled, but it wasn’t because of low capital. Was it because my position that I was targeting was unavailable? That’s a really good one, right? I was targeting 30 days to expiration and exactly 30 days but it wasn’t available. Okay, great. So, can I check again? Like is it time to check again?
Well, if it’s unavailable, it’s probably cause it’s unavailable for the whole day, right? Like they’re not going to open up another expiration midday and time certainly doesn’t fast forward midday. So if you’re targeting 30 days, you’re not going to want to check for another position until the next day, right?
So what I do here is I say, okay, is the market time before 10:00AM? Like, basically, let’s check once a day to see if new opportunities opened up. Again, stateful actions in your bots. Let’s check once a day to see if the market has opened up new opportunities. Has there been a new opportunity opened up? Yes, it’s before 10 AM. Okay, great. It’s before 10 AM, so let’s reenable scanning for the day, remove all of the opportunities unavailable stuff, and let’s check again, right? Let’s check again because it’s before the day, so maybe there’s a new opportunity that’s opened up for the day if that make sense.
Now is there, is it now before 10 AM? Okay, great. Maybe it’s not before 10 AM. Can you run through? This is so crazy. Can you run through like a double-check? Maybe you guys adjusted and I did this for you all because I know you may adjust your deltas, or your expirations, or whatever. Maybe you go in and you’re like, hey, I don’t want to trade a 30 delta. I want to trade a 29 delta, or a 30 days to expirations. I want to trade to 20 days to expirations. Great.
Did the bot have a tag unavailable but something is available? Or the put spread, the bot is tagged as put spread unavailable, but it’s actually available. Or the bot is tagged as iron condor unavailable, but one of the iron condor choices that you want to trade is available, right? So I’m just literally walking through the logic of like double-checking myself in the bot as we go through this. And so if that ends up being true, then I want to reenable scanning.
So again, what I do is I remove all these tags, right? I want to get rid of all these tags, which basically clears the deck and reenables scanning for the bot. If I continuously find that something is unavailable was tagged as being unavailable and actually is still unavailable, then what I want to do is I want to tag the bot as actively monitoring opportunities. The bot is not shut down. Scanning is disabled because nothing is available, but it’s continuously looking for something to be available. So really crazy stinking powerful the way you can do it here.
So if I go into my hexabot monitor. We use a heavy dose of tags in here as well for different positions. I’m going to kinda like just run through this, but you can see like exit, exit, right? these are accelerated profit closes. We tag the positions in different states, right? We can go through here and we can say like check all these different environments that the bot could be in. There’s a lot we can do here with the hexabot too.
Again, we’re tagging positions, tagging environments, resetting bot tags. We’re doing a lot in here too. Here’s a good one. Hexabot XLU. Is the hexabot in XLU scanning paused for laddered entries That’s why. So if I come in here and I’m like, hey, what the heck, man? What the heck, hexabot? Why have you not opened new positions? There should be new positions in here. Well, that’s because scanning was paused for laddered entries.
Okay, if you want to really dig into that. We can go to our scanner here and we can dig through the log. Is scanning enabled? Yeah, scanning’s enabled. Can my bot open a new position today? Nope. The bot opened one position one day ago, which is too short for me. I told the bot to space positions more than a day apart. So the last position that I got into was one day ago. Wasn’t this position. it was this one here. One day ago. This position was opened yesterday. So I told the bot, hey, space out your positions by a day.
So yeah, it can open a position today. Now, do I want to completely disabled and turn off the bot and all that stuff? No. I can just use intelligent stateful tagging of my bot to tell the bot what to do and when and what the current state is. Like what’s the current state of the road for that bot. This one’s super cool.
So this is XRT and this one has strong downtrend neutral technical. It does not have a tag that says, waiting for laddered entries. It says waiting for a better opportunity. So what does that mean? Well, that means that it could have entered a position, has the capital available, has room in the portfolio. All of the stuff, but something didn’t check out on the position. So, we can dig into it if you want to, right? We can just go to the log. We can go to our scanner. We can just work through the logic here.
Scanning enabled, yes. Can the bot open a new position? Yeah, the last position it opened was three days ago. So, yeah, it can. Untag the bot for pausing and all that stuff like that. Is market volatility below my threshold? Yes. Reset all the technical tags. Okay, the tickers above its long-term trend below its short-term trend. The tickers trends are inverted. Okay? So we’re going to tag it as strong downtrend neutral technicals, right? We’re just walking through the logic and then we document it. Document what it is with tags.
Okay, great. Pre-entry check passed. Yes. The target position we’re after is available and we have enough capital to enter the position. Done. Great. Okay, we pass the pre-entry check. Now, look where it failed. Did I pass my opportunity filters? No. this is the cool, cool part of this. Is the bid/ask spread small enough? Yep, small enough for this. But is the open interest on my short legs big enough? Not yet.
But when it does get big enough, then it will go down to the next thing. But notice what it’s doing is that it can open a position, has the ability to open a position, has the capital to open a position, found the right environment to open a position, but the state of the market that we’re after is that it’s not liquid enough. So it’s waiting for a better opportunity and it could’ve, you know, gone for a couple different things.
Okay, here’s EEM. Let’s see why EEM is waiting for a better opportunity. Here you go. This is a good one here. Last one and then we’ll wrap it up, okay? EEM. Super liquid, right? Like bid/ask spread super tight. Lots of open interest. I mean significantly better open interest on these contracts than the other one. Maybe they just opened up, so there’s just liquidity following in, but the rate of return threshold it’s not paying enough money to trade these contracts at the exact moment.
That doesn’t mean that it won’t be later because clearly, EEM has opened positions before, but it’s waiting for the right opportunity. So we tag the bot as waiting for a better opportunity, right? Because right now it can't open a position, but it’s waiting for a better opportunity to open a position.
All right, we’ll get this into the community for you guys. If you guys have any questions on it, let me know. Like I said in the beginning of this bot template that we’re sharing is not a fully built strategy and for you to trade. It’s meant for you to explore bot tagging and how you can use it. So please, use it that way.
Also, please, share Option Alpha with your friends, your family, your coworkers, all that stuff. This is how we grow. We grow through word of mouth. So if you like what we’re doing here, please let everyone know. Hope you guys enjoy this. Thank you guys so much and we’ll talk to you on the next one. Take care.