Exit Strategy not working properly — Tradetron Community
← Community

Exit Strategy not working properly

Strategy 2,208 views

Santosh Sukhnani

I have a EMA based strategy to enter the position which is working fine. But as and when trade gets executed, i want Exit to be 10 point higher on long side and 10 points lower on short side. But the trade gets exited automatically in the next minute itself.

@vikram.bajaj Please help why i am facing this error. do you see any flaws in the code below.

Bhavesh Savla

Don’t you think, it should be:

LTP > (EP+10)
OR
LTP < (EP-10)

Tradetron Team Tradetron team

The exit fires next minute because the condition is true right after entry. Write the target from the entry price and check the direction:

  • Long set exit: LTP >= Traded Instrument('Entry', 'price', <underlying>, 1, 1, 1) + Number(10) OR LTP <= ... - Number(10) (stop loss).
  • Short set exit: LTP <= entry price - Number(10) (target) OR LTP >= entry price + Number(10) (stop loss).

Common mistakes:

  • Using > where < was meant; then the exit is true at once.
  • Comparing the LTP of a different instrument (e.g. index) with the entry price of the futures/option.
  • Using one exit for both long and short sets. Put each exit in its own set.

Use the Notification Log to see which condition was true at the exit. Test it in Live Offline before going live.

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