Conditions for rejection based strategy — Tradetron Community
← Community

Conditions for rejection based strategy

Uncategorized 809 views

rr

hi i wanted to code a rejection based strategy like a candlestick pattern of hammer coming on 50 ema or nearby touching that i am unable to do it can someone pleaser help me with it

Tradetron Team Tradetron team

Yes. Combine a candlestick pattern keyword with an EMA check.

  1. Pattern: Position(HAMMER(Symbol(<inst>, '15m')), -1) == Number(1). HAMMER returns 1 on candles that form a hammer, else 0. -1 = last closed candle.
  2. Touched the 50 EMA: Position(LOW(Symbol(<inst>, '15m')), -1) <= Position(EMA(CLOSE(Symbol(<inst>, '15m')), 50), -1)
  3. Closed above it (rejection): Position(CLOSE(Symbol(<inst>, '15m')), -1) > Position(EMA(CLOSE(Symbol(<inst>, '15m')), 50), -1)
  4. Join all three with AND.

For “nearby” instead of an exact touch, allow a small gap: LOW <= EMA + Number(X).

For short trades, mirror it with SHOOTINGSTAR or INVERTED HAMMER, HIGH >= EMA and CLOSE < EMA. Other patterns: ENGULFING, DOJI, HARAMI, MORNINGSTAR.

Test in Live Offline. Keywords: Keyword Documentation — Tradetron

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