Skip to main content

BTST Positional Trading

Introducing POSITIONAL/BTST ALGO on AlgoTest​

BTST Trading on AlgoTest​

Positional Trading on AlgoTest​

We're excited to introduce our most requested feature --- POSITIONAL and BTST Trading Strategies on Algo! 

Now along with backtesting you can trade and forward test your BTST and Positional Algo Strategies on AlgoTest. 

Whether you want to buy today and sell tomorrow or hold onto your trades for several days or weeks, this feature makes it easy. The convenience of Algo Trading for your Positional and BTST strategies is a winning combination!

What is BTST and Positional Trading?​

Before diving into the specifics of this feature, let's explain the basics:

  • BTST (Buy Today, Sell Tomorrow): This is a trading strategy where you buy a contract today and sell it the next day before the market closes. 

  • Positional Trading: This is a longer-term approach where you hold a position for several days or weeks. You enter a trade based on your strategy logic and wait until your exit condition is satisfied.

Our new feature lets you automate these types of trades. Instead of manually watching the market and placing orders, the system will automatically place buy and sell orders based on your strategy. This saves you time and ensures that trades happen exactly when they need to.

Access BTST/POSITIONAL on AlgoTest​

Step 1 - Login to AlgoTest​

  • Login to AlgoTest.in and go to the Algo Trade button as shown in the image below.

Step 2 - Visit the BTST Algo Trade​

  • Click on the Positional/BTST Algo Trade button to access Positional/BTST Algo Trade page as shown in the image below.

Step 3 - Access your BTST/Positional Algos​

Your BTST/Positional algos will be displayed here. You can also search for a specific algo strategy from the search bar as shown in the image below :

Step 4 - Setup Execution Settings​

  • Click on Edit Execution/Setup Execution Settings as shown in the image below.

  • It will show you a list of features available to customise your order execution. Click on Setup Execution Settings to save them.

For more detailed instructions please refer to : Execution Settings Documentation

Step 5 - Select Strategy​

Click on the strategy you wish to activate:

  • You can click on the activate button on the strategy you want to activate as shown in the image below :

Step 6 - Setup Entry Time & Exit Time​

Setup Entry Time and Exit time: By default, the entry and exit date and time will be automatically set based on your strategy logic. However, you have the option to modify these settings here if needed. You can set the entry time and exit time as shown in the image below. You can fine-tune your entry and exit within the following limits:

Entry Time:

  • Earliest time: 09:15:15 AM

  • Latest time: 03:29:00 PM

Exit Time:

  • Earliest time: 09:15:05 AM

  • Latest time: 03:29:30 PM

Step 7 - Activate Strategy​

Click on the Activate button once you have setup the entry time and exit time, as shown below :

This will activate the strategy and strategy will start as per the entry time you have set.

Important - Restart your strategy DAILY​

info

Restart the previous day's activated BTST or Positional strategies. This means that if you had activated a strategy the previous day, it will not automatically continue the next day. 

warning

You must manually restart the strategy to ensure it runs.

To restart your previous day's activated BTST or positional strategies go to BTST/Positional Algo Trading Page

  • Click on the restart button on the strategy as shown in the image below :

Key Rules and Timings for Trade Execution​

1. When does the system start monitoring trades?​

  • 09:15:05 AM - The system starts monitoring your strategy at 09:15:05 AM every day IF restarted before the market. That means if there is a gap up or gap down and your defined SL gets hit, then the Exit order shall be taken at 9:15:05.

  • Restart After Market open:  

Let's assume you restart your strategy at 09:45:05 AM then the algo will begin monitoring at the same time. 

All your SL and target conditions will be checked after you have restarted your strategy.

If you don't restart the strategy, then the algo will not monitor anything. It will start monitoring only once you restart the strategy.

  • Restart after Expiry Date: If you don't restart a BTST/Algo strategy and try to restart the strategy post expiry of its contracts, then instead of restarting, the strategy will return an error state.

Restart after strategy EXIT TIME: If the exit time in the strategy is 9:20 am and you restart the algo at 9:30 am then the strategy will not exit at its intended strategy EXIT TIME but rather at the time you restart the strategy or at 9:30 am

2. What happens if a few of the contracts expire before the strategy exit?​

  • Only the expiring contract is closed automatically, while the rest of your open positions (with later expiries) remain open.

For instance :

  • If you are trading an open contract that expires today, the system will automatically exit the position at 3:29:30 PM. 

  • The other remaining legs (other open contracts that will expire later i.e. next weekly or monthly expiry legs), will still be active and will continue to be managed by the algo. 

For example, if your strategy includes two legs a weekly expiry on 17th October and another with a next weekly expiry on 24th October. So algo will automatically exit the 17th October leg at 17 Oct at 3:29:30 PM. The other remaining legs, will still be active and will continue to be managed by the algo.

3. Till what time does the system take new orders or re-entry orders?​

  • No new orders or re-entries will be placed after 3:29:55 PM. For example, if a leg's stoploss is hit at 3:29:56 PM and a re-entry is triggered, the algo will not place the re-entry order since it's past the 3:29:55 PM cutoff time.

When does this not apply?

  • If the system has already selected a trade leg (an instruction to buy/sell based on your strategy) before 3:29:55, it will try to place the order until 3:29:59 PM. 

  • After this time, no further orders will be placed for the day.

4. Does the system roll over expired contracts?​

  • Algo doesn't perform a rollover when the strategy is first activated. However, rollover will happen only if a re-entry (Overall SL, Target, etc.) condition is fulfilled. 

  • The algo will always check the current, next, or monthly expiry at the time of re-entry to manage positions accordingly.

5. Carrying Over Momentum from the Previous Day​

  • If your strategy uses momentum conditions, the momentum conditions from the previous day will be carried over to the next trading day.

  • For example,  Let's assume you created a momentum based strategy with the following conditions :
    Index : Nifty
    Entry : 09:20
    Strike : ATM CE
    Positon : Buy
    Momentum Points Up : 15

  • Simple Momentum

  • Let's assume that :

9:20 Nifty ATM PE Strike = 24500

ATM Strike Premium = 200

Entry Price = 200 + 15 (Momentum Up) = 215

  • According to our momentum condition the strategy will take entry in the 24500CE strike only if the 24500 CE strike moves to 215. 

  • If this price isn't hit then it will not take any entry on that day and the momentum conditions will be carried over to the next trading day.

  • Similarly for Range Breakout strategies, If strategy's range-breakout conditions are not met on current trading day then it will not take any entry on that day and the Range breakout conditions will be carried over to the next trading day. 

  • For example let's assume you want to enter only if the high/low made between timing 09:20 to 14:30 breaks. Say your strategy will enter if  the low of a specific time range (defined by you) breaks.

  • It will not take any entry if the given range doesn't break today, then it will not take any entry on that day and the Range breakout conditions will be carried over to the next trading day.

6. Customising Your Strategy's Timings​

When you start or activate a strategy, you can change the time when the trades will start, but not the date. However, you can change the exit date as per your convenience.  You can also fine-tune your entry time and exit time within the following limits:

Entry Time:

  • Earliest time: 09:15:15 AM

  • Latest time: 03:29:00 PM

Exit Time:

  • Earliest time: 09:15:05 AM

  • Latest time: 03:29:30 PM

These timings give you flexibility to choose when your strategy should start and stop placing trades within the trading day.

7. What Happens if the Market Closes Before All Trades are Executed?​

  • If you've placed a trade (either to enter or exit a position) but the market closes before it's executed, the system will automatically handle it on the next trading day. 

  • The trade will be completed once the market opens again and the strategy is restarted. Example: Say your stoploss was  triggered at 3:29:58 and the system fired a market order to exit it which was not completed before market close. In this case, algo will retry placing the order the next trading day once you "Restarts" your strategy.

8. Do I need to restart the previous day's activated BTST or positional strategy?​

  • YES, you need to restart the previous day's activated BTST or positional strategy during the entire duration of that strategy. This means that if you had activated a strategy the previous day, it will not automatically continue the next day. 

  • You must manually restart the strategy to ensure it runs.

info

To restart your previous day's activated BTST or positional strategies go to BTST/Positional Algo Trading page.

  • Click on the restart button on the strategy as shown in the image below 

9. Select the NRML order type in Execution Settings​

  • It's essential to select the NRML (Normal) order type. NRML orders allow you to carry forward positions overnight, unlike MIS (Margin Intraday Square-off) orders, which are specifically for intraday trading and get auto-squared off before market close.

10. Activate Timings / Entry exit timings possible scenarios​

  • Let's assume that the expiry for this month is on 30th October. 

  • In your positional strategy, you've set :  

Entry Conditions - 3 days before the expiry.

Exit Conditions - 1 day before the expiry.

Case 1

Activate strategy BEFORE Entry Date: 

Activation Date = 23/10/2024 or 5 DTE

Strategy Entry Date = 27/10/2024 or 3 DTE

If you activate the strategy on 5 DTE or 23/10/2024, you will get a notification on your activation settings with the following alert:

warning

According to your Strategy logic your entry was supposed to happen 5 days from today. But we will take the entry today anyway.

Your entry date will change to the CURRENT DATE. 

note

Positional strategy calculations are based on trading days, which means only the days when the market is open (usually Monday to Friday). Weekends and holidays are excluded. So, if you set your entry for 5 days before expiry, the system will count 5 trading days, skipping any non-trading days like Saturdays, Sundays, or holidays. This ensures accurate timing for your strategy.

Case 2:

Activate strategy AFTER Entry Date:

Activation Date = 28/10/2024 or 2 DTE

Strategy Entry Date = 27/10/2024 or 3 DTE

If you activate your strategy on 2 DTE or 28/10/2024 instead of 3 DTE or the strategy Entry Date you will get the following notification

warning

According to your Strategy logic your entry was supposed to happen 1 day before today. But we will take the entry today anyway.

Your Entry date will change to the CURRENT Date (2 DTE):

Case 3:

Activate strategy AFTER Exit Date:

Activation Date = 31/10/2024 or 0 DTE

Strategy Exit Date = 30/10/2024 or 1 DTE

If you try to activate your strategy post the expiry date, your strategy will not be activated as the exit date has passed. 

You will receive an error message.

You need to change the exit date in the strategy before activating it. 

In our example above, if you activate your strategy on 31/10/2024, you will have to change the Exit date to 31/10/2024 (or the expiry date). Further, it should be noted that your Exit time should be AFTER the Entry Time in this case.

11. Leg selection for BTST(Buy Today Sell Tomorrow) Strategies​

For non-expiry days: If you are running a BTST strategy on non-expiry days, you need to select the weekly expiry in the Expiry dropdown

  • Example: Let's say today is Tuesday, October 22nd. Since this is a non-expiry day (expiry usually falls on Thursdays), and you are running a BTST (Buy Today, Sell Tomorrow) strategy, you would need to select the nearest weekly expiry date in the "Expiry" dropdown, which would be Thursday, October 24th.

For expiry days: If you are running a BTST strategy on expiry day, you need to select the Next weekly expiry in the Expiry dropdown as the current week expiry will expire today and you need to select the next weekly expiry so it will be carry forwarded for BTST.

  • Example: Let's say today is Thursday, October 24th, which is an expiry day. You are running a BTST (Buy Today, Sell Tomorrow) strategy, but since the current week expiry will expire today, you need to select the next weekly expiry in the "Expiry" dropdown. This would be Thursday, October 31st.