• Getting started
    • Steps to get started
    • Subscribe to a paid plan
    • Instructions
    • Pricing
    • Discounted Pro
  • Features (Trade logic)
    • List of all Trading features
    • Entry logic: Entry by Premium
    • Entry logic: ATM %
    • Entry logic: Straddle Width
    • Entry logic: Straddle Premium
    • Move Stoploss to Cost
    • Positional trades
    • Premium Matching functionality
    • Re-Entry / Re-Execute
    • Wait & Trade
    • Underlying based Entries & Exits
    • Range Breakout
  • Advanced Settings
    • List of all Advanced Settings
    • Entry order delay & Exit order delay
    • Calculate entry & exit using Average price or LTP
    • Re-entry method
    • Re-entry timing settings
    • SL order placement delay
    • Re-entry max count Type
    • Re-execute order delay
  • Order types
    • Order type: SL-Limit
    • Limit / SL-Limit EXIT orders
    • Limit / SL-Limit ENTRY Orders
  • Other features
    • Square off individual legs
    • Clientwise Stoploss & Target
    • Auto exit on margin error
    • Retry button for individual orders
    • Telegram Notifications
    • Advance placement of Re-Entry orders
    • Multiplier
  • Important topics
    • Limit Price Protection (LPP) mechanism
    • BSE Sensex, Bankex & NSE Midcpnifty
  • Broker Setup
    • Zerodha
    • Upstox
    • IIFL
    • Bigul by Bonanza
    • Tradejini
    • 5Paisa
    • AC Agarwal
    • Jainam Duck
    • Flattrade
    • Kotak Securities (Kotak Neo)
    • Fyers
    • Motilal Oswal

Re-Entry / Re-Execute


What is the Re-Entry / Re-Execute feature?

This feature enables the re-entry of positions which have exited upon hitting the Target and/or Stoploss.

Re-entry & Re-execute, can work on Target based exit and Stoploss based exits, both.

I. Settings:

  1. Re-entry checkbox: This is a checkbox under the legs configuration table that allows you to activate or deactivate the Re-entry feature for a particular algo.
  2. Re-entry type drop down: Select from different re-entry methods from this drop down menu displayed in the legs configuration table. Here are some of the re-entry types:
    1. RE-COST
    2. W&T RE-COST
    3. RE EXECUTE
    4. W&T RE EXECUTE
    5. RE-COST REVERSE
    6. W&T RE-COST REVERSE
    7. RE EXECUTE REVERSE
    8. W&T RE EXECUTE REVERSE
    9. RE EXECUTE with SQUARE OFF ALL LEGS
  3. Max no. of re-entries input
  4. MTM Re-entry drop down:
    1. Square off & re-enter
    2. Square off, reverse positions & re-enter
  5. Max no. of re-entries input.
  6. Re-entry method: This setting can be found under the Advanced Settings section on the algo configuration page. Re-entry method has 2 types:
    1. LTP
    2. Candle Close

Understanding the different Re-Entry types in detail:

1. RE COST (Re-entry at Cost ie. re-entry at the original average entry price):

Re-Cost setting

After the Stoploss hits for an individual leg, if the price comes back to the original average entry price, the algo will re-enter the same leg/symbol. If the original position was a Sell, then the re-entered position will also be a Sell. The same Stoploss or Target settings will get applied to the re-entered leg upon re-entry.

For multiple re-entries, the re-entry price for the upcoming re-entry will be the average entry price or cost price of the previous re-entry/entry

RE COST Example:

Settings given for a particular leg:

  • Side: Sell
  • SL: 10 points
  • Re-entry method: LTP
  • No. of times re-entry: 3

Original entry (1st entry):

  • Entry price: 100
  • Stoploss price: 110

1st re-entry:

  • SL hit at 110
  • Re-entry at 99 (average entry price / any price the entry is executed at or below 100)
  • SL set to 109

2nd re-entry:

  • SL Hit at 109
  • Re-entry at 96 (average entry price / any price the entry is executed at or below 99)
  • SL set to 106

3rd re-entry:

  • SL Hit at 106
  • Re-entry at 95 (any price at or below 96)
  • SL set to 105
For multiple re-entries, the re-entry price for the upcoming re-entry will be the average entry price or cost price of the previous re-entry/entry.

2. W&T RE-COST (Wait & trade + Re-entry at Cost):

W&T RE-COST setting

In this case, a Wait & Trade setting and Re-entry setting is configured to run together for a particular leg(s). The initial original entry will take place as per the Wait & Trade condition. Once the SL of any open leg is hit, the wait & trade condition is again applied to the previous entry price. Similarly, for multiple re-entries as well, the wait & trade setting is again applied to the previous re-entry price. 

W&T RE-COST Example:

Settings given for a particular leg:

  • Side: Sell
  • Wait & trade setting: 2 points ⬇️
  • SL: 10 points
  • Re-entry method: LTP
  • No. of times re-entry: 3

Original entry (1st entry):

  • Reference price: 102
  • Entry price: 100 (102-2 points ⬇️)
  • Stoploss price: 110

1st re-entry:

  • SL hit at 110
  • Re-entry reference price 100 (100 was the previous entry's average entry price)
  • Re-entry entry price (100 - 2 points ⬇️ = 98)
  • Re-entry at 94 (average entry price / any price the entry is executed at or below 98)
  • SL set to 104

2nd re-entry:

  • SL hit at 104
  • Re-entry reference price 94 (94 was the previous entry's average entry price)
  • Re-entry entry price (94 - 2 points ⬇️ = 92)
  • Re-entry at 89 (average entry price / any price the entry is executed at or below 92)
  • SL set to 99

3rd re-entry:

  • SL hit at 99
  • Re-entry reference price 89 (89 was the previous entry's average entry price)
  • Re-entry entry price (89 - 2 points points ⬇️ = 87)
  • Re-entry at 80 (average entry price / any price the entry is executed at or below 87)
  • SL set to 90

3. RE EXECUTE (Re-execute entry logic immediately after hitting stoploss):

Re-Execute setting

As soon as the SL of a particular leg(s) is hit, the algo will re-execute the entry logic and re-enter immediately. A different strike price may be selected for re-entry if the ATM has changed as per the movement of the underlying. In this case, if the original leg was a Sell, then the re-entered leg will also be a Sell. The same SL or Target settings will get applied upon re-entry.

RE EXECUTE Example:

An ATM strike of 37400 CE was sold at 200 premium with SL setting 30%, ie. SL price 260. If the SL hits, the algo sqaures off the leg at 260, and the algo runs the re-execute condition immediately. ie. checks the latest ATM based on the underlying, in this case the underlying’s price was 37460, then the ATM strike of 37500 CE is selected and a new Sell position is taken in 37500 CE immediately.

4. W&T RE EXECUTE:

W&T Re-Execute setting

In this case, a Wait & Trade setting and Re-Execute setting is configured to run together for a particular leg(s). The initial original entry will take place as per the Wait & Trade condition. Once the SL of any open leg is hit, the wait & trade and re-execute condition is again applied immediately, and a strike for the re-entry is selected.

At the same time, it also checks the LTP of the selected strike at the time the SL was hit, and applies the Wait & Trade condition to the LTP to derive the entry price, and the re-execute type re-entry is executed once the price reaches the entry price.

W&T RE-EXECUTE Example:

Settings given for a particular leg:

  • Side: Sell
  • Wait & trade setting: 2 points ⬇️
  • SL: 10 points
  • Re-entry method: LTP

Original entry (1st entry):

  • Reference price: 102 (start time price)
  • Entry price: 100 (102 - 2 points ⬇️ )
  • SL set to 110

1st re-entry:

  • SL hit at 110
  • LTP during SL hit 109 (reference price for the next re-entry)
  • Re-entry price (109 -2 points ⬇️ = 107)
  • Entry at 107
  • SL set to 117

2nd re-entry:

  • SL hit at 117
  • LTP during SL hit 115 (reference price for the next re-entry)
  • Re-entry price (115 -2 points ⬇️ = 113)
  • Entry at 113
  • SL set to 123

3rd re-entry:

  • SL hit at 123
  • LTP during SL hit 120 (reference price for the next re-entry)
  • Re-entry price (120 - 2 points ⬇️ = 118)
  • Entry at 118
  • SL set to 128

5. RE-COST REVERSE

After the Stoploss hits for an individual leg, if the price comes back to the original average entry price, the algo will re-enter the same leg/symbol. As the name suggests, if the original position was a Sell, then the re-entered position will be a Buy. The same Stoploss or Target settings will get applied to the re-entered leg upon re-entry. For every re-entry the side will alternate. If the first original entry is a Sell, then the 1st re-entry will be a Buy, the 2nd re-entry will be a Sell, and the 3rd re-entry will be a Buy and so on.

RE COST REVERSE Example:

Settings given for a particular leg:

  • Side: SELL
  • SL: 10 points
  • Re-entry method: LTP
  • Re-entry type: RE COST REVERSE
  • No. of times re-entry: 3

Original entry (1st entry):

  • Entry price: 100
  • Stoploss price: 110
  • Side: SELL

1st re-entry:

  • SL hit at 110
  • Re-entry at 99 (average entry price / any price the entry is executed at or below 100)
  • SL set to 89
  • Side: BUY

2nd re-entry:

  • SL Hit at 89
  • Re-entry at 100 (average entry price / any price the entry is executed at or above 99)
  • SL set to 110
  • Side: SELL

3rd re-entry:

  • SL Hit at 110
  • Re-entry at 98 (any price at or below 100)
  • SL set to 88
  • Side: BUY

6. W&T RE-COST REVERSE

In this case, a Wait & Trade setting and Re-Entry RE COST setting is configured to run together for a particular leg(s). The initial original entry will take place as per the Wait & Trade condition. Once the SL of any open leg is hit, the wait & trade condition is again applied to the previous entry price and the side of the re-entry is changed ie. if the previous entry was a Sell, the the following re-entry will be a Buy. Similarly, for multiple re-entries as well, the wait & trade setting is again applied on the previous entry's entry price and the side is changed at the same time.

W&T RE-COST REVERSE Example:

Settings given for a particular leg:

  • Side: Sell
  • Wait & trade setting: 2 points ⬇️
  • SL: 10 points
  • Re-entry method: LTP
  • Re-entry type: W&T RE-COST REVERSE 

Original entry (1st entry):

  • Reference price: 102 (start time price)
  • Entry price: 100 (102 - 2 points ⬇️ )
  • SL set to 110
  • Side: Sell

1st re-entry:

  • SL hit at 110
  • LTP during SL hit 109 (reference price for the next re-entry)
  • Re-entry price (109 -2 points ⬇️ = 107)
  • Entry at 107
  • Side: Buy
  • SL set to 97

2nd re-entry:

  • SL hit at 97
  • LTP during SL hit 98 (reference price for the next re-entry)
  • Re-entry price (98 -2 points ⬇️ = 96)
  • Entry at 96
  • Side: Sell
  • SL set to 106

3rd re-entry:

  • SL hit at 106
  • LTP during SL hit 106 (reference price for the next re-entry)
  • Re-entry price (106 - 2 points ⬇️ = 104)
  • Entry at 104
  • Side: Buy
  • SL set to 94

7. RE EXECUTE REVERSE

As soon as the SL of a particular leg(s) is hit, the algo will re-execute the entry logic and re-enter immediately. A different strike price may be selected for re-entry if the ATM has changed as per the movement of the underlying. The difference is that in this case, if the original leg was a Sell, then the re-entered leg will be a Buy, and it would keep alternating between Sell and Buy for all following re-entries. The same SL or Target as per configured settings, will get applied upon re-entry. 

RE EXECUTE REVERSE Example: 

Settings given for a particular leg:

  • Side: Sell
  • SL: 10 points
  • Re-entry type: RE EXECUTE REVERSE
  • Re-entry method: LTP
  • No. of times re-entry: 3

Original entry (1st entry):

  • Entry price: 100
  • SL set to 110

1st re-entry:

  • SL hit at 110
  • Entry at 111
  • Side: Buy
  • SL set to 101

2nd re-entry:

  • SL hit at 101
  • Entry at 100
  • Side: Sell
  • SL set to 110

3rd re-entry:

  • SL hit at 110
  • Entry at 111
  • Side: Buy
  • SL set to 101

8. W&T RE EXECUTE REVERSE

In this case, a Wait & Trade setting and Re-Entry RE EXECUTE setting is configured to run together for a particular leg(s). The initial original entry will take place as per the Wait & Trade condition. Once the SL of any open leg is hit, the entry condition with Wait & Trade applied is re-executed again.

The reference price considered to calculate the entry price would be the LTP of the selected strike at the time the leg hit the stoploss. Along with this, the side will also be reversed, so if the previous entry was a Sell, then the re-entry would be Buy. Similarly, for multiple re-entries as well, the whole entry is again re-executed and the side is changed at the same time, alternately every time.

Note that the strike ie. the symbol the re-entry is going to take place in, can change based on the spot movement and configured legs.

W&T RE EXECUTE REVERSE Example:

Settings given for a particular leg:

  • Side: Sell
  • Wait & trade setting: 2 points ⬇️
  • SL: 10 points
  • Re-entry method: LTP
  • Re-entry type: W&T RE EXECUTE REVERSE

Original entry (1st entry):

  • Reference price: 102 (start time price)
  • Entry price: 100 (102 - 2 points ⬇️ )
  • SL set to 110
  • Side: Sell

1st re-entry:

  • SL hit at 110
  • LTP during SL hit 109 (reference price for the next re-entry)
  • Re-entry price (109 -2 points ⬇️ = 107)
  • Entry at 107
  • Side: Buy
  • SL set to 97

2nd re-entry:

  • SL hit at 97
  • LTP during SL hit 98 (reference price for the next re-entry)
  • Re-entry price (98 -2 points ⬇️ = 96)
  • Entry at 96
  • Side: Sell
  • SL set to 106

3rd re-entry:

  • SL hit at 106
  • LTP during SL hit 105 (reference price for the next re-entry)
  • Re-entry price (105 - 2 points ⬇️ = 103)
  • Entry at 104
  • Side: Buy
  • SL set to 94

9. RE EXECUTE with SQUARE OFF ALL LEGS

Re-Execute with Square of all legs setting

In this case, when any one leg hits the stoploss, all open positions are squared off, and the entry logic is re-executed again immediately and all configure legs re-enter. The same stoplosses and targets are applied to all the legs again, as per the settings. As this is the Re-Execute type of re-entry, the strikes selected for re-entries may change.

When Wait & Trade + RE EXECUTE + Square off all legs is configured together, note that the Wait & Trade condition will get applied to the re-entry orders as well. Which means, that after the SL is hit, the whole entry logic is re-executed, which is - strike selection, calculating entry price after applying wait & trade condition to the reference price.

Note, that this re-entry type setting ie. RE EXECUTE gets replicated for all legs when square off all legs is selected for any 1 leg.

Example:

10. RE EXECUTE REVERSE with SQUARE OFF ALL LEGS

In this case, when any one leg hits the stoploss, all open positions are squared off, and the entry logic is re-executed again immediately and all configure legs re-enter but the side changes. So, if the first entry was a Sell, then the Re-Execute re-entry would be Buy. For every re-entry the side will alternate. The same stoplosses and targets are applied to all the legs again, as per the settings. As this is the Re-Execute type of re-entry, the strikes selected for re-entries may change.

When Wait & Trade + RE EXECUTE REVERSE + Square off all legs is configured together, note that the Wait & Trade condition will get applied to the re-entry orders as well. Which means, that after the SL is hit, the whole entry logic is re-executed, which is - strike selection, calculating entry price after applying wait & trade condition to the reference price, and changing of the side.

Example:

II. MTM RE - ENTRY Feature

1. MTM RE-ENTRY - Square off & re-enter (Re-enter if the combined premium SL (or MTM SL) is hit:

When the MTM SL hits, the algo will immediately square off all legs and open new positions in all the legs. It is possible that the strike prices change or stay the same, based on the latest price of the underlying and the leg configuration settings.

Example:

An Iron Condor is sold with the following positions, Sell 37400 CE, Sell 37400 PE, Buy 37500 CE, Buy 37300 PE with an SL set to Rs. 2000.

If the SL hits, the algo will select the latest strikes as per the legs configured in the settings and the underlying, and immediately re-enter the Iron Condor. Based on the underlying price and legs configured, the strikes re-entered may or may not be the same.

2. MTM REVERSE RE-ENTRY - Square off, reverse positions & re-enter (Re-enter reverse positions if the combined premium SL (or MTM SL) is hit:

MTM Reverse Re-entry setting

When the MTM SL hits, the algo will immediately square off all legs and open new positions in all the legs but in reverse. If the original positions were a Sell, then the re-entered positions would be Buy. For this type of re-entry, the legs will keep alternating between Sell & Buy, every time it re-enters. It is possible that the strike prices change or stay the same, based on the latest price of the underlying and the leg configuration settings.

How does Individual leg Re-Entry and MTM SL Re-Entry work together? 

Refer to the image above.

Let’s look at an example where Individual leg re-entries and MTM SL re-entries, both, are configured in an algo, let’s see the example of CE leg which is sold, in this case, 39400 CE, which has been given a maximum number of re-entries setting of 2.

Here, upon taking positions, the 39400 CE leg hit SL at 14:34:31, and re-entered at 14:34:49. That will be considered as re-entry 1.

Later, MTM SL got hit and MTM re-entry condition was fulfilled due to which all original positions were squared off and a re-entry happened in all legs at 14:37:33. This MTM re-entry will not be considered a re-entry for the individual leg 39400 CE which has already had one re-entry ie. re-entry 1 as mentioned earlier.

A little later, 39400 CE’s individual SL is hit, and a re-entry condition is fulfilled and it re-enters. This individual re-entry of 39400 CE will be considered the re-entry 2, post which if SL were to hit, then a 3rd re-entry will not be executed for this individual leg.

But in case if MTM SL Re-entry had a maximum number of times re-entry of 2, then all the legs including 39400 CE will re-enter as an MTM re-entry along with the other legs. In short, MTM SL re-entry does not include or count an individual re-entry.

III. Other Settings:

1. Number of times re-entry setting:

With this setting, you can define the maximum number of times re-entry should happen. You can individually define max no. of re-entries for each individual leg and MTM re-entries.

If a value of ‘2’ is given for this setting, it will mean that the position will be taken a total of 3 times, ie. (1 x original entry) + (2 x re-entries).

A maximum of 20 re-entries is allowed, if a max limit were to be set. But, if “No max limit’ setting is selected, the algo will re-enter any number of times, the re-entry condition is fulfilled.

2. Re-entry time settings:

Re-entry time settings can be found under the Advanced Settings on the algo configuration page.

a. Re-entry only after (time):

In the above example, re-entry will take place only after 11:15:05. Even if the Re-entry condition is fulfilled before 11:15:05, the algo will not re-enter. If SL is hit before 11:15:05, then the position will be closed for the whole day, the leg will not re-enter even after 11:15:05.

b. Re-entry only before (time):

In the above example, re-entry will take place only before 14:30:00. Even if the Re-entry condition is fulfilled after 14:30:00, the algo will not re-enter. If the SL is hit after 14:30:00, and the re-entry conditions are fulfilled, even then the leg(s) will not re-enter.

c. Re-entry between (time):

In the above example, re-entry will take place only between 11:15:05 and 14:30:00. If the SL is hit before 11:15:05 or after 14:30:00, the positions will be closed for the day. Even if the SL hits between the above set time, but the re-entry condition is fulfilled before 11:15:05 or after 14:30:00, the algo will not re-enter positions.

Re-Entry time settings are not compulsory when Re-Entry is configured. 
Re-Entry will function as it is supposed to without the Re-Entry timings as well. 
Re-Entry settings will only restrict the Re-Entry logic to work before, after or between the configured time.

3. Re-entry Method:

Re-Entry Method settings can be found under the Advanced Settings on the algo configuration page.

1. LTP: If this option is selected, after SL is hit, the re-entry will be triggered as soon as the LTP reaches the average entry price in the case of Re-Cost and re-entry will be triggered immediately in the case of Re-Asap. This is the current default logic

2. Candle Close: If this option is selected, after SL is hit, the algo will check if the LTP is at or below the sell entry price and at or above buying price at the end of every minute (or candle close). If this condition is fulfilled, then the re-entry will be triggered. And in the case of Re-entry Asap, after the SL is hit, the re-entry will be triggered at the end of the minute (or at candle close).

The candle close logic of re-entry is based on the Stockmock's re-entry logic. Use the candle close option if you want to follow Stockmock's re-entry logic

Points to remember (Re-entry feature):

  1. Once the trade is active Re-entry type setting cannot be modified, but, maximum number of re-entries setting can be modified.
  2. For multiple re-entries, the re-entry price for the upcoming re-entry will be the average entry price or cost price of the previous re-entry/entry, and not the very first original entry.
  3. For MTM SL, the values set in the MTM SL section will be considered as SL, if this SL is hit, then the re-entry condition will be checked. If you want your max loss in a strategy to be 6000 only, then you can set the SL value and no. of re-entries accordingly. If SL value is set to 2000 and max re-entries is set to 2, it means the (1 x original entry) + (2 x re-entries) may make up for a max loss of 6000, after which the algo will completely exit and close the entire trade.
  4. Re-entry orders will be fired ONLY when re-entry condition is fulfilled, even if Entry/Exit order type is Limit/SL-Limit. The algo will not place re-entry Limit/SL-Limit orders right after the original or previous SL is hit (ie. re-entry orders will not be placed in advance).
  5. The re-entry feature can work along with Move SL to Cost feature.
  6. Once the positions are taken by the algo, you can see that each leg is color coded with a color strip in the Status column. This color coding helps differentiate between unique individual open positions and the positions re-entered.
  7. Re-entry logic for Re-cost with Trailing SL enabled: If the SL of a leg trails and goes into profit, upon hitting the trailed SL, re-entry will not happen till the price goes back to the original entry price (ie. the price crosses over the entry price). This logic is specific only to a scenario where re-cost type re-entry and trailing SL are both enabled together.