Shape Shape Shape Shape

Stockmock and Algotest strategy automation tool (Time Based Straddle Strangle)

Stockmock and Algotest strategy automation tool (Time Based Straddle Strangle)

(2 customer reviews)

Time-Based Options straddle / Options strangle

Indexes: Nifty | Bank Nifty | Finnifty | Midcap Nifty | Sensex | Bankex

Are you doing Stockmock backtesting and want to automate your strategies?

WhatsApp for any doubts/queries @ https://wa.link/xhparw

Telegram channel: https://t.me/myalgomatestraddle Or search “myalgomatestraddle” in TG.

Offers:
Starter plan: Get an 80% DISCOUNT on the 1st monthly subscription. Use coupon code “welcome” at the time of checkout. (Applicable one time per client ID)

Clear
Buy Now
Copy link
  • Multi A/C Execution
  • Optimised as per the API rate limit of the broker to achieve the fastest possible execution
  • Multi-Leg Strategies
  • W&T, Re-Entry, Re-Execute
    • Available on both Options SL/Target and Underlying SL/Target
    • Different configuration for each leg
    • Separate configuration for Re-entry, Re-Execute on Stoploss, and Target
Copy link

Time-Based Entry

You can configure your strategy to enter at a specific time of the day.
For example, if you want the strategy to take entry at 09:25 AM, simply set the desired entry time.

Copy link

Underlying Based Entry

Trigger entry when the Live Market Price (LTP) of your selected underlying (e.g., Nifty spot, Futures, or Synthetic Futures) crosses a certain threshold.

Example:

  • Current Nifty Spot Price: 24920
  • Entry Trigger:
    • Enter when LTP goes above 24950, or
    • Enter when LTP drops below 24900

Frequency Options:

You can choose how frequently the system should check this condition:

  • Live (tick-by-tick)
  • Candle Close Basis (1-min, 3-min, 5-min)

Start Time Validation:

The system will not evaluate the condition before the specified Start Time.

Example: If Start Time = 09:30:00, the condition will only be checked on or after 09:30 AM.

Copy link

ATM Straddle-Based Entry

Trigger entry based on the ATM (At-the-Money) Straddle Premium.

Example:

  • Let’s say the current ATM Straddle Premium is 200
  • You want to enter when the straddle price exceeds 205

How It Works:

  • The ATM strike is automatically selected based on the underlying you choose (Spot, Futures, or Synthetic Future).
  • As the underlying price moves, the strike considered for ATM will adjust dynamically.

Frequency Options:

Just like price-based conditions, you can choose:

  • Live LTP
  • Candle Close Basis (1-min, 3-min, 5-min)

Start Time Validation:

The system will not evaluate the condition before the specified Start Time.

Example: If Start Time = 09:30:00, the condition will only be checked on or after 09:30 AM.

Copy link

Strategy Day Selection

Specific Days of the Week

You can manually choose the weekdays on which the strategy should be active.
For example: Run only on Monday, Wednesday, and Friday

 

Days from Expiry

Alternatively, you can set the strategy to run based on the number of days remaining to expiry of the underlying instrument.

Example:

  • Run the strategy only on 2 days before expiry (e.g., Tuesday for a Thursday expiry)
Copy link

Account Selection

Decide which trading accounts the strategy should execute on.

Individual Account Selection

Manually pick one or more accounts on which the strategy should run.

Account Groups

You can create groups of accounts (e.g.,10L Fund, 50L Fund) and then choose an entire group for strategy execution.

Copy link

ATM Points

Select the option strike based on their distance from the ATM strike in terms of strike steps.

How it works:

  • Enter a positive number for OTM. Example: 1 means 1 strike OTM
  • Enter a negative number for ITM. Example: -1 means 1 strike ITM
  • Enter 0 to select the ATM strike

Example:

  • If BankNifty ATM is 45000, and strikes are spaced 100 points apart:
    • Input 2 → will pick 45200 (2 strikes OTM)
    • Input -1 → will pick 44900 (1 strike ITM)

 Note:

  • Enter the number of strike steps, not the strike difference in points.
    ➤ Example: For BankNifty, to pick 2 strikes away, enter 2, not 200.

If the input value is invalid or too far (e.g., the strike doesn’t exist), the system will skip the entry and show an error: “Contract not found.”

Copy link

ATM %

Select option strikes based on a percentage distance from the ATM price.

How it works:

  • Enter a positive percentage to select an OTM (Out of the Money) strike
    → Example: 0.5 = +0.5% from ATM
  • Enter a negative percentage to select an ITM (In the Money) strike
    → Example: -0.75 = -0.75% from ATM

Example:

Let’s say BankNifty’s ATM is at 45000.

  • Input 0.5
    → 0.5% of 45000 = 225
    → Selected strike: 45200 (rounded to the nearest available strike)
  • Input -0.75
    → 0.75% of 45000 = 337.5
    → Selected strike: 44700 (rounded to nearest lower available strike)

Note:

  • If the calculated strike doesn’t exist, the system will not take entry and will show an error: “Contract not found.”
Copy link

Direct Strike Input

This method allows you to manually enter the exact strike price you want to use for a leg. If you want to trade the 45200 CE, then enter 45200 in the strike input.

Note:

  • Make sure the entered strike is valid and available on the exchange.
  • If the contract does not exist (e.g., expired or incorrect strike), the system will not place the order and will show an error:
    “Contract not found.”
Copy link

Closest Premium

This method selects the option contract whose premium is closest to your target price, based on your selected comparison condition.

How it works:

You need to specify:

  • A comparison operator:
    • ~ → Closest to target premium
    • >= → Closest premium greater than or equal to your target
    • <= → Closest premium less than or equal to your target
  • A target premium value (e.g., 120)

Example:

  • Operator: ~
  • Target Premium: 120
  • Match %: 20% → Acceptable range is ±24 (20% of 120), so any strike between 96 – 144 is considered a match.

Premium Match Options

If no contract is found within the specified match range, you can choose one of the following behaviours:

  1. Avoid Entry
    → Strategy will skip this leg and not place the order.
  2. Keep Waiting
    → The system will wait indefinitely until a matching contract becomes available.
  3. Wait for X seconds
    → The system will wait for a fixed number of seconds.
    If no match is found within that time, you can decide whether to:

    • Avoid Entry, or
    • Select the closest available contract

Note:

  • The premium check runs live.
Copy link

Closest Delta

This method selects option contracts based on the delta value closest to your target, using the same match logic as the premium-based method.

How it works:

You need to specify:

  • A comparison operator:
    • ~ → Closest to target delta
      >= → Closest delta greater than or equal to your target
    • <= → Closest delta less than or equal to your target
  • A target delta value (e.g., 0.35)
  • A match percentage (e.g., 20%)

Example:

  • Operator: ~
  • Target Delta: 0.35
  • Match %: 20%
    → Acceptable delta range: 0.28 – 0.42 (±20% of 0.35)

Delta Match Options

If no contract is found within the specified match range, choose one of the following:

  1. Avoid Entry
    → Skip placing the order for this leg.
  2. Keep Waiting
    → System will wait until a matching contract becomes available.
  3. Wait for X seconds
    → Wait for a specified duration. If no match is found:

    • Avoid Entry, or
    • Select the closest available delta

Important Notes:

  • Delta values should be between 0 and 1.
  • Enter positive values only for both CE and PE.
Copy link

CP Strikes Based on SP

This method allows you to select CE/PE (CP) legs based on the combined premium (SP) of the ATM straddle. It is useful when you want to define strikes relative to the current premium structure.

How it works:

  • The strategy first identifies the ATM straddle premium (i.e., combined premium of ATM CE and PE).
  • You provide a target percentage of this straddle premium.
  • The system will select the CE or PE contract whose premium is closest to the calculated percentage value.

Example:

  • ATM Strike: 45000
  • ATM Straddle Premium: 500
  • Target %: 70%
  • Target Premium = 70% of 500 = 350
  • The strategy will select a CE or PE option with a premium closest to 350

Supported Comparison Operators:

  • ~ : Closest to target premium
  • >= : Premium greater than or equal to target
  • <= : Premium less than or equal to target

Note:

  • The straddle premium is determined using live market prices.
  • If no valid contract is found, fallback behaviour (e.g., avoid entry or wait) will be applied based on your configuration.
Copy link

Straddle Width

This method selects the option contract based on the width of the ATM straddle premium. It calculates a revised strike by multiplying the ATM straddle price by a user-defined width factor, adds it to the ATM strike, and rounds the result to the nearest valid strike.

How it works:

  • Calculate the ATM Straddle Premium
    Example: CE_LTP = 320, PE_LTP = 340 → SP = 320 + 340 = 660
  • Multiply Straddle premium with Width Factor (user configurable)
    Example: Width Factor = 1.5 → SPWidth = 660 × 1.5 = 990
  • Add SP Width to ATM Strike and round it to the nearest strike.
    45000 + 990 = 45990 => 46000

So it will select 46000 CE.

Copy link

W&T

Wait and Trade (W&T) allows you to delay execution until the price of the option or the underlying moves by a defined value from its trigger-time price.

You can configure W&T separately for Options and Underlying with different input types.

Option W&T Inputs

When W&T is enabled for option contracts, the system records the option premium at the moment the entry condition is met, and waits for the price to move based on the selected input.

Available Inputs:

  • Pts ↑ : Wait for the option premium to rise by X points
  • Pts ↓ : Wait for the option premium to fall by X points
  • % ↑ : Wait for the option premium to rise by X %
  • % ↓ : Wait for the option premium to fall by X %

Examples:

  • Option price at trigger: 100
    • Pts ↑ = 5 → Entry at 105
    • Pts ↓ = 10 → Entry at 90
    • % ↑ = 10% → Entry at 110
    • % ↓ = 20% → Entry at 80

Underlying W&T Inputs

When W&T is enabled for the underlying, the system records the underlying price (Spot/Future/Synthetic) at the moment of strategy trigger and waits for the price to move as configured.

Available Inputs:

  • Pts ↑ : Wait for the underlying to rise by X points
  • Pts ↓ : Wait for the underlying to fall by X points
  • % ↑ : Wait for the underlying to rise by X %
  • % ↓ : Wait for the underlying to fall by X %

Examples:

  • Underlying at trigger: 45000
    • Pts ↑ = 100 → Entry at 45100
    • Pts ↓ = 150 → Entry at 44850
    • % ↑ = 1% → Entry at 45450
    • % ↓ = 2% → Entry at 44100

Note:

For option price-based W&T only, you can choose whether to pre-place the W&T order on the broker terminal using the “Place W&T Order in Broker” checkbox available in the order settings.

Copy link

Target

The Target setting allows you to define the exit condition for each leg individually, based on either the option premium or the underlying price reaching a specific target.

You can choose one of the following target types per leg:

  • Target on Option Price
  • Target on the Underlying Price

Target on Option Price

Available Inputs:

  • TGT: % – Target in percentage terms from the entry price
  • TGT: Pts – Target in absolute points from the entry price

Examples:

  • CE Buy at 100
    • TGT: % = 20 → Exit at 120
    • TGT: Pts = 10 → Exit at 110
  • PE Sell at 150
    • TGT: % = 10 → Exit at 135
    • TGT: Pts = 30 → Exit at 120

Target on the Underlying Price

Available Inputs:

  • TGT UL: % – Target in percentage from the underlying’s entry price
  • TGT UL: Pts – Target in point movement

Direction of Target Exit based on Position Type:

  • CE Sell: Target is downside on the underlying
  • CE Buy: Target is upside on the underlying
  • PE Sell: Target is upside on the underlying
  • PE Buy: Target is downside on the underlying

Examples:

  • Underlying at entry: 45000
  • CE Buy with TGT UL: Pts = 100 → Exit at 45100
  • CE Sell with TGT UL: % = 1% → Exit at 44550
  • PE Buy with TGT UL: Pts = 200 → Exit at 44800
  • PE Sell with TGT UL: % = 2% → Exit at 45900

Note:

In the Other Settings section, using the SL/Target base configuration selection, you can configure whether the target price should be calculated based on the actual traded price (order execution price) or LTP at the time of entry. This setting is applicable only for option-based targets.

For underlying-based targets, the system always uses the underlying price at the time of entry to calculate target levels.

Copy link

Stoploss

The Stoploss setting allows you to define the exit condition for each leg individually, based on either the option premium or the underlying price reaching a specific stop level.

You can choose one of the following stop-loss types per leg:

  • Stop Loss on Option Price
  • Stoploss on the Underlying Price

Stop Loss on Option Price

Available Inputs:

  • SL: % – Stoploss in percentage terms from the entry price
  • SL: Pts – Stoploss in absolute points from the entry price

Examples:

  • CE Buy at 100
    • SL: % = 20 → Exit at 80
    • SL: Pts = 10 → Exit at 90
  • PE Sell at 150
    • SL: % = 10 → Exit at 165
    • SL: Pts = 30 → Exit at 180

Stoploss on the Underlying Price

Available Inputs:

  • SL UL: % – Stoploss in percentage from the underlying’s entry price
  • SL UL: Pts – Stoploss in point movement

Direction of Stoploss Exit based on Position Type:

  • CE Sell: Stoploss is upside on the underlying
  • CE Buy: Stoploss is downside on the underlying
  • PE Sell: Stoploss is downside on the underlying
  • PE Buy: Stoploss is upside on the underlying

Examples:

  • Underlying at entry: 45000
  • CE Buy with SL UL: Pts = 100 → Exit at 44900
  • CE Sell with SL UL: % = 1% → Exit at 45450
  • PE Buy with SL UL: Pts = 200 → Exit at 45200
  • PE Sell with SL UL: % = 2% → Exit at 44100

Note:

  • In the Other Settings section, using the SL/Target base configuration, you can choose whether the stoploss price should be calculated based on the actual traded price (order execution price) or LTP at the time of entry. This setting is applicable only for option-based stop losses.
  • For underlying-based stop losses, the system always uses the underlying price at the time of entry to calculate stop levels.
  • You can also configure whether or not to place the stoploss order in the broker terminal using the checkbox “Place SL in Broker” in the order settings. This is applicable for Option Option-based SL only. Underlying SL can’t be placed in the broker.
Copy link

Trail Stoploss

Trailing can be configured for Option SL and Underlying SL.
You can set Trail X and Trail Y in either percentage or points.

Example: Option SL – Buy Leg (X and Y in %)
Entry Type: Buy
Entry Price: 100
Initial SL %: 10% → SL = 90
Trailing X% = 5%, Trailing Y% = 5%

Calculation:

  • Initial SL = 100 − 10% = 90
  • Trail X = 100 × 5% = 5
  • Trail Y = 90 × 5% = 4.5

Trail Steps:

  • When LTP reaches 105 → SL updates to 94.5
  • When LTP reaches 110 → SL updates to 99
  • When LTP reaches 115 → SL updates to 103.5

Example: Option SL – Sell Leg (X and Y in Points)
Entry Type: Sell
Entry Price: 100
Initial SL: 10 points → SL = 110
Trailing X: 5 points
Trailing Y: 5 points

Calculation:

  • Initial SL = 100 + 10 = 110
  • Trail X = 5 points (price must move in favorable direction)
  • Trail Y = 5 points (SL shifts by 5 points per trigger)

Trail Steps:

  • When LTP reaches 95 → SL updates to 105
  • When LTP reaches 90 → SL updates to 100
  • When LTP reaches 85 → SL updates to 95

Example: Underlying SL – CE Sell Leg (X and Y in %)
Leg Type: CE
Entry Type: Sell
Underlying at Entry: 45000
Initial SL: 0.1% → SL = 45045
Trailing X: 0.1%
Trailing Y: 0.1%

Calculation:

  • Initial SL = 45000 + 0.1% = 45045
  • Trail X = 45000 × 0.1% = 45
  • Trail Y = 45045 × 0.1% = 45.05

Trail Steps:

  • When underlying reaches 44955 → SL updates to 45000
  • When underlying reaches 44910 → SL updates to 44954.95
  • When underlying reaches 44865 → SL updates to 44909.9

Example: Underlying SL – PE Sell Leg (X and Y in Points)
Leg Type: PE
Entry Type: Sell
Underlying at Entry: 45000
Initial SL: 100 points → SL = 44900
Trailing X: 20 points
Trailing Y: 20 points

Calculation:

  • Initial SL = 45000 − 100 = 44900
  • Trail X = 20 points (underlying must rise by this amount)
  • Trail Y = 20 points (SL shifts up by 20 points per trail)

Trail Steps:

  • When underlying reaches 45020 → SL updates to 44920
  • When underlying reaches 45040 → SL updates to 44940
  • When underlying reaches 45060 → SL updates to 44960

Note:

  • For option-based SL, enabling “Trail SL in Broker” in the Order Settings will push the trailed SL to the broker if “Place SL in Broker” is also enabled.
  • For Zerodha, due to a limit of 25 order modifications, the system restricts to 15 trail modifications per leg for stability.
  • For underlying-based SL, trailing happens internally and is not pushed to the broker.
Copy link

Hedge Selection

Hedge contracts can be configured for each strategy leg to reduce margin requirements or manage risk exposure. You can select the hedge contract in two ways:

  1. ATM Points Based Selection
  2. Closest Premium Based Selection 

In both methods, separate configuration is provided specifically for hedge contract selection, allowing independent control over how hedge contracts are chosen.

Additionally, there is a special option:

  • Wait for Hedge to Execute:
    If enabled, the system will place and wait for the hedge leg to execute before placing the main leg.
    If you have sufficient margin and want faster execution, you can disable this option to place both legs simultaneously. 

During exit, the system always exits the main leg first, and once completed, it exits the hedge leg.

Method 1: ATM Points Based Hedge Selection

This method selects the hedge contract based on its distance from the ATM strike in terms of strike steps.

How it works:

  • Enter the number of strike steps away from ATM strike for OTM hedge selection.
  • Example: If you enter 10, it will select the strike that is 10 steps OTM from the ATM strike. 

Example:

  • Suppose BankNifty ATM is 45000, and strikes are spaced every 100 points.
  • Input 10 → system will select strike at 45000 + (10 × 100) = 46000
  • So hedge contract selected is: BANKNIFTY 46000 CE (or PE depending on hedge leg type). 

Note:

  • Always enter the number of strike steps, not absolute strike difference in points.
    • For 1000 points away, you need to enter 10 (since strike interval is 100).
  • If the strike doesn’t exist or is too far, system skips hedge entry and displays:
    “Contract not found.” 

Method 2: Closest Premium Based Hedge Selection

This method selects the hedge contract whose premium is closest to your specified target premium using configurable match conditions.

How it works:

You need to specify:

  • A comparison operator:
    • ~ → Closest to target premium 
    • >= → Closest premium greater than or equal to target
    • <= → Closest premium less than or equal to target 
  • A target premium value

Example:

  • Operator: ~
  • Target Premium: 10
  • Match %: 50%
  • Acceptable premium range = ±5 (50% of 10), so any contract with premium between 5 to 15 will be considered a valid match. 

Premium Match Options:

If no contract is found within the specified match range, you can configure the fallback behavior:

  • Avoid Entry → The system skips this hedge leg.
    Keep Waiting → Waits indefinitely until match found.
  • Wait for X seconds → Waits for a fixed number of seconds, and if still no match:
    • Avoid Entry
    • Select closest available contract 

Note:

  • Premium check is performed live during order placement.

Hedge premium match uses a separate Hedge Match Settings section.

Copy link

Move SL to Cost

  • Whenever any leg gets exited (due to target, stoploss, or any other exit condition),
  • The system will automatically move the stoploss of all remaining open legs to their respective entry prices (cost price).
Copy link

Square off Leg Type

You can configure it with two options:

  1. One Leg
  • Only the leg where the exit condition is triggered will be exited.
  • Other legs will continue to remain open and continue to run independently. 

Example:

  • You have 3 legs running.
  • If Leg 2 hits its target, only Leg 2 will be exited.
  • Leg 1 and Leg 3 will continue to remain open as per their respective conditions.
  1. All Leg
  • As soon as any exit condition is triggered for any one leg, the system will exit all open legs immediately.

Example:

  • You have 3 legs running.
  • If Leg 2 hits its target, system will exit Leg 1, Leg 2, and Leg 3 together.
Copy link

Re-Execute Portfolio

  • This feature works only when the Square Off Leg Type is set to All Legs.
  • Once all legs are exited (due to any exit condition), the system will re-enter all legs again as a fresh execution.

Parameters

  1. Number of Re-Execute
  • You can configure how many times the full portfolio should be re-executed.
  • After the configured number of re-executions is reached, no further re-entries will be taken.
  1. Entry Type
  • You can choose how quickly the portfolio is re-executed after exit:
  1. Immediate
  • As soon as all legs are exited, the system immediately selects new contracts for all legs and executes fresh entries.
  1. Candle Closing Basis
  • After all legs are exited, the system waits for the next candle to close (on configured timeframe).
  • Once candle closes, new contracts are selected for all legs, and fresh entries are taken. 
  1. Stop Re-Execute Time
  • You can define a cut-off time.
  • If portfolio exit happens after this time, no re-execution will take place.
  • This helps to avoid late-day re-entries if desired.

Example:

  • Strategy has 3 legs.
  • Square Off Leg Type = All Legs
  • Re-Execute Portfolio: Enabled
  • Number of Re-Execute: 2
  • Entry Type: Candle Closing Basis (1 min) 

Flow:

  • First entry is taken.
  • One leg hits target → system exits all 3 legs.
  • System waits for next 1-minute candle close.
  • New contracts are selected, full portfolio re-entry happens.
  • After 2 such full re-executions, no further entries are taken. 

Note:

  • Re-Execute Portfolio works at complete strategy level.
  • Contract selection is done fresh every time based on current market conditions as per your contract selection methods.
Copy link

Combined Stoploss

The Combined SL feature allows you to define a stoploss at the portfolio level based on the combined entry price of multiple legs.

Prerequisites:

  • Minimum two legs must be present.
  • All legs must have the same entry type (all Buy or all Sell).
  • Individual leg SL must be disabled. 

How Combined SL Works:

  • Combined Entry Price = Sum of entry prices of all active legs.
  • Combined SL is calculated by adding (for Sell entry) or subtracting (for Buy entry) SL value from the combined entry price. 

Example:

  • Both legs are Sell:
    • Leg 1 entry price = 60, Leg 2 entry price = 40 → Combined Entry = 100
    • Combined SL set to 50 points → Combined SL becomes 150
  • SL monitoring happens on combined LTP of all active legs.
  • Combined SL is managed internally — not placed at broker. 

Available Parameters for Combined SL:

  • SL configuration: % or Points
  • SL Wait for X Seconds
  • Frequency to Check

Trailing SL: X and Y configurable in % or Points

Copy link

Re-Entry @ Cost for Combined SL

  • Available for Combined SL.
  • Type: LTP Based or Candle Closing Basis
  • Configurable:
    • Candle timeframe
    • Number of Re-Entries
    • Stop Re-Entry Time

Note:

Other advanced re-entry filters (Wait for Original SL, Disable Re-entry if SL moved to cost, etc.) are not applicable for Combined SL Re-Entry.

Copy link

Re-Execute for Combined SL

Re-Execute Types:

  1. Immediate
  • As soon as Combined SL hits, system exits all legs, immediately selects new contracts and re-executes. 
  1. Candle Closing Basis
  • After Combined SL hit and exit, waits for next candle close, selects new contracts and re-executes. 

Configurable Parameters:

  • Number of Re-Executes
  • Candle timeframe

Stop Re-Execute Time

Copy link

Re-Execute Reverse for Combined SL

  • Same behavior as Re-Execute, but alternates entry direction after each Combined SL hit.
Combined SL Hit Count Entry Direction (assuming initial Sell)
1st Entry Sell
After 1st SL Buy
After 2nd SL Sell
After 3rd SL Buy
Alternates each time
Copy link

Combined Target

The Combined Target feature allows you to define a target at the portfolio level based on the combined entry price of multiple legs.

Prerequisites:

  • Minimum two legs must be present.
  • All legs must have the same entry type (all Buy or all Sell).
  • Individual leg Target must be disabled. 

How Combined Target Works:

  • Combined Entry Price = Sum of entry prices of all active legs.
  • Combined Target is calculated by adding (for Buy entry) or subtracting (for Sell entry) target value from combined entry price. 

Example:

  • Both legs are Buy:
    • Leg 1 entry price = 60, Leg 2 entry price = 40 → Combined Entry = 100
    • Combined Target set to 50 points → Combined Target becomes 150
  • Target monitoring happens on combined LTP of all active legs.
  • Combined Target is managed internally — not placed at broker. 

Available Parameters for Combined Target:

  • Target configuration: % or Points

Frequency to Check

Copy link

Re-Entry @ Cost for Combined Target

  • Available for Combined Target.
  • Type: LTP Based or Candle Closing Basis
  • Configurable:
    • Candle timeframe
    • Number of Re-Entries
    • Stop Re-Entry Time 

Note:

Other advanced re-entry filters (Wait for Original SL, Disable Re-entry if SL moved to cost, etc.) are not applicable for Combined Target Re-Entry.

Copy link

Re-Execute for Combined Target

Re-Execute Types:

  1. Immediate
  • As soon as Combined Target hits, system exits all legs, immediately selects new contracts and re-executes. 
  1. Candle Closing Basis
  • After Combined Target hit and exit, waits for next candle close, selects new contracts and re-executes. 

Configurable Parameters:

  • Number of Re-Executes

Candle timeframe
Stop Re-Execute Time

Copy link
  • Same behavior as Re-Execute, but alternates entry direction after each Combined Target hit.
Combined Target Hit Count Entry Direction (assuming initial Sell)
1st Entry Sell
After 1st Target Buy
After 2nd Target Sell
After 3rd Target Buy
Alternates each time
Copy link

Entry Orders, Exit Orders (Non SL)

Order Settings allow you to control how orders are placed and managed for:

  • Entry Orders
  • Exit Orders (Apart from Pre-Punched SL orders)

You can configure different settings for Entry Orders and Exit Orders independently.

Order Type

You can select:

  1. Market Order
  • The order is sent directly to exchange at market price.
  • No revision options are available.
  • Executes at the best available price in the market.
  1. Limit Order
  • The order is placed as a limit order at a calculated price based on reference price and buffer.
  • If limit order is not filled, revision mechanism can be used to improve chances of fill. 

Limit Price Configuration (Applicable for Limit Orders Only)

  1. a) Limit Price Reference
  • LTP — Last Traded Price
  • BestBidAsk — Best Bid or Ask price (Ask for Sell, Bid for Buy)
  • ImFill — Immediate Fill Reference (uses Bid for Sell, Ask for Buy)
  • AvgBidAsk — Average of Bid and Ask 
  1. b) Limit Buffer
  • Applied over reference price to calculate the actual limit price.
  • Buffer can be defined in % or absolute points. 

Limit Price Calculation Examples

Example 1 — LTP Reference

  • Order Type: Sell
  • LTP: 100
  • Limit Buffer: 2%
  • Limit Price = 100 – (2% of 100) = 98 

Example 2 — BestBidAsk Reference

  • Order Type: Sell
  • LTP: 100, Bid: 99.8, Ask: 100.2
  • Limit Buffer: 2 points
  • Limit Price = Ask – 2 = 100.2 – 2 = 98.2 

Example 3 — ImFill Reference

  • Order Type: Sell
  • LTP: 100, Bid: 99.8, Ask: 100.2
  • Limit Buffer: 2 points
  • Limit Price = Bid – 2 = 99.8 – 2 = 97.8 

Example 4 — AvgBidAsk Reference

  • Order Type: Sell
  • LTP: 100, Bid: 99.8, Ask: 100.2
  • Limit Buffer: 2 points
  • Average Price = (99.8 + 100.2) / 2 = 100
  • Limit Price = 100 – 2 = 98 

Limit Order Revision Logic

If the limit order is not filled, the system can automatically modify it using the following two revision methods:

Option 1: Modify to Market

  • After a defined time interval (e.g. 2 sec), if limit order remains unfilled, it will be modified to Market Order.

Option 2: Revise Limit Price

  • System keeps revising the limit price after each interval to improve fill chances.
  • Parameters: 
    • Revision after (in sec): Time gap between revisions.
    • Number of revisions: Total revisions allowed.
    • After max revisions:
      • Modify to Market, or
      • Do Nothing (keep order pending)
Copy link

Order Settings for SL Orders (Placed in Broker)

Separate settings apply for orders placed as Stoploss (SL) orders in broker.

Order Type for SL Orders

  • All SL orders are always placed as Stoploss Limit Orders in broker.

Trigger Price

  • The trigger price for SL order is always set as:
    • SL Price (or W&T price if Wait & Trade is enabled)

Limit Price for SL Order

  • Once SL Trigger Price is calculated, the Limit Price is determined by applying Limit Buffer over it.

Limit Price Calculation Example

  • SL Trigger Price: 100
  • Limit Buffer: 2 points
    Limit Price = Trigger Price – Buffer = 100 – 2 = 98

(For Buy orders, buffer is added to Trigger Price; for Sell orders, buffer is subtracted.)

SL Order Revision Logic (Same as Entry/Exit orders)

  • Same as above settings for Entry and Exit (Non SL) orders

📸 [Screenshot showing SL Order Settings with Limit Buffer and Revision Logic]

Summary

Configuration Entry Orders Exit Orders (Non-SL) SL Orders
Market Order Available Available Not Available
Limit Order Available Available Always Limit
Limit Reference Available Available Available
Limit Buffer Available Available Available
Revision Logic Available Available Available
Copy link

RMS

Risk Management allows you to define limits on losses and profits to safeguard your capital and automatically exit positions when your desired limits are reached.

The same set of Risk Management parameters are provided at three layers:

  1. Strategy Level:
    Applies to the MTM (Mark-to-Market) of individual strategy instance. 
  2. Account Level:
    Applies to the combined MTM of all running strategies under the same trading account. 
  3. Global Level:
    Applies to the combined MTM of all accounts and all strategies across the system. 

Important:
The behavior of parameters remains the same across all levels — only the scope of MTM calculation changes.

Copy link

Max Loss

Max Loss defines the maximum allowed drawdown.

  • When the MTM reaches the defined Max Loss value, exit is triggered. 

Example (Strategy Level):

  • Max Loss = -5000 
  • Once total MTM of the strategy reaches -5000, it exits the strategy. 

For Account Level / Global Level:

  • If Account Level Max Loss = -10000,
    then when total MTM across all strategies in that account reaches -10000, all open positions across that account will be exited. 
  • If Global Level Max Loss = -50000,
    then when total MTM across all accounts reaches -50000, all positions in entire system will be exited. 

Parameters for Max Loss:

  • Frequency to Check: 
    1. Live (real-time tick based) 
    2. 1 min 
    3. 3 min 
    4. 5 min 
  • Exit Mode: 
    1. Immediate:
      Exit happens instantly when Max Loss condition meets. 
    2. Delayed:
      Exit happens after a user-defined delay (in seconds). 

Ticks Based:
Exit only if Max Loss condition holds true for X number of consecutive ticks.

Copy link

Trail Max Loss

Trail Max Loss allows you to dynamically tighten your Max Loss as profit increases.

Parameters:

  • Trail Max Loss X: Profit increment after which Max Loss moves. 
  • Trail Max Loss Y: Amount by which Max Loss improves on each Trail X movement. 

Example:

  • Initial Max Loss = -5000 
  • Trail Max Loss X = 1000 
  • Trail Max Loss Y = 500 

Flow:

  • Once MTM increases to 1000, Max Loss moves from -5000 to -4500. 
  • If MTM reaches 2000, Max Loss moves to -4000. 
  • If MTM reaches 3000, Max Loss moves to -3500, and so on. 

Same behavior applies for Account Level and Global Level — only MTM calculation changes as per level.

Copy link

Max Profit

Max Profit defines the maximum profit at which you want to exit and book profits.

Parameters and behavior are exactly same as Max Loss:

  • Once total MTM reaches the defined Max Profit value, exit is triggered. 
  • Example: 
    • Max Profit = 10000 
    • If MTM reaches 10000, exit happens as per configured exit mode. 
  • Frequency to Check, Exit Mode, and Ticks Based logic all apply exactly as in Max Loss. 
Copy link

Protect Profit

Protect Profit helps secure profits dynamically as your profit grows. Three modes are available:

  1. A) Lock Min Profit

Allows you to lock a fixed minimum profit once your profit crosses a threshold.

Parameters:

  • If Profit Reaches: Threshold profit level to activate lock. 
  • Lock Min Profit At: The minimum profit you want to secure. 

Example:

  • If Profit Reaches = 2000 
  • Lock Min Profit At = 500 

Flow:

  • Once MTM reaches 2000, minimum profit of 500 is locked. 
  • If MTM subsequently falls to 500, system exits to preserve the locked profit. 
  1. B) Trail Profits

Allows you to trail profits upward step-by-step as profits grow.

Parameters:

  • Increase in Profit: Profit increment after which trail happens. 
  • Trail Min Profit By: Amount to increase locked profit on each step. 

Example:

  • Increase in Profit = 1000 
  • Trail Min Profit By = 500 

Flow:

  • MTM reaches 1000 → Lock Profit = 500 
  • MTM falls to 500 → Exit. 
  • MTM reaches 2000 → Lock Profit = 1000 
  • MTM falls to 1000 → Exit. 
  • MTM reaches 3000 → Lock Profit = 1500 
  • And so on. 
  1. C) Lock & Trail Profits (Combined Logic)

Combines both Lock and Trail methods together.

Parameters:

  • If Profit Reaches: Initial threshold to activate lock. 
  • Lock Min Profit At: Initial minimum profit to secure. 
  • Increase in Profit: Profit increment for trailing. 
  • Trail Min Profit By: Amount to increase locked profit on each trail step. 

Example:

  • If Profit Reaches = 2000 
  • Lock Min Profit At = 500 
  • Increase in Profit = 1000 
  • Trail Min Profit By = 500 

Flow:

  • MTM reaches 2000 → Lock Profit = 500 
  • MTM reaches 3000 → Lock Profit = 1000 
  • MTM reaches 4000 → Lock Profit = 1500 
  • MTM reaches 5000 → Lock Profit = 2000 
  • If at any point MTM falls back to locked profit level, system exits. 

Applicable Behavior Across All Levels:

Level MTM Calculation
Strategy Level MTM of individual strategy
Account Level Total MTM across all strategies of that account
Global Level Total MTM across all accounts

 

Features at a Glance

Copy link
  • Multi A/C Execution
  • Optimised as per the API rate limit of the broker to achieve the fastest possible execution
  • Multi-Leg Strategies
  • W&T, Re-Entry, Re-Execute
    • Available on both Options SL/Target and Underlying SL/Target
    • Different configuration for each leg
    • Separate configuration for Re-entry, Re-Execute on Stoploss, and Target
Entry Settings

Copy link

Time-Based Entry

You can configure your strategy to enter at a specific time of the day.
For example, if you want the strategy to take entry at 09:25 AM, simply set the desired entry time.

Copy link

Underlying Based Entry

Trigger entry when the Live Market Price (LTP) of your selected underlying (e.g., Nifty spot, Futures, or Synthetic Futures) crosses a certain threshold.

Example:

  • Current Nifty Spot Price: 24920
  • Entry Trigger:
    • Enter when LTP goes above 24950, or
    • Enter when LTP drops below 24900

Frequency Options:

You can choose how frequently the system should check this condition:

  • Live (tick-by-tick)
  • Candle Close Basis (1-min, 3-min, 5-min)

Start Time Validation:

The system will not evaluate the condition before the specified Start Time.

Example: If Start Time = 09:30:00, the condition will only be checked on or after 09:30 AM.

Copy link

ATM Straddle-Based Entry

Trigger entry based on the ATM (At-the-Money) Straddle Premium.

Example:

  • Let’s say the current ATM Straddle Premium is 200
  • You want to enter when the straddle price exceeds 205

How It Works:

  • The ATM strike is automatically selected based on the underlying you choose (Spot, Futures, or Synthetic Future).
  • As the underlying price moves, the strike considered for ATM will adjust dynamically.

Frequency Options:

Just like price-based conditions, you can choose:

  • Live LTP
  • Candle Close Basis (1-min, 3-min, 5-min)

Start Time Validation:

The system will not evaluate the condition before the specified Start Time.

Example: If Start Time = 09:30:00, the condition will only be checked on or after 09:30 AM.

Copy link

Strategy Day Selection

Specific Days of the Week

You can manually choose the weekdays on which the strategy should be active.
For example: Run only on Monday, Wednesday, and Friday

 

Days from Expiry

Alternatively, you can set the strategy to run based on the number of days remaining to expiry of the underlying instrument.

Example:

  • Run the strategy only on 2 days before expiry (e.g., Tuesday for a Thursday expiry)

Copy link

Account Selection

Decide which trading accounts the strategy should execute on.

Individual Account Selection

Manually pick one or more accounts on which the strategy should run.

Account Groups

You can create groups of accounts (e.g.,10L Fund, 50L Fund) and then choose an entire group for strategy execution.

Contract Selection Methods

Copy link

ATM Points

Select the option strike based on their distance from the ATM strike in terms of strike steps.

How it works:

  • Enter a positive number for OTM. Example: 1 means 1 strike OTM
  • Enter a negative number for ITM. Example: -1 means 1 strike ITM
  • Enter 0 to select the ATM strike

Example:

  • If BankNifty ATM is 45000, and strikes are spaced 100 points apart:
    • Input 2 → will pick 45200 (2 strikes OTM)
    • Input -1 → will pick 44900 (1 strike ITM)

 Note:

  • Enter the number of strike steps, not the strike difference in points.
    ➤ Example: For BankNifty, to pick 2 strikes away, enter 2, not 200.

If the input value is invalid or too far (e.g., the strike doesn’t exist), the system will skip the entry and show an error: “Contract not found.”

Copy link

ATM %

Select option strikes based on a percentage distance from the ATM price.

How it works:

  • Enter a positive percentage to select an OTM (Out of the Money) strike
    → Example: 0.5 = +0.5% from ATM
  • Enter a negative percentage to select an ITM (In the Money) strike
    → Example: -0.75 = -0.75% from ATM

Example:

Let’s say BankNifty’s ATM is at 45000.

  • Input 0.5
    → 0.5% of 45000 = 225
    → Selected strike: 45200 (rounded to the nearest available strike)
  • Input -0.75
    → 0.75% of 45000 = 337.5
    → Selected strike: 44700 (rounded to nearest lower available strike)

Note:

  • If the calculated strike doesn’t exist, the system will not take entry and will show an error: “Contract not found.”

Copy link

Direct Strike Input

This method allows you to manually enter the exact strike price you want to use for a leg. If you want to trade the 45200 CE, then enter 45200 in the strike input.

Note:

  • Make sure the entered strike is valid and available on the exchange.
  • If the contract does not exist (e.g., expired or incorrect strike), the system will not place the order and will show an error:
    “Contract not found.”

Copy link

Closest Premium

This method selects the option contract whose premium is closest to your target price, based on your selected comparison condition.

How it works:

You need to specify:

  • A comparison operator:
    • ~ → Closest to target premium
    • >= → Closest premium greater than or equal to your target
    • <= → Closest premium less than or equal to your target
  • A target premium value (e.g., 120)

Example:

  • Operator: ~
  • Target Premium: 120
  • Match %: 20% → Acceptable range is ±24 (20% of 120), so any strike between 96 – 144 is considered a match.

Premium Match Options

If no contract is found within the specified match range, you can choose one of the following behaviours:

  1. Avoid Entry
    → Strategy will skip this leg and not place the order.
  2. Keep Waiting
    → The system will wait indefinitely until a matching contract becomes available.
  3. Wait for X seconds
    → The system will wait for a fixed number of seconds.
    If no match is found within that time, you can decide whether to:

    • Avoid Entry, or
    • Select the closest available contract

Note:

  • The premium check runs live.

Copy link

Closest Delta

This method selects option contracts based on the delta value closest to your target, using the same match logic as the premium-based method.

How it works:

You need to specify:

  • A comparison operator:
    • ~ → Closest to target delta
      >= → Closest delta greater than or equal to your target
    • <= → Closest delta less than or equal to your target
  • A target delta value (e.g., 0.35)
  • A match percentage (e.g., 20%)

Example:

  • Operator: ~
  • Target Delta: 0.35
  • Match %: 20%
    → Acceptable delta range: 0.28 – 0.42 (±20% of 0.35)

Delta Match Options

If no contract is found within the specified match range, choose one of the following:

  1. Avoid Entry
    → Skip placing the order for this leg.
  2. Keep Waiting
    → System will wait until a matching contract becomes available.
  3. Wait for X seconds
    → Wait for a specified duration. If no match is found:

    • Avoid Entry, or
    • Select the closest available delta

Important Notes:

  • Delta values should be between 0 and 1.
  • Enter positive values only for both CE and PE.

Copy link

CP Strikes Based on SP

This method allows you to select CE/PE (CP) legs based on the combined premium (SP) of the ATM straddle. It is useful when you want to define strikes relative to the current premium structure.

How it works:

  • The strategy first identifies the ATM straddle premium (i.e., combined premium of ATM CE and PE).
  • You provide a target percentage of this straddle premium.
  • The system will select the CE or PE contract whose premium is closest to the calculated percentage value.

Example:

  • ATM Strike: 45000
  • ATM Straddle Premium: 500
  • Target %: 70%
  • Target Premium = 70% of 500 = 350
  • The strategy will select a CE or PE option with a premium closest to 350

Supported Comparison Operators:

  • ~ : Closest to target premium
  • >= : Premium greater than or equal to target
  • <= : Premium less than or equal to target

Note:

  • The straddle premium is determined using live market prices.
  • If no valid contract is found, fallback behaviour (e.g., avoid entry or wait) will be applied based on your configuration.

Copy link

Straddle Width

This method selects the option contract based on the width of the ATM straddle premium. It calculates a revised strike by multiplying the ATM straddle price by a user-defined width factor, adds it to the ATM strike, and rounds the result to the nearest valid strike.

How it works:

  • Calculate the ATM Straddle Premium
    Example: CE_LTP = 320, PE_LTP = 340 → SP = 320 + 340 = 660
  • Multiply Straddle premium with Width Factor (user configurable)
    Example: Width Factor = 1.5 → SPWidth = 660 × 1.5 = 990
  • Add SP Width to ATM Strike and round it to the nearest strike.
    45000 + 990 = 45990 => 46000

So it will select 46000 CE.

Leg Wise Settings

Copy link

W&T

Wait and Trade (W&T) allows you to delay execution until the price of the option or the underlying moves by a defined value from its trigger-time price.

You can configure W&T separately for Options and Underlying with different input types.

Option W&T Inputs

When W&T is enabled for option contracts, the system records the option premium at the moment the entry condition is met, and waits for the price to move based on the selected input.

Available Inputs:

  • Pts ↑ : Wait for the option premium to rise by X points
  • Pts ↓ : Wait for the option premium to fall by X points
  • % ↑ : Wait for the option premium to rise by X %
  • % ↓ : Wait for the option premium to fall by X %

Examples:

  • Option price at trigger: 100
    • Pts ↑ = 5 → Entry at 105
    • Pts ↓ = 10 → Entry at 90
    • % ↑ = 10% → Entry at 110
    • % ↓ = 20% → Entry at 80

Underlying W&T Inputs

When W&T is enabled for the underlying, the system records the underlying price (Spot/Future/Synthetic) at the moment of strategy trigger and waits for the price to move as configured.

Available Inputs:

  • Pts ↑ : Wait for the underlying to rise by X points
  • Pts ↓ : Wait for the underlying to fall by X points
  • % ↑ : Wait for the underlying to rise by X %
  • % ↓ : Wait for the underlying to fall by X %

Examples:

  • Underlying at trigger: 45000
    • Pts ↑ = 100 → Entry at 45100
    • Pts ↓ = 150 → Entry at 44850
    • % ↑ = 1% → Entry at 45450
    • % ↓ = 2% → Entry at 44100

Note:

For option price-based W&T only, you can choose whether to pre-place the W&T order on the broker terminal using the “Place W&T Order in Broker” checkbox available in the order settings.

Copy link

Target

The Target setting allows you to define the exit condition for each leg individually, based on either the option premium or the underlying price reaching a specific target.

You can choose one of the following target types per leg:

  • Target on Option Price
  • Target on the Underlying Price

Target on Option Price

Available Inputs:

  • TGT: % – Target in percentage terms from the entry price
  • TGT: Pts – Target in absolute points from the entry price

Examples:

  • CE Buy at 100
    • TGT: % = 20 → Exit at 120
    • TGT: Pts = 10 → Exit at 110
  • PE Sell at 150
    • TGT: % = 10 → Exit at 135
    • TGT: Pts = 30 → Exit at 120

Target on the Underlying Price

Available Inputs:

  • TGT UL: % – Target in percentage from the underlying’s entry price
  • TGT UL: Pts – Target in point movement

Direction of Target Exit based on Position Type:

  • CE Sell: Target is downside on the underlying
  • CE Buy: Target is upside on the underlying
  • PE Sell: Target is upside on the underlying
  • PE Buy: Target is downside on the underlying

Examples:

  • Underlying at entry: 45000
  • CE Buy with TGT UL: Pts = 100 → Exit at 45100
  • CE Sell with TGT UL: % = 1% → Exit at 44550
  • PE Buy with TGT UL: Pts = 200 → Exit at 44800
  • PE Sell with TGT UL: % = 2% → Exit at 45900

Note:

In the Other Settings section, using the SL/Target base configuration selection, you can configure whether the target price should be calculated based on the actual traded price (order execution price) or LTP at the time of entry. This setting is applicable only for option-based targets.

For underlying-based targets, the system always uses the underlying price at the time of entry to calculate target levels.

Copy link

Stoploss

The Stoploss setting allows you to define the exit condition for each leg individually, based on either the option premium or the underlying price reaching a specific stop level.

You can choose one of the following stop-loss types per leg:

  • Stop Loss on Option Price
  • Stoploss on the Underlying Price

Stop Loss on Option Price

Available Inputs:

  • SL: % – Stoploss in percentage terms from the entry price
  • SL: Pts – Stoploss in absolute points from the entry price

Examples:

  • CE Buy at 100
    • SL: % = 20 → Exit at 80
    • SL: Pts = 10 → Exit at 90
  • PE Sell at 150
    • SL: % = 10 → Exit at 165
    • SL: Pts = 30 → Exit at 180

Stoploss on the Underlying Price

Available Inputs:

  • SL UL: % – Stoploss in percentage from the underlying’s entry price
  • SL UL: Pts – Stoploss in point movement

Direction of Stoploss Exit based on Position Type:

  • CE Sell: Stoploss is upside on the underlying
  • CE Buy: Stoploss is downside on the underlying
  • PE Sell: Stoploss is downside on the underlying
  • PE Buy: Stoploss is upside on the underlying

Examples:

  • Underlying at entry: 45000
  • CE Buy with SL UL: Pts = 100 → Exit at 44900
  • CE Sell with SL UL: % = 1% → Exit at 45450
  • PE Buy with SL UL: Pts = 200 → Exit at 45200
  • PE Sell with SL UL: % = 2% → Exit at 44100

Note:

  • In the Other Settings section, using the SL/Target base configuration, you can choose whether the stoploss price should be calculated based on the actual traded price (order execution price) or LTP at the time of entry. This setting is applicable only for option-based stop losses.
  • For underlying-based stop losses, the system always uses the underlying price at the time of entry to calculate stop levels.
  • You can also configure whether or not to place the stoploss order in the broker terminal using the checkbox “Place SL in Broker” in the order settings. This is applicable for Option Option-based SL only. Underlying SL can’t be placed in the broker.

Copy link

Trail Stoploss

Trailing can be configured for Option SL and Underlying SL.
You can set Trail X and Trail Y in either percentage or points.

Example: Option SL – Buy Leg (X and Y in %)
Entry Type: Buy
Entry Price: 100
Initial SL %: 10% → SL = 90
Trailing X% = 5%, Trailing Y% = 5%

Calculation:

  • Initial SL = 100 − 10% = 90
  • Trail X = 100 × 5% = 5
  • Trail Y = 90 × 5% = 4.5

Trail Steps:

  • When LTP reaches 105 → SL updates to 94.5
  • When LTP reaches 110 → SL updates to 99
  • When LTP reaches 115 → SL updates to 103.5

Example: Option SL – Sell Leg (X and Y in Points)
Entry Type: Sell
Entry Price: 100
Initial SL: 10 points → SL = 110
Trailing X: 5 points
Trailing Y: 5 points

Calculation:

  • Initial SL = 100 + 10 = 110
  • Trail X = 5 points (price must move in favorable direction)
  • Trail Y = 5 points (SL shifts by 5 points per trigger)

Trail Steps:

  • When LTP reaches 95 → SL updates to 105
  • When LTP reaches 90 → SL updates to 100
  • When LTP reaches 85 → SL updates to 95

Example: Underlying SL – CE Sell Leg (X and Y in %)
Leg Type: CE
Entry Type: Sell
Underlying at Entry: 45000
Initial SL: 0.1% → SL = 45045
Trailing X: 0.1%
Trailing Y: 0.1%

Calculation:

  • Initial SL = 45000 + 0.1% = 45045
  • Trail X = 45000 × 0.1% = 45
  • Trail Y = 45045 × 0.1% = 45.05

Trail Steps:

  • When underlying reaches 44955 → SL updates to 45000
  • When underlying reaches 44910 → SL updates to 44954.95
  • When underlying reaches 44865 → SL updates to 44909.9

Example: Underlying SL – PE Sell Leg (X and Y in Points)
Leg Type: PE
Entry Type: Sell
Underlying at Entry: 45000
Initial SL: 100 points → SL = 44900
Trailing X: 20 points
Trailing Y: 20 points

Calculation:

  • Initial SL = 45000 − 100 = 44900
  • Trail X = 20 points (underlying must rise by this amount)
  • Trail Y = 20 points (SL shifts up by 20 points per trail)

Trail Steps:

  • When underlying reaches 45020 → SL updates to 44920
  • When underlying reaches 45040 → SL updates to 44940
  • When underlying reaches 45060 → SL updates to 44960

Note:

  • For option-based SL, enabling “Trail SL in Broker” in the Order Settings will push the trailed SL to the broker if “Place SL in Broker” is also enabled.
  • For Zerodha, due to a limit of 25 order modifications, the system restricts to 15 trail modifications per leg for stability.
  • For underlying-based SL, trailing happens internally and is not pushed to the broker.

Copy link

Hedge Selection

Hedge contracts can be configured for each strategy leg to reduce margin requirements or manage risk exposure. You can select the hedge contract in two ways:

  1. ATM Points Based Selection
  2. Closest Premium Based Selection 

In both methods, separate configuration is provided specifically for hedge contract selection, allowing independent control over how hedge contracts are chosen.

Additionally, there is a special option:

  • Wait for Hedge to Execute:
    If enabled, the system will place and wait for the hedge leg to execute before placing the main leg.
    If you have sufficient margin and want faster execution, you can disable this option to place both legs simultaneously. 

During exit, the system always exits the main leg first, and once completed, it exits the hedge leg.

Method 1: ATM Points Based Hedge Selection

This method selects the hedge contract based on its distance from the ATM strike in terms of strike steps.

How it works:

  • Enter the number of strike steps away from ATM strike for OTM hedge selection.
  • Example: If you enter 10, it will select the strike that is 10 steps OTM from the ATM strike. 

Example:

  • Suppose BankNifty ATM is 45000, and strikes are spaced every 100 points.
  • Input 10 → system will select strike at 45000 + (10 × 100) = 46000
  • So hedge contract selected is: BANKNIFTY 46000 CE (or PE depending on hedge leg type). 

Note:

  • Always enter the number of strike steps, not absolute strike difference in points.
    • For 1000 points away, you need to enter 10 (since strike interval is 100).
  • If the strike doesn’t exist or is too far, system skips hedge entry and displays:
    “Contract not found.” 

Method 2: Closest Premium Based Hedge Selection

This method selects the hedge contract whose premium is closest to your specified target premium using configurable match conditions.

How it works:

You need to specify:

  • A comparison operator:
    • ~ → Closest to target premium 
    • >= → Closest premium greater than or equal to target
    • <= → Closest premium less than or equal to target 
  • A target premium value

Example:

  • Operator: ~
  • Target Premium: 10
  • Match %: 50%
  • Acceptable premium range = ±5 (50% of 10), so any contract with premium between 5 to 15 will be considered a valid match. 

Premium Match Options:

If no contract is found within the specified match range, you can configure the fallback behavior:

  • Avoid Entry → The system skips this hedge leg.
    Keep Waiting → Waits indefinitely until match found.
  • Wait for X seconds → Waits for a fixed number of seconds, and if still no match:
    • Avoid Entry
    • Select closest available contract 

Note:

  • Premium check is performed live during order placement.

Hedge premium match uses a separate Hedge Match Settings section.

Other Features

Copy link

Move SL to Cost

  • Whenever any leg gets exited (due to target, stoploss, or any other exit condition),
  • The system will automatically move the stoploss of all remaining open legs to their respective entry prices (cost price).

Copy link

Square off Leg Type

You can configure it with two options:

  1. One Leg
  • Only the leg where the exit condition is triggered will be exited.
  • Other legs will continue to remain open and continue to run independently. 

Example:

  • You have 3 legs running.
  • If Leg 2 hits its target, only Leg 2 will be exited.
  • Leg 1 and Leg 3 will continue to remain open as per their respective conditions.
  1. All Leg
  • As soon as any exit condition is triggered for any one leg, the system will exit all open legs immediately.

Example:

  • You have 3 legs running.
  • If Leg 2 hits its target, system will exit Leg 1, Leg 2, and Leg 3 together.

Copy link

Re-Execute Portfolio

  • This feature works only when the Square Off Leg Type is set to All Legs.
  • Once all legs are exited (due to any exit condition), the system will re-enter all legs again as a fresh execution.

Parameters

  1. Number of Re-Execute
  • You can configure how many times the full portfolio should be re-executed.
  • After the configured number of re-executions is reached, no further re-entries will be taken.
  1. Entry Type
  • You can choose how quickly the portfolio is re-executed after exit:
  1. Immediate
  • As soon as all legs are exited, the system immediately selects new contracts for all legs and executes fresh entries.
  1. Candle Closing Basis
  • After all legs are exited, the system waits for the next candle to close (on configured timeframe).
  • Once candle closes, new contracts are selected for all legs, and fresh entries are taken. 
  1. Stop Re-Execute Time
  • You can define a cut-off time.
  • If portfolio exit happens after this time, no re-execution will take place.
  • This helps to avoid late-day re-entries if desired.

Example:

  • Strategy has 3 legs.
  • Square Off Leg Type = All Legs
  • Re-Execute Portfolio: Enabled
  • Number of Re-Execute: 2
  • Entry Type: Candle Closing Basis (1 min) 

Flow:

  • First entry is taken.
  • One leg hits target → system exits all 3 legs.
  • System waits for next 1-minute candle close.
  • New contracts are selected, full portfolio re-entry happens.
  • After 2 such full re-executions, no further entries are taken. 

Note:

  • Re-Execute Portfolio works at complete strategy level.
  • Contract selection is done fresh every time based on current market conditions as per your contract selection methods.

Copy link

Combined Stoploss

The Combined SL feature allows you to define a stoploss at the portfolio level based on the combined entry price of multiple legs.

Prerequisites:

  • Minimum two legs must be present.
  • All legs must have the same entry type (all Buy or all Sell).
  • Individual leg SL must be disabled. 

How Combined SL Works:

  • Combined Entry Price = Sum of entry prices of all active legs.
  • Combined SL is calculated by adding (for Sell entry) or subtracting (for Buy entry) SL value from the combined entry price. 

Example:

  • Both legs are Sell:
    • Leg 1 entry price = 60, Leg 2 entry price = 40 → Combined Entry = 100
    • Combined SL set to 50 points → Combined SL becomes 150
  • SL monitoring happens on combined LTP of all active legs.
  • Combined SL is managed internally — not placed at broker. 

Available Parameters for Combined SL:

  • SL configuration: % or Points
  • SL Wait for X Seconds
  • Frequency to Check

Trailing SL: X and Y configurable in % or Points

Copy link

Re-Entry @ Cost for Combined SL

  • Available for Combined SL.
  • Type: LTP Based or Candle Closing Basis
  • Configurable:
    • Candle timeframe
    • Number of Re-Entries
    • Stop Re-Entry Time

Note:

Other advanced re-entry filters (Wait for Original SL, Disable Re-entry if SL moved to cost, etc.) are not applicable for Combined SL Re-Entry.

Copy link

Re-Execute for Combined SL

Re-Execute Types:

  1. Immediate
  • As soon as Combined SL hits, system exits all legs, immediately selects new contracts and re-executes. 
  1. Candle Closing Basis
  • After Combined SL hit and exit, waits for next candle close, selects new contracts and re-executes. 

Configurable Parameters:

  • Number of Re-Executes
  • Candle timeframe

Stop Re-Execute Time

Copy link

Re-Execute Reverse for Combined SL

  • Same behavior as Re-Execute, but alternates entry direction after each Combined SL hit.
Combined SL Hit Count Entry Direction (assuming initial Sell)
1st Entry Sell
After 1st SL Buy
After 2nd SL Sell
After 3rd SL Buy
Alternates each time

Copy link

Combined Target

The Combined Target feature allows you to define a target at the portfolio level based on the combined entry price of multiple legs.

Prerequisites:

  • Minimum two legs must be present.
  • All legs must have the same entry type (all Buy or all Sell).
  • Individual leg Target must be disabled. 

How Combined Target Works:

  • Combined Entry Price = Sum of entry prices of all active legs.
  • Combined Target is calculated by adding (for Buy entry) or subtracting (for Sell entry) target value from combined entry price. 

Example:

  • Both legs are Buy:
    • Leg 1 entry price = 60, Leg 2 entry price = 40 → Combined Entry = 100
    • Combined Target set to 50 points → Combined Target becomes 150
  • Target monitoring happens on combined LTP of all active legs.
  • Combined Target is managed internally — not placed at broker. 

Available Parameters for Combined Target:

  • Target configuration: % or Points

Frequency to Check

Copy link

Re-Entry @ Cost for Combined Target

  • Available for Combined Target.
  • Type: LTP Based or Candle Closing Basis
  • Configurable:
    • Candle timeframe
    • Number of Re-Entries
    • Stop Re-Entry Time 

Note:

Other advanced re-entry filters (Wait for Original SL, Disable Re-entry if SL moved to cost, etc.) are not applicable for Combined Target Re-Entry.

Copy link

Re-Execute for Combined Target

Re-Execute Types:

  1. Immediate
  • As soon as Combined Target hits, system exits all legs, immediately selects new contracts and re-executes. 
  1. Candle Closing Basis
  • After Combined Target hit and exit, waits for next candle close, selects new contracts and re-executes. 

Configurable Parameters:

  • Number of Re-Executes

Candle timeframe
Stop Re-Execute Time

Copy link
  • Same behavior as Re-Execute, but alternates entry direction after each Combined Target hit.
Combined Target Hit Count Entry Direction (assuming initial Sell)
1st Entry Sell
After 1st Target Buy
After 2nd Target Sell
After 3rd Target Buy
Alternates each time
Order Settings

Copy link

Entry Orders, Exit Orders (Non SL)

Order Settings allow you to control how orders are placed and managed for:

  • Entry Orders
  • Exit Orders (Apart from Pre-Punched SL orders)

You can configure different settings for Entry Orders and Exit Orders independently.

Order Type

You can select:

  1. Market Order
  • The order is sent directly to exchange at market price.
  • No revision options are available.
  • Executes at the best available price in the market.
  1. Limit Order
  • The order is placed as a limit order at a calculated price based on reference price and buffer.
  • If limit order is not filled, revision mechanism can be used to improve chances of fill. 

Limit Price Configuration (Applicable for Limit Orders Only)

  1. a) Limit Price Reference
  • LTP — Last Traded Price
  • BestBidAsk — Best Bid or Ask price (Ask for Sell, Bid for Buy)
  • ImFill — Immediate Fill Reference (uses Bid for Sell, Ask for Buy)
  • AvgBidAsk — Average of Bid and Ask 
  1. b) Limit Buffer
  • Applied over reference price to calculate the actual limit price.
  • Buffer can be defined in % or absolute points. 

Limit Price Calculation Examples

Example 1 — LTP Reference

  • Order Type: Sell
  • LTP: 100
  • Limit Buffer: 2%
  • Limit Price = 100 – (2% of 100) = 98 

Example 2 — BestBidAsk Reference

  • Order Type: Sell
  • LTP: 100, Bid: 99.8, Ask: 100.2
  • Limit Buffer: 2 points
  • Limit Price = Ask – 2 = 100.2 – 2 = 98.2 

Example 3 — ImFill Reference

  • Order Type: Sell
  • LTP: 100, Bid: 99.8, Ask: 100.2
  • Limit Buffer: 2 points
  • Limit Price = Bid – 2 = 99.8 – 2 = 97.8 

Example 4 — AvgBidAsk Reference

  • Order Type: Sell
  • LTP: 100, Bid: 99.8, Ask: 100.2
  • Limit Buffer: 2 points
  • Average Price = (99.8 + 100.2) / 2 = 100
  • Limit Price = 100 – 2 = 98 

Limit Order Revision Logic

If the limit order is not filled, the system can automatically modify it using the following two revision methods:

Option 1: Modify to Market

  • After a defined time interval (e.g. 2 sec), if limit order remains unfilled, it will be modified to Market Order.

Option 2: Revise Limit Price

  • System keeps revising the limit price after each interval to improve fill chances.
  • Parameters: 
    • Revision after (in sec): Time gap between revisions.
    • Number of revisions: Total revisions allowed.
    • After max revisions:
      • Modify to Market, or
      • Do Nothing (keep order pending)

Copy link

Order Settings for SL Orders (Placed in Broker)

Separate settings apply for orders placed as Stoploss (SL) orders in broker.

Order Type for SL Orders

  • All SL orders are always placed as Stoploss Limit Orders in broker.

Trigger Price

  • The trigger price for SL order is always set as:
    • SL Price (or W&T price if Wait & Trade is enabled)

Limit Price for SL Order

  • Once SL Trigger Price is calculated, the Limit Price is determined by applying Limit Buffer over it.

Limit Price Calculation Example

  • SL Trigger Price: 100
  • Limit Buffer: 2 points
    Limit Price = Trigger Price – Buffer = 100 – 2 = 98

(For Buy orders, buffer is added to Trigger Price; for Sell orders, buffer is subtracted.)

SL Order Revision Logic (Same as Entry/Exit orders)

  • Same as above settings for Entry and Exit (Non SL) orders

📸 [Screenshot showing SL Order Settings with Limit Buffer and Revision Logic]

Summary

Configuration Entry Orders Exit Orders (Non-SL) SL Orders
Market Order Available Available Not Available
Limit Order Available Available Always Limit
Limit Reference Available Available Available
Limit Buffer Available Available Available
Revision Logic Available Available Available
RMS

Copy link

RMS

Risk Management allows you to define limits on losses and profits to safeguard your capital and automatically exit positions when your desired limits are reached.

The same set of Risk Management parameters are provided at three layers:

  1. Strategy Level:
    Applies to the MTM (Mark-to-Market) of individual strategy instance. 
  2. Account Level:
    Applies to the combined MTM of all running strategies under the same trading account. 
  3. Global Level:
    Applies to the combined MTM of all accounts and all strategies across the system. 

Important:
The behavior of parameters remains the same across all levels — only the scope of MTM calculation changes.

Copy link

Max Loss

Max Loss defines the maximum allowed drawdown.

  • When the MTM reaches the defined Max Loss value, exit is triggered. 

Example (Strategy Level):

  • Max Loss = -5000 
  • Once total MTM of the strategy reaches -5000, it exits the strategy. 

For Account Level / Global Level:

  • If Account Level Max Loss = -10000,
    then when total MTM across all strategies in that account reaches -10000, all open positions across that account will be exited. 
  • If Global Level Max Loss = -50000,
    then when total MTM across all accounts reaches -50000, all positions in entire system will be exited. 

Parameters for Max Loss:

  • Frequency to Check: 
    1. Live (real-time tick based) 
    2. 1 min 
    3. 3 min 
    4. 5 min 
  • Exit Mode: 
    1. Immediate:
      Exit happens instantly when Max Loss condition meets. 
    2. Delayed:
      Exit happens after a user-defined delay (in seconds). 

Ticks Based:
Exit only if Max Loss condition holds true for X number of consecutive ticks.

Copy link

Trail Max Loss

Trail Max Loss allows you to dynamically tighten your Max Loss as profit increases.

Parameters:

  • Trail Max Loss X: Profit increment after which Max Loss moves. 
  • Trail Max Loss Y: Amount by which Max Loss improves on each Trail X movement. 

Example:

  • Initial Max Loss = -5000 
  • Trail Max Loss X = 1000 
  • Trail Max Loss Y = 500 

Flow:

  • Once MTM increases to 1000, Max Loss moves from -5000 to -4500. 
  • If MTM reaches 2000, Max Loss moves to -4000. 
  • If MTM reaches 3000, Max Loss moves to -3500, and so on. 

Same behavior applies for Account Level and Global Level — only MTM calculation changes as per level.

Copy link

Max Profit

Max Profit defines the maximum profit at which you want to exit and book profits.

Parameters and behavior are exactly same as Max Loss:

  • Once total MTM reaches the defined Max Profit value, exit is triggered. 
  • Example: 
    • Max Profit = 10000 
    • If MTM reaches 10000, exit happens as per configured exit mode. 
  • Frequency to Check, Exit Mode, and Ticks Based logic all apply exactly as in Max Loss. 

Copy link

Protect Profit

Protect Profit helps secure profits dynamically as your profit grows. Three modes are available:

  1. A) Lock Min Profit

Allows you to lock a fixed minimum profit once your profit crosses a threshold.

Parameters:

  • If Profit Reaches: Threshold profit level to activate lock. 
  • Lock Min Profit At: The minimum profit you want to secure. 

Example:

  • If Profit Reaches = 2000 
  • Lock Min Profit At = 500 

Flow:

  • Once MTM reaches 2000, minimum profit of 500 is locked. 
  • If MTM subsequently falls to 500, system exits to preserve the locked profit. 
  1. B) Trail Profits

Allows you to trail profits upward step-by-step as profits grow.

Parameters:

  • Increase in Profit: Profit increment after which trail happens. 
  • Trail Min Profit By: Amount to increase locked profit on each step. 

Example:

  • Increase in Profit = 1000 
  • Trail Min Profit By = 500 

Flow:

  • MTM reaches 1000 → Lock Profit = 500 
  • MTM falls to 500 → Exit. 
  • MTM reaches 2000 → Lock Profit = 1000 
  • MTM falls to 1000 → Exit. 
  • MTM reaches 3000 → Lock Profit = 1500 
  • And so on. 
  1. C) Lock & Trail Profits (Combined Logic)

Combines both Lock and Trail methods together.

Parameters:

  • If Profit Reaches: Initial threshold to activate lock. 
  • Lock Min Profit At: Initial minimum profit to secure. 
  • Increase in Profit: Profit increment for trailing. 
  • Trail Min Profit By: Amount to increase locked profit on each trail step. 

Example:

  • If Profit Reaches = 2000 
  • Lock Min Profit At = 500 
  • Increase in Profit = 1000 
  • Trail Min Profit By = 500 

Flow:

  • MTM reaches 2000 → Lock Profit = 500 
  • MTM reaches 3000 → Lock Profit = 1000 
  • MTM reaches 4000 → Lock Profit = 1500 
  • MTM reaches 5000 → Lock Profit = 2000 
  • If at any point MTM falls back to locked profit level, system exits. 

Applicable Behavior Across All Levels:

Level MTM Calculation
Strategy Level MTM of individual strategy
Account Level Total MTM across all strategies of that account
Global Level Total MTM across all accounts

 

2 reviews for Stockmock and Algotest strategy automation tool (Time Based Straddle Strangle)

  1. macchap (verified owner)

    Simply the best algo trading software if you are doing intraday straddles and strangles. One can configure all the parameters that is required for various different types of strategies. I have been using this for nearly 2.5 years and whenever I wanted support, they have provided the required resolution promptly.

  2. Avatar Of Siddhartha Timbadia

    Siddhartha Timbadia (verified owner)

    Your software is best and fast for exiting trade at stoploss to keep traders on safe side.

    Not got any technical issue till now with easy to use features.

    Best algo software so far …

    Moreover, Dharmesh Sir is so supportive and helpfull in everyway.

    I am not getting this at other companies like stoxxo.

    Keep growing and thank you

    🙏🏻

Add a review

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0
    0
    Your Cart
    Your cart is emptyReturn to Shop