One option at any time to be there in deployment — Tradetron Community
← Community

One option at any time to be there in deployment

Strategy 1,538 views

Radhakrishnan N

In SAR I entered CE and PE in set 1 and set 2. When CE is squared off , PE should be entered . When PE squared off, CE to be entered . But in my deployment at the same time both CE and PE are getting traded. And in last 10 minutes 200 trades took place . How to avoid 1) both CE and PE option getting traded and have one at the time according to the SAR direction,upper or lower level ?? 2) How to avoid too many trades taking place??

Lion Algos

Try this
Set1
Entry condition - buy signal generated
Position builder - buy CE

Repair continuous - sell signal generated
Position builder -sell CE which bought in Entry

Set2
Entry condition - sell signal generated
Position builder - buy PE

Repair continuous - buy signal generated
Position builder - sell PE which bought in Entry

To avoid multiple trade use ‘Net Quantity’ in sets
Set1:
Entry condition : Net Quantity CE = 0
Repair Continuous : Net Quantity CE != 0
Set2:
Entry condition : Net Quantity PE = 0
Repair Continuous : Net Quantity PE != 0

Radhakrishnan N

How to add the above? buy signal generated , buy CE etc
similarly, sell signal generated , buy PE ?
There are no keywords for them

Radhakrishnan N

Is the last one correct ?? Netquantity then instrument name , option ce , and = number 0??

Lion Algos

Use ‘Traded Instrument’ ( not Instrument Name) for Net Quantity

Radhakrishnan N

ok changed. Parabolic SAR retraces to old positinos or travels unchanged once it is formed?

Lion Algos

I have not much knowledge on SAR. I have just given the framework to build strategy

Tradetron Team Tradetron team

Both CE and PE fire together, and you see hundreds of trades, because both sets’ entries are true at the same time and each exit is immediately followed by a new entry. Fix it in three parts.

1. Only one side at a time

Add a check to each set’s Entry that the other side is flat. Net Quantity returns the open quantity of a traded instrument (0 = closed):

  • Set 1 (CE) entry: your SAR-up signal AND Net Quantity(<Set 2 PE leg>) == Number(0)
  • Set 2 (PE) entry: your SAR-down signal AND Net Quantity(<Set 1 CE leg>) == Number(0)

Net Quantity is strategy-level: it looks up the instrument of the leg you point at and adds up its open quantity across the strategy.

2. Use closed candles

Check SAR on candle -1 (last closed), not 0. On the forming candle the signal flips back and forth, which causes the entry-exit loop.

3. Cap entries

Add a runtime-variable counter: initialize s1entry = Number(1), add Get Runtime(s1entry) <= Number(N) to the entry, and add 1 in the entry’s runtime section.

A Live Offline strategy that crosses 400 trades in a day is blocked as loop protection, so test these changes in Live Offline and watch the Notification Log.

:sparkles: Answer written with AI from Tradetron docs (Oct 2026). Original replies are kept above. Spot something wrong? Reply below.