Keywords in Tradetron: How to Build Conditions Without Code

Huzefa Kudrati Updated Oct 7, 2026 7 min read

Keywords in Tradetron: How to Build Conditions Without Code

Keywords in Tradetron are ready-made functions you pick from a menu in the condition builder to write strategy rules without code. Each keyword takes a few inputs (an instrument, a candle size, a period), does one job, such as fetching the last traded price or calculating RSI, and returns a value you can compare against another value.

How Tradetron keywords turn trading rules into conditions without code, in 3 minutes. हिन्दी में देखें: Tradetron में Keywords: बिना code के strategy rules बनाइए, 3 मिनट में

Illustration of keywords combining like puzzle pieces into a trading rule

What a keyword is

Automating a strategy means giving the computer exact instructions for when to enter and when to exit. Normally that takes programming. On Tradetron, the instructions are assembled from keywords.

Think of a keyword as a calculator button with labelled inputs. LTP takes an instrument and returns its last traded price. RSI takes a candle series and a period and returns RSI values. Number simply returns the number you type, so you can compare against it.

A condition then reads like a sentence: [keyword] [comparison] [keyword]. When it evaluates to TRUE, the condition block runs: an entry, an exit, a repair. You can see a complete example in the Bollinger Bands strategy guide.

How candle data flows: positions 0, -1, -2

Before using indicator keywords, it helps to know how Tradetron stores candles. Say you're watching 15-minute candles. The candle that is still forming sits at position 0. When the 15 minutes end, that candle closes, moves to position -1, and a new candle starts at position 0. Every completed candle shifts one place to the left.

Diagram of candle positions: position 0 is the candle still forming, -1 the last closed candle, then -2, -3 and -4 further backPosition 0 is live; -1 is the last completed candle

Families of keywords

Family What it gives you Examples
Price data Live market values of an instrument LTP, Bid Price, Ask Price, VWAP, Volume, Previous Close, Lot Size
Technical indicators Indicator series on any candle size RSI, EMA, SMA, MACD, SUPERTREND, ATR, ADX, Upper/Lower Bolinger, Cross
Candle patterns Pattern detection DOJI, HAMMER, ENGULFING, MORNINGSTAR
Date and time Clock and calendar checks Time, Week Day, Days Difference (D2-D1), Current Week Expiry, Current Month Expiry
Strategy info What your own strategy is doing PNL, Traded Instrument, Positions Detail, Open positions, Net Quantity
Runtime values Values captured at entry EntryPrice, EntryTime, EntryUnderlyingPrice
Options Strikes, OI and Greeks ATM, Find Strike, PCR, Max OI Strike, Delta, Theta, Net Delta
Maths and statistics Arithmetic and statistics Number, Math Operation, Min, Max, Round, Stdev, Zscore

Example 1: was SBIN's close higher than its open two days ago?

This uses the Position keyword, which returns one value from a series you choose.

  1. In the condition builder, open the drop-down and choose Position.
  2. Set Series to CLOSE and Position to -2 (two candles back). Click OK.
  3. Click the symbol inside Position and set the candle type (day) and how many history candles to load.
  4. Click the instrument and pick the exchange (NSE) and instrument (SBIN).
  5. Choose the comparison operator > from the drop-down. A comparison operator isn't a function: it compares what is on its left with what is on its right.
  6. Add a second Position keyword exactly like the first, but with Series = OPEN.

Keyword Parameters dialog for Position with Series set to CLOSE and Position set to -2Step 2: Series = CLOSE, Position = -2

Keyword Parameters dialog for the symbol: Underlying set to Instrument Name, Candle Type day, Max History Candles 10Step 3: candle type and history

The finished condition reads SBIN CLOSE(-2) > SBIN OPEN(-2) and returns TRUE or FALSE:

Finished condition in Tradetron: Position of CLOSE for NSE SBIN day candles at -2 is greater than Position of OPEN at -2CLOSE(-2) > OPEN(-2) for SBIN

Example 2: was SBIN's RSI above 70 yesterday?

Indicator keywords plug into Position the same way.

  1. Create a Position keyword and choose RSI as the series, with Position = -1 (yesterday's candle on a daily chart).
  2. Set the RSI period (the screenshot uses 15; 14 is the most common default), the candle type (day) and the instrument (NSE, SBIN).
  3. Choose > and add a Number keyword with the value 70.

Finished condition: Position of RSI 15-period on NSE SBIN day candles at -1 is greater than Number 70RSI(-1) > 70: the RSI keyword does the calculation in the background

Example 3: exit at 10% profit

Here you need two keywords:

  • LTP: the last traded price of an instrument. One input: the instrument.
  • EntryPrice: the price at which your strategy entered the trade. It only works for an instrument the strategy actually holds, long or short.

In the Exit condition, build: LTP(SBIN) > ( EntryPrice(SBIN) × 1.1 ).

Exit condition in Tradetron: LTP of NSE SBIN greater than EntryPrice of SBIN multiplied by Number 1.1LTP > EntryPrice × 1.1: true once the trade is 10% in profit

The same pattern gives you a stop loss. For a 7% stop on a long leg, the leg's SL trigger is LTP ≤ entry price × 0.93, with the entry price taken from the Traded Instrument keyword (Field: price), which reads the price you actually got filled at. The 7% rule guide walks through it.

Combining keywords into rules

Single conditions become strategies when you join them with logical operators. "RSI(-1) > 70 AND Time > 0930" only enters after 9:30. Read all about logical operators for how AND, OR and brackets combine, and lists in Tradetron to run the same rule across many instruments.

Next, tune how orders are placed in Advanced Settings, and if a condition isn't firing when you expect, use the debugging guide.

Frequently asked questions

What are keywords in Tradetron?

They are pre-built functions used in the condition builder. Each takes inputs such as an instrument, candle size and period, and returns a value, like a price, an indicator reading or your strategy's P&L, that you compare to build entry and exit rules without code.

How many keywords does Tradetron have?

More than 250, covering price data, technical indicators, candle patterns, date and time, strategy information, options and Greeks, and maths. The full list with inputs is on the keyword documentation page.

What does position 0 and -1 mean in the Position keyword?

Position 0 is the candle currently forming; -1 is the most recent completed candle; -2 the one before that, and so on. Use -1 when you want a value that won't change.

How do I use RSI in a Tradetron condition?

Create a Position keyword, choose RSI as the series, set the period, candle type, instrument and position (for example -1), then compare it with a Number keyword, such as > 70.

How do I exit a trade at a percentage profit?

In the Exit condition, compare LTP of the instrument with its entry price times a multiplier: LTP > EntryPrice × 1.1 exits at 10% profit on a long position.

Can I use keywords inside other keywords?

Yes. Indicator keywords like RSI or EMA go inside Position, and the Math Operation keyword can combine two values. Brackets control the order of calculation.

Want to join Tradetron?

Thousands of traders have moved to algo trading. Leave your number and our team will help you get started.