Strategy Overview
- Create a new bot using Stochastic as the core trigger signal.
- Scan for signals automatically to trade credit and debit spreads.
- Use a decision recipe to prevent the bot from entering multiple positions in the same ticker symbol.
- Copy and reuse a modified monitor automation to manage open positions.
Stochastic Swing Trading Bot template shared in the Community.
Transcript
The text is the output of AI-based and/or outsourced transcribing from the audio and/or video recording. Although the transcription is largely accurate, in some cases, it is incomplete or inaccurate due to inaudible passages or transcription errors and should not be treated as an authoritative record. This transcript is provided for educational purposes only. Nothing that you read here constitutes investment advice or should be construed as a recommendation to make any specific investment decision. Any views expressed are solely those of the speaker and should not be relied upon to make decisions.
Again, welcome everyone to the bot workshop tonight for Stochastic Swing Trading bot. We're gonna spend a lot more time on the scanner, and then we're also going to do something different with the monitor automations than other workshops that we've done. But if you're a beginner, advanced, it doesn't matter. You're gonna have a good time. We're gonna build a bot together, and then we'll post that bot in the community when we're done. And then we all can go there, grab a copy of it, make your own modifications, and get off and running, okay?
So goals tonight for us today for this particular bot template. One, create a new bot using Stochastic as the core trigger signal for entering new positions. Number two, we're gonna scan for signals automatically and then trade credit spreads. In this case, we're gonna focus on credit spreads. Last one, we did credit spreads or debit spreads. You can do whatever you want, but we're gonna focus on credit spreads this time.
Third thing that we're gonna do is we're gonna use decisions to prevent the bot from entering multiple positions in the same ticker. This is gonna be important as we go to the monitor automation in case you wanna make a version of this that includes creating a hedge where you add the additional position by adding a call spread or adding a put spread and turning it into an iron condor, or an iron butterfly, okay? So, I'll show you how you can do that too.
The last thing that we're gonna do is we're gonna reuse monitor automations that we have as a base version, and copying it, and then creating a new updated version from that existing monitor automation. This is gonna be really cool because what we can do is we don't have to build our automations from scratch.
There's a power of using templates and automations inside of the platform is that you can take other automations that other people have built in their bots or shared and then create your own copies of those and modify them directly. So, you don't have to rebuild everything from scratch. It's gonna work out really, really well tonight.
Really quickly with Stochastic. So Stochastic, the way that it works when you build your signals, you put in all your times, right? Your K and your D lines, and you're smoothing and all that stuff which I'll show you. Basically, what you're trying to get is you're trying to get some sort of tradeable signal that works for you. So this is a very basic setup; I think it's a 5:3:3 for Stochastic that we'll use tonight inside of the webinar and inside the workshop to build our signals for a bot.
Essentially what we're looking at is, we're looking at this orange line here which is the actual Stochastic line. The line that's gonna be basically our signal line, essentially. And in this case, we were looking at 80, which is its top barrier, and 20, which is its bottom barrier. So anytime that the stochastic line is above 80, that would trigger an overbought signal. So up here, up here, up here, anytime that the stochastic line is under 20, that would trigger an oversold signal. So down here, down here, down here.
And then this is IWM over last couple of months. And you can see would've been a pretty good signals with IWM. Definitely would've, you know, gotten a new out, whatever you wanna call out, outer in, whatever it is. Right? It would've gotten you out some bearish trades and potentially or out of some bullish trades and some bearish trades. Right around where IWM start to top out, and just recently, you probably got some pretty good signals for maybe trading some put spreads adding into the recent rally that we had.
So that's what we're really looking for for this particular bot tonight. So, in this case, what we're gonna do as we start building out our bot tonight. First thing that we're gonna do we create a brand-new bot is we're gonna go ahead and build our Stochastic Swing Trading bot. You can name it whatever you want. We call ours stochastic swing trading. Give it a symbol or an icon, whatever you wanna give it. I always, for some reason, think of stochastic as cats because it sounds like sto-cats-tick to me. So I always give it a little cat signal. But you could do whatever you want with it.
Then you basically tie that bot to a particular account. You can tie it to a paper trading account at Option Alpha. You can associate it with any of your real accounts like your TT accounts, your Trade Station account, etc. Whatever you want to do, you tie it to that account. So every bot is connected to a brokerage account or paper trading account. You got to choose it here. Once you choose it here, it's locked into that. That connection is made, and then a bot can trade in that account. We'll just leave it in our paper trading account for now.
Next thing that we have to do is we have to give it an allocation. So this is the total amount that we're gonna allocate to the bot to open new positions. You can obviously open positions that are smaller than this. You can do a lot of controls around how much you wanna allocate in positions, but this is your final backstop, fail-safe, safeguard to the bot itself. You're telling the bot, "Look, you got $2,000. That's the final amount. Don't ever allocate more than that amount." So we'll say, you know, $2,000 in this case.
Next thing that we're gonna do is we're gonna set some position limits. So this is really cool because what you can do with position limits is you can automatically turn off scanners whenever these limits are reached. So as the bot is scanning, if it hits one position like enters one new position, then for the day, the scanner will turn off. And it will automatically stop looking for new positions because it already hit its position limit for the day—same thing with total position limits. So you can enter one position per day. You can say, "Bot, you can enter three total positions at any one time."
So one position per day, but three total positions at any one time. So one today, one tomorrow, one the next day. You could do one today, one in three days, one in another three days, but whenever it gets at three positions, it stops looking for new positions until a position slot opens up.
So in our case, we'll do something a little bit more flexible. We'll say that we're gonna give it four positions in any one day and four positions in total. You get four signals on all the things that we're looking. Great, grab all the trades in the same day; just don't ever trade more than four active positions at a time. Okay?
Once we're good to go here, we're gonna simply go here and create our bot. By the way, there's no limit on closing. So you can close whenever you want. Limits are just there as a protection and safeguard in case you want to limit the number of trades per day. Make sure the bots don't go crazy entering positions. You tell it exactly how many positions you want it to enter and when you want those to get it.
So now we've got our new bot shell in place. So what we're gonna do is we're gonna go over to automations. We're gonna start building out our actual automations. Remember, automations are the brains of your bot. This is the instruction manual. This is where you tell the bot what to do, what to look at, what decisions to make, and what actions to take.
You're basically taking all the things that you do manually now and just plug in them into the bot, telling the bot what to do. In this case, we're gonna build out our scanner first. Scanners are exactly what they sound like. They scan for and try to find new positions. So think about all the things that you do that you want the bot to do now for you that would look for, make decisions around entering new positions.
So we're gonna build out our new scanner from scratch. We're gonna call it our stochastic scanner for spreads. Call it whatever you want. I usually like to use a word scanner in there, monitors, so I know exactly what it is and what it's doing, maybe what signals it's using, and ultimately what type of trade it's entering, okay? Whatever you want to call it, you can call it whatever you want inside of your actual list.
So first thing that we can do now is we can add an action. Actually, let me go here, and let me just make this a little bit bigger. So we're gonna start our scanner automation first with a symbol loop. Now, this is the most traditional way to do it because with a symbol loop, you first gonna tell the bot to loop through and scan a list of ticker symbols. Do you guys use this already, right? So if you go through your list, you have your stock chart open, you are checking EWW and XLF and XRT, and whatever, right?
Okay, great. Do the same thing here with your bots. So start your scanner with a symbol loop. This is gonna tell the bot what symbols you want it to loop through when it's starting to run. So, in this case, we can have a loop through symbols like SPY and FXI and XRT and EEM and GLD and XOP and TLT, FXE, and SLV and XHB. I don't know, whatever. You put all of your symbols in there that you want it to loop through.
Now, in this case, remember with our bot, we told the bot you can enter four positions at any one time, but here we're telling it to loop through and check all ten of these ticker symbols to try to find four at any one-time indicators that are overbought, oversold for stochastics. So that's good. That's gonna make all the same decisions on all of these tickers. And it's gonna loop through them one by one. So check SPY, then it'll check FXI, and XRT and EEM and GLD, etc.
So once we have our symbol loop in place, now we're gonna start having the bot make some decisions. So we add another action. This is where it gets really fun. We start adding these actions. You can include lots of decisions. So we've never seen decisions before. It's basically a bunch of algorithms on the backend that we made super super simple by just using natural language and replaceable fields and values.
So they're written just like how you would probably say them, or how you would talk them out. We just use very natural language. So you can use any of these potential recipes. We group them by bots, or positions, opportunities, etc., because there're so many different things that you can check.
So the first thing that we're gonna actually check here is we're gonna actually do a couple checks to make sure that the bot has enough capital available and that the bot has enough room to enter new position, and that the bot doesn't already have an existing position. Now again, these are some things that you might want to consider adding to your bot. So what we're gonna do here is we're gonna add this particular recipe.
This recipe here is gonna check and see if the bot has exactly one or zero or five or ten or whatever the case is, positions with an existing symbol. In this case, we wanna check and make sure that the bot has exactly zero positions with whatever symbol we're currently looping through. Now, remember for this scanner, we do not want the bot to overlap positions. If the bot is gonna get into a position, we want it to get into one position and one position only for every single symbol, right?
We don't want ten positions in the SLV. We want one position. One great trade when we get that stochastic signal. So what we can do is we can filter out and make sure that the bot doesn't enter overlapping positions by just saying the bot has exactly 0 positions with that symbol. Now you can type in a symbol here like SLV, but then it will check SLV for every single symbol.
So what you can do is you can actually use this field right here, which is called a custom input. And basically, what that does it links that symbol field to whatever symbol is currently being looped through. Does that make sense?
So if SPY's being looped through the current time, it will check and see if the bot has 0 positions in SPY. If FXI is being looped through, it will check and see if it has 0 positions in FXI. So all that you have to do is you just have to use that field to connect this custom input with that symbol field. Now you don't have to plug in every single symbol. The bot just intuitively knows to check that symbol, whatever symbol that it's currently looping through, at the time.
As it's looping through, not to be the dead horse. It's gonna check SPY first, and then it's gonna make a decision on SPY and go all the way down the decision tree for that ticker. And come back around and go to FXI, go all the way down the decision tree for that one, and so on and so on. So does the bot have 0 position with that symbol? No, simply end the automation. We're gonna leave this branch empty for the no path. For that symbol, the bot has more than 0 positions which will be any possible positions, go ahead and leave that branch completely open.
Now down the yes path, if it does have exactly 0 position, so we are not overlapping. Let's go ahead and make another decision. And I split these out because you can split them out or group decisions in there. You can do whatever you want to inside of your bot. I wanna go down and add this particular recipe here. The bot can open a new position, right? There's room for the bot to open a new position.
Well, that makes sense, right? So I wanna make sure, you know, can the bot open a new positions like there's a position slot available for the bot to open a position. If you don't add this, the bot will just try to open a position, you'll get a warning, and that's okay. But this is a way to clear out make your bots run super clean and smooth. I wanna make sure the bot doesn't have an existing position in that symbol, and I wanna make sure that the bot can open a new position. That there's room inside the portfolio.
Doesn't really matter which order you want them order to go in in this case. One can block the other one, so you can make some match if you want to, but in this case, we'd like to go ahead and check for that existing symbol first, and then you can do the new position. So now we're gonna start to make some decisions with stochastic.
So we know the bot doesn't have any positions. We know that the bot can open a new position. Okay, now we want the bot to check some technical indicators. So we go all the way down here to our indicator section, where we can check the stochastic recipe. Now because stochastic is a primadonna symbol, it requires its own special recipe because it's got a lot of different variables that you can adjust and modify with this, right?
Some the other ones can fit nicely in the nice type of recipe like this where you can modify tons of different indicators inside one recipe. But in this case, with stochastic, it has its own little recipe formula. So just like all the other formulas and all the other decisions here, all you simply have to do is create variables and set your actual fields for everything you want in this particular recipe.
So first thing that we're gonna do is we're gonna connect this to our symbol field. That again will check every symbol that we're looping through. So if we ever change these symbols, this will automatically flow through. Next thing that we're gonna set is our K period. You can set it to whatever you want, whatever make sense for you. In this case, we'll just keep it at the default five. The D period, again, you can set to whatever you want. We'll that to three, and then the smoothing period. As with the other ones, you can set it to whatever you want here, and we'll just keep it at three as well.
Next thing you can choose is you can choose whether to use symbol moving average version or exponential moving average version. We'll just keep it SMA. Now we're gonna choose whether the stochastic line is above or below the value that we're gonna check.
Now, this is where you're gonna give your stochastic bot its signal. Start to generate that signal for trading.
Now the first thing that we wanna check in our case is we wanna check and see if the stochastic line is above 80. Remember that screenshot that we had when we started? We saw an overbought market. So if stochastic overbought is the line, the stochastic line above, and then we'll plug in the value here as 80. This is what you can do. You can set the value manually here, which means that anytime you wanna go in and edit this value, which you can do, you'll have to open up the automation editor. You have to find in this recipe, come in here, and edit that value.
Which sounds like a lot. Still not a lot, but it's more than you need to do. So, in this case, we can credit custom input for this field and create our own flexible value input for this field in this automation. And in this case, we're gonna call this one our stochastic high level. Set the default value at 80. And now what we can do, and I'll show you once we save this automation, is we can go in and make very quick, very fast modifications to this automation on the fly using custom input.
So we'll create our own input for this field called stochastic high level, and then we'll go ahead and save it. Now, instead of using the actual raw number 80. Now our value is whatever this stochastic high level is that we're gonna set. Last thing that we have to choose is the period. You can choose to check this intraday which means like at the time that the automation is running, the current live calculated the intraday value of stochastic. Or you can check a value from the day ago, or we can check a value from two days ago or five days ago, whatever the case is, okay?
So here is where we would set it, and I would say you would do this using intraday. Once we have this recipe in place, which is checking to see if stochastic is above our high stochastic level. So 80 where this is what we're gonna use. Then we can go ahead and save this to our automation.
Now that's a lot of stuff that's included in that decision. So we can modify this, and we can just modify the caption for our decision. Say, "Is stochastic overbought?" right? I mean, that's a lot easier; it sounds a lot easier. Let me just modify this, is stochastic overbought? Now, all that stuff is still saved here because this is the actual recipe you're using, but your caption can be cleaned up, so you know exactly what you're doing inside of your bots.
Next thing that we're gonna do is we're gonna build out the other side of our technical indicator. So if stochastic is not overbought. Well, what do we wanna check? We wanna check and see if stochastic is oversold now, right? Because this is tracking if stochastic is overbought. But if it's not overbought, so we don't have a reading on that stochastic signal, then we wanna check and see if stochastic is oversold.
So we're gonna go in, and we're gonna add another decision recipe. Scroll down to our indicators. We'll use that same recipe, and we'll build it basically the same way. We'll use our symbol fields; we'll go through all the prompts for the K and D and smoothing periods. Keep it at an SMA, but this time we're gonna change this to what? We're gonna modify this because now we're looking for stochastic being oversold. So we're gonna check and see if the stochastic line is below some value which would be 20 for us.
Again here, we can type in 20. We can just always use 20 if you know you will always always always use 20, great, just type in 20. But if you think you might modify, edit, create some flexible fields that you wanna use, later on, you can create a custom input. Now, in this case, we don't wanna reuse the exact same input for high level that doesn't make any sense. We want two different values for stochastic to check. We want stochastic to check a high level and below level. So
here we're gonna call this one stochastic low level. And then, we can set a default value of 20.
Now in here, we're gonna just confirm everything. We still wanna do intraday, and then we're gonna go ahead and save this to our automation. We go down here, and again we can just modify this to clean this up a little bit. Is stochastic oversold? Right?
So, in this case, is it overbought? Is it oversold? We're gonna check both of those as we go through our automation. So we're just progressively going through every single decision we want the bot to make in the order that we want the bot to make it. We want the bot to check and see if there's 0 positions with that symbol. If no, stop for that symbol. If yes, keep going.
Does the bot have room to open another position? No? Great, stop the automation. Check it again later. If yes, keep going. Then we get to the last two decisions, and we're asking the bot, is stochastic overbought? Yes, okay, great, we wanna start building out a trade over here. Is stochastic oversold? Yes, we wanna start building out a trade over here. If it is neither overbought or neither oversold, kinda middle of the road, then we just want the automation to end.
And this is truly the beauty of doing this. Is that you don't always have to have the automation running, right? You don't always have to have the automation entering positions. So you want the automation running but not always making trades. You want it looking all the time for that perfect trading opportunity.
So if stochastic is not overbought or if stochastic is not oversold, and is in the middle of the road, just let the automation end and come back to it again in 15 minutes, which is great because you don't have to do that. Check it all over again. Maybe something changed. Check it all day, all week, all month, until you get that perfect signal. That's beauty of doing this.
So now what do we have to do? Now we have to build out our actual trades, right? So if stochastic is overbought. Stochastic is overbought; what do we want to do in these scenarios? Well, we want to probably sell a call spread where you could buy and put a debit spread. I would prefer selling the out-of-the-money high probability call spread with that signal. And then when stochastic is oversold, we wanna sell in out the money high probability put spread. So we're just waiting for these two things to happen.
Remember anything that's not overbought or oversold, so anything in the middle range here, we don't want the bot to do anything. Just want the automation to end, and we want the bot to keep checking and try again later.
So what we're gonna do now is we're gonna build this out inside of our bot. so inside of our bot now, we're gonna build out our trade when stochastic is overbought. So is stochastic overbought? Yes, great, I want you to open a new position. I want you to open a short call spread. So this is where you would build out everything that you want for your particular type of trade that you would do.
Notice for any of these fields here, you can create custom inputs, or you can link them to an existing input that is the same. So, in this case, we can link this to the symbol, which means that the symbol of whatever has an overbought reading would automatically pull in and would enter this type of trade.
Notice you can go in and modify your different expiration. You can determine an expiration at least 30 days or exactly 30 days of any series or just monthly or something between this date and that date. You can do a lot here with your decision recipes—same thing with your strikes. There's a lot of decision recipes on how you can choose your different strikes. I will let you all go crazy with that by yourselves, and we'll just keep this as the default settings for right now.
Last thing that you can choose here the second the last thing you could choose is the quantity of contracts or the amount that you trade. You can type in an exact quantity of contracts. You can say, bot, every time you get a signal, do two contracts. Or you can say every time you get a signal, trade up to $500 of risk for that particular trade. And the bot will calculate the risk in the width, in the credit, and all that stuff automatically for you and enter the appropriate size.
Or you could you another recipe which is one of my favorites, and you can say do 1% of the bot's allocation. So as the bot grows, or as the bot decline, or whatever the case is, it will keep a 1% allocation as you go. Does that make sense?
So pretty intuitive that you can do that. You could then tell the bot just keep a 2% allocation, so as the bot grows, your allocation and your trade size goes up. If the bot has a drawdown, your trade size is compressed as well until you could recover, right? Pretty smart. You can do that automatically. And by the way, you don't ever have to calculate position sides ever again. It's a really easy way to do it.
So I'm gonna keep this one as one contract. You guys can go in there and modify once you get the template and make it whatever you want. Last thing that you do is you can select how you want the orders to go over to your broker. Now, I don't know about you guys, but how many people have tried smart pricing, like a live trading with smart pricing? Just let me know in the comments.
Is that once you see it, it's crazy. It's bananas. And you see the orders come in, and I was actually testing trade a year today. And we had to do a test where we had to open a trade with a bot, close it in the trading platform and then come back into the bot like see if it, like, messed up or anything. Like we just do a lot of tests like that, right?
And I was in the platform, and I was like, you know, I had to cancel and replace the order inside of a broker platform, and it's so foreign to me now to do that. And it takes so much time. It's crazy. Once you see smart pricing, cancel or replace orders so fast. I mean, you'll never go back to do anything again.
So with the smart pricing, you tell the bot how you want it to send orders. You say I want it to do normal smart pricing. I want to be patient with my orders, so try up to five prices if the spread is wide, 20 seconds apart, and the bot will fire orders. Wait, if it doesn't get filled, cancel, fire another order, wait, if it doesn't get filled, cancel, fire another order does it automatically for you.
And then you can tell it to stop. You can be like, you know what? Stop at 60% of the bid/ask spread, or whatever the case is. You just let the bot take control of that. Whatever you want to do, you set it; you tell the bot exactly how you want orders to go to your broker. Once you're good to go here, you simply hit save, and that adds the open position action to your bot.
And this is great because the bot was gonna check all of these things before it gets to the point of even submitting the order to your broker. I don't have any positions in this ticker. I can open a position. Stochastic is overbought. Okay, fine, send the order to my broker. Now, if Stochastic is oversold, we wanna do the same thing, but we wanna open up a new position that is a short put spread.
So remember, this time, if stochastic is oversold, we're gonna open up a new position that's a short put spread. We link this to our symbol; we fill out all the fields and variables to make it the perfect short put spread for our portfolio. Once we're good, we just simply hit save, okay? So now we've got our two different dynamic strategies going at the same time. Anytime that anything is overbought sell a cold spread. And anytime is anything is oversold, sell a put spread.
Now here's the way that I like to do this. I'll just spend a little bit more time on this because I promise promise promise promise, this is, for me, the most valuable thing that you can do with bots, and that is opportunity filtering. So this right here, these two things, these two positions are our trading opportunities. We're telling the bot to send an order to the broker and try to fill a trade. That's why we group them in here as possible opportunities for positions. We're attempting to make a position and open something in our broker.
What you can do now that you've got these in place is you can perceive these decisions with new decisions. Look at how I do this, I go to the actual open position action, and I go down here to proceed with. That means I'm gonna put a decision right in front of this one and what I can do now is crazy powerful stuff because I already have my open position action in place. And I can add new decisions that are specifically geared towards filtering these trading opportunities.
So in this section of recipes, here we have opportunities. Opportunities are exactly what they sound like. They're not trades yet; they're not new positions yet, right? Notice down here, we have a section for positions. These are the things that the bot has opened, existing positions. We'll get to those here a little bit with our monitors.
Opportunity filters is a potential trade. You can let the bot filter your potential trade that you're getting into to make sure that all of the criteria that you would normally want are present before the order get submitted to your broker. This is how you would do it. So you basically select the recipe like this one; opportunity bid/ask spread. You would plug in the trading opportunity that you want the bot to check. And in this case, because we've already built out our positions, we already know what we want to get into, the bots are smart enough to bring those in as recent opportunities.
So the bots are like, "Hey, do you mean the short call spread or the short put spread?" Because we're doing this on the call spread, we say, "Yeah, that short call spread." So yes, I wanna reconfirm that's what I want you to check. Please, Mr. Bot, check my symbols, 30 day, 30 delta, ten delta short put spread, and make sure that the bid/ask spread is less than some amount.
You put in whatever amount you want here. Less than 10 cents, less than 5 cents, less than 15 cents, right? You can make it a custom input, so you can flex it a little bit, and you can make a variable. But now, every single time that the automation gets to the step before the order goes to your broker, think about this, before the order goes to your broker, it's going to check the bid/ask spread.
How many people legitimately check the bid/ask spread before they send an order? Every single time without fail, never forget. Right? If you do, you're not a human; you're a robot, okay? I've done it where I just like rushed through, and I'm like ah gonna make a trade and throw it in there, and I don't check it. Let the bot do this, right? Let the bot always check it because maybe pricing is better in the afternoon. Maybe it's better in the morning one time. But like whenever that spread is tight enough to send an order, so you have minimal "slip it john: your orders, then let the bot send an order. But let the bot block it if the spread is not tight enough.
That's a really good recipe what I think everybody should have. Everybody should use opportunity bid/ask spread is less than inside their bots. Most of the bot templates, I'm pretty sure all the bot templates that we shared include that. A lot of people include that in there, okay?
So I want you to check, Mr. Bot, that the bid/ask spread is less than 10 cents. The other thing you can do is you can group other things in here. So maybe you're not done with that; maybe you wanna check something else. Maybe you wanna check one particular leg's open interest. So you wanna say- actually, you know what, let's do this. We've done that one on a number of list.
Let's check the opportunity's chance of profit. So this is actually pretty cool. You can check the probability of profit of a potential trade. So you can say, "Okay, pull the opportunity," so we know this opportunity is our short call spread, and I want you to check and make sure that the chance of profit. And it will automatically calculate the strike, and then the break-even, and reference that exact break-even based on the credit that's possibly gonna be received on the trade. It uses pessimistic pricing on it, right? So It's gonna check intelligently to see what the chance of profit is on this trade.
And then you can plug it in, you can say, I want the change of profit more than 70%. So if the chance of profit on this trade is less than 70%, scrap it and check again. Maybe in 15 minutes pricing has changed, the market's changed, and now the chance of profit is more than 70%. So you can do that. And by adding decisions together, now what I'm doing is I'm grouping all of my filters in one block.
I'm saying, "Bot, only follow the yes path, which by the way, is to open a position. If the bid/ask spread is less than 10 cents, and the chance of profit is more than 70%." So you can make those whatever you want, and you can keep grouping. You can add even more decisions as you keep going down. But you basically just tell the bot all the things that you want it to check before it sends the order to your broker.
So I just go ahead and save these. Bot says, where do you want to go. I say I want to proceed the yes path. So now think about this for a second. Just one second and think logically about this. You got your trading signal that you wanted. The bot has room doesn't have an existing position. You got the signal that you wanted.
You want to get into a short call spread, but before you do, you need to check some stuff. You need to check some value, some market data, and this is where you check it, right here. You do all of your group decisions in here and make sure they're all saying the same thing. And only if those are all true do you let the bot send the order to the broker.
If one of those is not true, don't do it, right? So don't do it. You can let the bot end at that path. See, all it goes down the no path, right? Maybe the spreads too wide. Okay, great, end the automation and check again in another 15 minutes. That's the beauty of it. Maybe later in the day, all of those things become true; spreads are tighter, markets are getting more value, there's more liquidity. Okay, great, that's a better opportunity to trade, but you're not checking that anymore, okay?
Now let's do that really quickly on the short put side, so we can keep going. So I'm gonna proceed this short put with some more decisions. We're gonna use some different ones here just to mix it up, okay? You use whatever ones you want. We're still gonna use the bid/ask spread. That's a really good one to always use. We're gonna reference that same opportunity or same short put spread. Make sure that the bid/ask spread is less than whatever we want. We'll just say 10 cents.
We're gonna add another one here, and I'm going a little bit faster on this side, but it's really important to build these out and show you how to build them out. They're super easy to do.
We're gonna do this recipe here, which is to check an individual leg. So we're gonna check individual leg properties. We're gonna say, "Bot, pull all the data on this potential trade. But I want you to look at the short put leg in particular." So notice how I just toggle this? I can do the long leg of the strategy, the short leg, the call leg, whatever. But in this case which is a short put spread, so I'm gonna look at the short put leg, and then I can reference all of these different market data for that leg. Not the whole thing, just the actual leg.
So if you trade and you are like, you know what? Every time I trade a short put spread, I want the volume on that short put spread to be greater than 100 contracts for the day. Great, just tell the bot to check that. So the first run of the automations in the morning, maybe there's 50 people who have traded. Now the next one there's 95, then later in the day, there's 120. Okay, great. Now there's enough volume for you to feel comfortable to trade. That's fine; you can do that and just check the volume on this, right?
And then you can go ahead and just say save. Once you add of your stuff that you want the bot to check, just go ahead and save it. Add it to the yes path, and now you're good to go. Okay? So now our scanner automation, for all intents and purposes, is built out. You can do a lot more with this, and please do and then add it to the community template that I'll share at the end of this workshop and add back your version and share with everyone.
Don't covet it. Share with other people, share your version, your ideas, your different ways of doing it. This is just one way to get you started. So our automations built out. Our scanner for spreads is totally built out, so we're gonna go ahead and just exit out the editor. When we exit out the editor, notice that we have two new inputs that we have to confirm. Do you guys remember that we added these?
Now, these are the defaults that we set, so they're here as the default. But watch this; if I want to modify this, I can just say 70 and 30 right here. When I hit save, that's what the automation will use. So if I hit save, the automation will use 70 and 30. If I wanna come back in here and I'm like, you know what, I like 80 and 20 better. Great, you just do 80, 20, and then you go ahead and save. And that's the new inputs that the automation will use. So it's literally that fast. That's why custom inputs are so fun because you can go in and then just modify as many times as you want, all of your inputs for your bots.
Next thing that we have to do is we have to build out our monitor automations. Now, you guys remember we have two different strategies that we could potentially get into. We can get into a put credit spread, or we can get into a call credit spread. You guys remember that?
So what we could do is we could add two monitor automations. You could add two monitor automations that divide up the positions that are coming in and ask questions like, is this a put credit spread? Go this way. Is this a call credit spread? Go that way. Or you could have a monitor automation for each type of strategy that the bot might enter.
This is probably the more traditional classic approach. So we're gonna do that, but we're not gonna build our monitors from scratch. We're gonna grab some monitors we've already built, or we've already saved from somebody else's template. Now listen, this is truly the coolest thing you can do. Go into the community save a bunch of templates that people have shared willingly. And then see what they do. Save their automation to your library. And now you have your own versions.
So like I go in, and I grab a bunch of examples from the community myself, and I see what people are doing. I learn, I evolve, it's a trader and like see oh that's the cool way of doing it. I like that; I'll include that, or I didn't know that you know, maybe that's a good decision recipe I should include, or that's a good way to do that. Do that, right? And then you can have your own monitor automations.
Now, in this case, we have two here called 50% call spread manager 50% put spread manager. Let's go ahead and create a copy of one of these. Now when I create a copy and this really key, I'm not using the exact same automation and modifying that. I'm creating a new version of that. A copy that now becomes a new automation I can modify.
Now I want to do this because if other bots are using that automation, and maybe I know that other bots are using that automation, I don't wanna mess with that if other bots are using it. So if this is a brand new build, a different way of doing it, I just want to create a copy of this automation. Now when I create a copy like you see here, right? In here, when I create a copy, notice that it just appends this, and it just says copy, right? You can modify that.
So now I'm gonna call this call spread manager for stochastics. Oh, this is my new one, and I didn't have to start rebuilding it from scratch. I can just use what already exist out there, and I can just modify this one because I create a copy. It's not gonna interfere with the other bots that are running.
So let's go through how this one is set up. This one is currently set up to start with a position loop. Now position loop is very similar to a symbol loop. Symbol loops, when we introduce them earlier in the scanner, is when you loop through tickers looking for potential trades. So what do you think a position loop is doing?
A position loop is looping through any positions that the bot has, and then you can filter those positions and say, "Okay, I only wanna take short call spread positions." So if the bot has ten positions and two are short call spreads, this monitor automation will only look at the two short call spreads. This is how you can make your bots strategically with laser pinpoint precision manage different types of trades inside the same bot.
You can have a bot that does long calls, long puts, short put spreads, iron butterflies, iron condor stocks, whatever, and have them all managed by different monitor automations—each looking for one position type. So, in this case, I'm saying only look at short call spreads. Okay, great. What do I wanna do with short call spreads?
So the first thing I might wanna do is check and see if the premium decrease by 50%. That would mean that I have a 50% profit. So I use this recipe here for premium on the position decreased by 50% since it was opened. So that's a pretty easy one. If it did decrease by 50%, go ahead close the position.
Now, this another one if the premium didn't decrease by 50%. I want to check and see if the position expires in three days. Maybe I'm getting close to expiration, and I wanna see if the position expires in three days. If it does, go ahead and close the position—pretty simple, pretty basic monitor automation.
But I wanna do some stuff that's a little bit different for the stochastic manager. So there's a lot of things that you could do, but here's one different way that you can manage it. First thing that you could do is let the position get checked for a 50% profit. That's a really easy one. If you have a profit, take it like that's the first check you should do with your position.
Next thing that I wanna do here is I wanna modify this. So I wanna see if the position now expires in less than 15 market days, okay? I wanna modify this decision for less than 15 market days. And now I wanna remove this close position action because what I wanna do now is I want to check and see if I have a smaller profit if I'm closer to expiration.
The original monitor automation only checks for 50%, or the position was at three days of expiration. But I know you guys, and I know you, girls, if there's ladies on here, which I think there are, right? I know you guys. If you're getting close to expiration, you're likely to take the smaller profit. Would you agree? Like I've done it too, where I'm like I'm taking a 50% profit, and then you're ten days from expiration, and you're like, okay fine, I will take a 25% profit, right? So you can do that. You can check and see if you have a smaller profit, right? Yeah. You hate seeing it go negative.
So what you can do is you can do this. You can say if I'm 15 days from expiration, right? Then I wanna check and see if the position premium decreased by, say, 25%. So I'm gonna go down here to my position recipes. News flash, position recipes only work inside of your monitor automations because you have to have positions. If you don't have a position, there's nothing to reference for the position, right? So, that's what positions mean.
So here we're gonna check, and we're gonna link this to the position that it's looping through, just like it loops through those symbols. Check and see if the premium went down and this time, we're gonna be at 25%. Remember for short call spread. An option selling strategy is when the premium goes down; that's actually a profit for you.
So now we're gonna check and see if the premium went down by 25%. But we would only make this check. This is what's key; we only check this if we're inside 15 days from expiration. Okay, we're inside 15 days, and we have a 25% profit. Fine, take the position. Bot, you have my approval to go ahead and close the position.
So what else could we do? So for not inside 15 days, we could just let the automation run, and we could check and see if, you know, at some point, we'd get inside 15 days, then we're gonna check for 25% profit. Well, what if we don't have a 25% profit? Well, then we could go down the path of also checking to see if we get closer to expiration.
So now we can say, okay, position expires in, fine, let's say the position expires in less than ten days. I mean, I'm really like dragging this out to different examples here, but I'm showing you how you can do this. Does the position expires in 15 days? Yes. Does it have a 25% profit? Take it. Does the position expire in 10 days? Yes. Okay, do we have a 10% profit because, like inside ten days, I think I'm more willing to take a 10% profit, so you just continue to group and add this logic all the way down, right?
Position premium decreased by 10%. Okay, fine, take the position off. I'm willing to take a 10% profit. I wanted 50, but inside 15 days, I'll take 25, and inside ten days, I'll take 10%, and so on, and so on, and so on. Now, if I don't have a 10% profit, now I wanna make some other decisions, right?
I just wanna keep going here. I just wanna say, "Okay, I wanna see if the position now expires in less than a day." Because if it expires in less than one market day, I don't care what happens. There's no profit-taking. We probably don't have any profit at that point, right? So we just wanna close the position so we don't get assigned.
You do this already. Like you're manually doing this non-stop. Probably with a calculator on your desk, or your phone, or whatever. You're calculating all these profits as you go and making these decisions. Just tell the bot to do that.
Now here's another one that you could do. This is a really cool one, okay? A little bit more advanced. You ready for this one? So here's what you can do on this version, and I'll do this for the call spread. I'll leave it off for the put spread version, okay? This is still the call spread manager.
Let's say we're inside ten days to expiration, okay? So the position expires in less than ten days. We're on this path. The position premium decreased by 10%. Do we have a 10% profit? Take it. The position expires in less than one day, close it. What else could you do down this path? If you're inside ten days, you don't have a profit, and the position doesn't expire in a day, you could also have the bot check and see if the position is currently being challenged.
So think about this, you could have the bot check and see if the position is currently being challenged. So you could go here to position, and you could look up this recipe here for positions underlying price. And you could say, okay, the position's underlying price is above my short call strike. Right there. So if you're inside ten days without a profit, and the position doesn't expire in the next day, you could check and see if the position is getting challenged. And then, if the position is getting challenged, you could also choose to close it early.
Now, this is really cool because you don't have to close the position inside ten days if it's not challenged if you don't want to. If you don't want to do this, just delete it. Right? You don't want to close it when it's challenged, but here's a thing is the bot won't close the position in ten days unless it's challenged. That's cool, right?
So if you're in ten days, and you don't have a profit, and you're not challenged yet. Think about this. The stock has not run up against you; then the bot intelligently lets the position stay open a little bit longer because you don't have a profit, but you're not quite challenged yet. So you're still in that zone where you could be winning on the trade. Let it hold the position just a little bit longer.
There's a lot in here and a lot more you can do, and please do. Like when you get a copy of this, and we share this in the community here in a little bit. Get a copy, modify it, add it back. Promise? You gotta do this. This is gonna help each other out.
Okay, so here's what we're gonna do now. We're gonna save this to our monitors. So we're gonna save this automations brand new, right? So we're gonna save it to our folder. We can go ahead and exit out of this; then, we can add this to our list of monitors. So we have our stochastic scanner for spreads, now we have our call spread manager for stochastic, and now we need our put spread manager. Remember? We still have our put spread manager.
But check this out because we already built out the call spread. Let's assume we wanna do exactly the same type of management just for the put spread. But put spreads are slightly different for challenged positions and things like that, right? So, let's add another automation, and now instead of using our call spread manager. We're gonna do this again. We're gonna create another copy.
We don't have to build this thing from scratch. Create another copy, and we're gonna modify this exact one and make a couple tweaks so that it fits for put spreads. So we'll call this one obviously not the call spread manager. We'll call it put spread manager for stochastic. So we're gonna call this put spread manager for stochastic.
We're gonna modify some of the fields to make it useable for put spreads. Like we're gonna edit the position loop to check for short put spreads. Position decreases by 15%? That's good. That's same for put spread. Position expires in 15 days, great. Position decreased by 25%, expires in 10 days. 10% one day, blab la bla blab la. Great. This last one here we have to modify.
But, notice I didn't have to rebuild the whole automation. I can just modify this one decision recipe. Check and see if the underlying price is now below my short put spread. Right? Because that's what I'm doing now. Now I'm trading the other side, so I need to check and see if the underlying price is below my short put strike. And if it is, then I wanna go ahead and close the position.
I think that I don't know, no one time me on this, right? But probably less than a minute, we took an existing automation that we already built out. Created a copy of it, tweaked a couple little decisions, and now we have a completely custom, fully built-out put spread manager for our stochastic bot. Exactly the same logic, just flipped to the other side.
So now we have that logic built out for put spreads, and again you can modify it. Maybe on your put spreads, you wanna change your inside ten day profit to something like 15%. Whatever. You make that modification. It's only here for your put spreads. Only here for your put spreads because this is a new automation that you build-out. Once you're good to go, you can save this again. Save this new version to your folders inside your library, so you always have a copy of it, and you can reuse it in another bot. And then you simply just go out of here and then save this to your monitor automations. Okay?
So at this point now, our stochastic swing trading bot is truly built out. It's looking for potential opportunities to get into positions in these tickers. It's checking to see if there's an existing position in that symbol. If the bot can open a position. If stochastic is overbought or oversold. Doing some opportunity filtering and then ultimately opening some new positions. Right?
Depending on the position that the bot opens, either the call spread manager or the put spread manager will take over the monitoring of that position for us. And run that position all the way through the expiration in cycle appropriately looking for our different profit in different times until expirations. Progressively inching down our profit target as we go through the expiration cycle and deciding if we want to take the position off when the position gets challenged—literally, everything that you would do normally inside a bot or inside your trading. Just now, you can automate it.
All right, so here's what I'm gonna do. I'm gonna go ahead and show you guys how to save this as a template. So one of the cool things that you can do is take any bot that you build, okay? You take any bot that you build and create a template out of it.
So one of the bot workshops that we'll be doing, I don't know if it's the next one or it's the one after, is about workshop on building 100 ticker trading strategy. I'm gonna show you how to use a bot level inputs and create clones, just swap out tickers, so you can run 100 ticker strategy if you wanted to using all the same automations and same stuff, okay? It's gonna be cool. But it uses template. Template is bases for allowing the bots to do that, okay?
So if you wanted to save this as a template, you just go up here to the settings, and you go down to save as a template. What saving as a template does is it memorialize it, all of the automations, and all of the settings for this bot in your library.
By the way, we don't limit anyone on saving templates. Nobody has found the limit yet on saving templates, and there's a lot of templates that people have saved. I want you to save templates. Save bots templates all over the place because it's just a repository of ideas that you can have inside of your account. Does that make sense? So go ahead and save everything as a template.
So, in this case, this is a template. It's a brand-new template, and we can just give it a short description like looks for scans for stochastic overbought and oversold readings for short put and short call. We can just say for short put/call credit spread trading. I don't know, whatever you want to do—short, very simple description. You can adjust the position limits, put those in there and then go ahead and save.
Now when I go and view that template, this is in my library of templates. I know how many clones I've created out of this, how many clones have been created from this. The version that I've saved, when it was last updated, which was today, right when we just did this. I can even peek in on any of the automations.
This is truly like, you wanna be a really good bot trader in this community? Save a bunch of templates, and then go just look at what people do. Like save 100, 200 templates, and look at what people do inside their automations. You can dive into each of these and look exactly what they do inside their automations like, oh, okay, premium decreased by 15% since it was opened. It's all right here for you, okay?
So that's what you can do, just look in there. And then what I can do is I can share this into the community, okay? I can share this into the community. So inside of here, that's a thanks for joining this workshop. Here's the variation of our stochastic trading bot that we put together. We'll put the recording in there. See you on the next workshop.
You guys ready for this? It's gonna go in there. Then I hit create, and then it's in there. So if you go in right now into the community, you can grab this version of the bot template, and then you can use this as your own and make modification to it just like what we did earlier. So you can take our monitors, our scanners like it's all yours once you create a clone or a copy of this right inside of the community. Okay?
So you guys have already done that by refreshing here. You guys need to go in there and create copies and clones of this right away. Okay? All right, so that wraps up for tonight.