Scalping Algos

Explain with an example how "one sided" algo works?

The Scalping Algo always keeps track of a reference price as it is based on the bid/ask price at which the last order was placed, irrespective of whether it was executed or not. Based on this price, it decides when to enter a new trade and when to exit with profit.

Your Inputs:
• Max open positions: 3
• Entry difference: ₹2 (buy when price drops ₹2 below reference)
• Take-profit difference: ₹3 (exit when price rises ₹3 above reference)

Step-by-Step Walkthrough
1. Algo Starts
• Market Price: ₹100
• Algo places the first order.
• Buy executed around ₹100.10
• Reference price is set to ₹100
• Targets based on reference:
o Entry level: ₹98 (₹100 − ₹2)
o Exit level: ₹103 (₹100 + ₹3)

2. Price Drops to ₹98
• Market hits the entry level.
• Buy order is placed and executed around ₹98.20
• Reference price updates to ₹98
• New targets:
o Exit: ₹101 (₹98 + ₹3)
o Next entry: ₹96 (₹98 − ₹2)

3. Price Goes Back Up to ₹100
• No new order is placed. Because for BUY mode, the algo only places new orders when price keeps moving downward (one-sided algo).
• So ₹100 does not trigger any action.

4. Price Drops Again to ₹98.10
• Price reaches the entry zone again (₹96–₹98).
• Another buy order is placed and executed around ₹98.20
• Reference price remains ₹98
• Targets stay the same:
o Exit: ₹101
o Next entry: ₹96

In Simple Words:
• The algo buys when price falls by ₹2 from the current reference price.
• It takes profit when price rises ₹3 from the same reference price.
• After every successful buy, the reference price updates to that level.
• It keeps doing this until it reaches the maximum of 3 open positions.