Have you ever wished you could instantly liquidate all your positions at once? We’ve all been there, whether it’s an unexpected black swan event or you need to free up capital in your portfolio quickly.
This video highlights a unique way to use a button in one or more of your bots. It’s a creative tool that cycles through all open positions in a single bot and exits them with a single click of a button anytime you want.
Bot buttons use an event automation you create or select from existing automations in your library. In this example, a monitor automation is used to pull the data on each individual position in the bot. A loop position action is used to repeat all actions through every open position in the bot.
A simple close position action is added after the action. When the button is clicked, all positions are immediately exited. No additional criteria are needed. It’s that simple.
As a reminder, be careful if you add this style of button because it goes through and immediately closes any positions you have open in the bot. This is a very powerful button that may be prudent to add as a final safeguard to any bot you have with open positions.
This is another way to leverage automated bot technology and manual trading because you are ultimately in control of clicking a button that can perform multiple closing actions simultaneously much faster than you could exit the positions manually.
In this video, I'm going to quickly show you how to add a bot button that liquidates all positions instantly in your bot. Just one use case that you can have for bot buttons, which are super flexible as you're building out your bots and automations.
Now inside of this demo bot, you can see inside the position tab I have no positions open, no positions closed, and I have 0/10 positions available. Inside the bot settings, I told the bot that it could open ten positions per day and ten positions in total.
Inside of our automation tab here, I already have a bot button set up. This button is set up to instantly open a short put spread for whatever ticker I set up inside of the actual automation.
So what I'm going to do is I'm going to open a number of positions really quickly here with this bot button and then show you how to create a bot button that liquidates all positions at the click of a button. A really cool way that you can do some sort of hybrid trading right inside of your bot.
So I'm going to click the button here and then select the ticker symbol that I want. So, in this case, I'll do something like SPY. We'll run the automation. Let it try to open that position. We'll go ahead and click the button again, select another ticker symbol, like TLT, and just open a number of different positions right here in the bot.
Now, this is using all the pre-defined criteria that I set up when I set up this actual button to run this particular short put spread position. And if I go over to the position tab, you'll notice I've got three positions now. Two that have already been opened, and one that's in the process of still trying to open a position.
If I just simply refresh really quick, you can see now I've got three positions open inside of the bot.
That happen really quickly because I could do this right now with a bot button.
Now what I want to do is set up a new button that liquidates the entire portfolio. Every position that I have, no matter what ticker symbol or what trades it's in, with the click of a button.
So to add a new button, I can go up here to add our own button, or I can add the button from our event section here. I'm simply going to click on the plus icon here, go down to the choice of event that I want to be a button click. That's the way that I want to trigger this automation.
I don't want to trigger it on a repeating schedule or when the market opens or when the market closes. I want to trigger this automation only when I click this particular button.
And I can give the button some text, like liquidate all positions. That way, I know what's going to happen when I click that button.
Next thing I'm going to do is I'm going to create a new automation. This is going to be the automation that runs anytime I click this button. I'm going to call it something like button click, so I know what it's going to be used for, and then I can call it liquidate all positions.
Again, you can give it whatever name you want that seems appropriate for you. But what I like to do with my automation is tell the automation the name how I'm going to be using it inside of my bots, like with a button click.
Next thing I'm going to do is I'm going to start this automation by just simply looping through all the positions that the bot has. Not going to filter it by the position type or any tags. I just want the bot to repeat through every position and then simply set an action to close each position. Nothing else.
I don't want the bot to make any other decisions. I simply want the bot to repeat through every position as soon as the button is clicked and execute a close position action. Submit an order to the broker to try and close every single position that we have.
So if the bot has one position, it will close one. If it has two, it will close two. And if it has ten, it will loop through every single one of those ten positions and then submit a close position order to our broker.
Once we're good to go here, we simply hit "Save," and now our new custom button is set up. All we have to do is simply hit save, and then we can see inside the top of our automation. We've got now two buttons that we have. One to open short put spread, and one to liquidate all positions that we have.
Remember, soon as I click this button right here inside of my automation tab. It's going to execute and start running that automation that we just created to loop through every position and simply close all of your positions.
Now, I like some of these buttons inside of my bots, and a lot of other users on the outside of platform use buttons very similar to this to give them control to at any point choose to close all positions.
For example, if you have a bunch of positions and they're all showing profits, maybe you don't want to manage the positions normally. Just want to close everything you have right now and take profits off the table. So you could do that right here with the click of a button.
Now, remember, we have three positions going right now. So I'm just going to go ahead and click this button to run the automation.
Notice that it repeated through every single position that we had and executed a close position action. Now, if we go back over to our positions screen, you can see every single position here is in the process of trying to close the position. And some of these positions you can see already filling as we're clicking around.
If I just simply refresh my screen, you can see that two of the positions have already closed, and one is still in the process of closing,
Again, just another refresh, and now you can see all positions have been closed. I didn't do anything else inside of this automation except click the button to close all of our positions.
You can actually see this is well inside of your log. You can see every single action that the bot is taking. Notice here that I can click the button three times to open the short put spread positions to build those short put spreads as we're building out this video for you.
And then finally, I click the button to liquidate all positions, which took four actions inside of our portfolio to loop through each position and then simply close everything that we had.
Again this is a really cool use case for how you can build bots and automations and link them together with a single custom button inside of your platform.