Neha
Plz suggest what will be the code for following entry condition…
take buy entry when price crosses (last two days high+ its .2%)
Order will active at 0920 hrs daily and valid for the day . If condition not met then trade would not initiate. Order type will be NRML.
Lion Algos
Use Entry Condition-
LTP > position (highest high of Day candle, last 2 days) + 0.02*(position (highest high of Day candle, last 2 days) )
Tradetron Team
Tradetron team
Use Highest High Value on daily candles, and note that 0.2% is 0.002, not 0.02 (0.02 would be 2%).
Entry condition
LTP(<instrument>) > Math Operation(Position(Highest High Value(HIGH(Symbol(<instrument>, 'day')), 2), -1), Number(1.002), '*')
Highest High Value(..., 2) = the highest high over 2 daily candles.
- Offset
-1 = up to yesterday’s completed candle, so “last two days” excludes today.
- × 1.002 adds 0.2%.
Add Time('NSE') >= Number(920) with AND so it starts checking at 9:20, and a time exit for the end of day if the order should only be valid today.
Example
Last two days’ high = 1,000. Level = 1,002. The entry fires when LTP goes above 1,002.
The product type (NRML / MIS) is set in the Position builder leg. Test in Live Offline first. Keyword reference: Keyword Documentation — Tradetron
Answer written with AI from Tradetron docs (Oct 2026). Original replies are kept above. Spot something wrong? Reply below.