S3 enter ce after pe sl hit but not execute s1
S4 enter pe after ce sl hit but not execute s2
I want a strategy that work one by one
I want crossover sets of supertrend
S1 is ce
S2 is pe
If s1 or s2 hits sl then active
S3 ce
S4 pe
One time one position ce or pe not reentry on same trend
One entry one trend then second trend second entry
With profit booking
Please help
Manish
set runtime variables in your exit position , use that variable in s3 using get runtime variable.
Tradetron TeamTradetron team
Use runtime variables as flags so each set knows what happened before it.
Setup
Initialize Variables:ce_sl = Number(1), pe_sl = Number(1). Start at 1, not 0 (0 reads as false).
Set 1 (CE) exit on SL → runtime: ce_sl = Number(2).
Set 2 (PE) exit on SL → runtime: pe_sl = Number(2).
Set 3 (CE re-entry) entry: Get Runtime(pe_sl) == Number(2) AND your Supertrend condition.
Set 4 (PE re-entry) entry: Get Runtime(ce_sl) == Number(2) AND your Supertrend condition.
One position at a time
Add Open Positions Detail('All', 'All', <underlying>, 'count') == Number(0) to every entry, so a new set can’t enter while another is open.
No re-entry on the same trend
Use a Cross of price and Supertrend at -1 for entries (true only on the crossing candle), not “price above Supertrend”, which stays true and re-enters.
A Universal Exit clears all runtime variables. Test in Live Offline.
Answer written with AI from Tradetron docs (Oct 2026). Original replies are kept above. Spot something wrong? Reply below.