How to make average of buying price — Tradetron Community
← Community

How to make average of buying price

Uncategorized 916 views

makarand

i want to make average of buy price if pnl goes below certain price.
for e.g at particular buy signal if one lot is taken and pnl goes below 500 then add 2 more lots, again if the the total profit goes below 1500 then add 4 more lots.

Tradetron Team Tradetron team

Short answer: averaging-down is what Repair Continuous is built for. Fire it on a price drop measured from the last add, not on a fixed level.

Idea (1 lot, then 2, then 4)

  1. Entry: your buy signal, 1 lot.
  2. Repair Continuous: LTP <= LastRepairedPrice - Number ( X ). For the first add, compare with the entry price via Traded Instrument ( Entry, price, … ). Comparing with the last repair makes the condition reset after each fire, so it doesn’t loop.
  3. Lots: keep a runtime variable lots that doubles on each repair (Get Runtime ( lots ) * Number ( 2 )).
  4. Cap the adds: gate on a counter variable, e.g. Get Runtime ( adds ) <= Number ( 2 ).

Notes:

  • PNL is for Universal Exit. For a per-position loss trigger, use price distance as above.
  • A Repair Continuous condition that stays true keeps firing and can get the strategy Blocked.
  • Averaging into losses increases risk quickly. Check margin at full size and test in Live Offline with small size.

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