So, you want to automate your trading strategy. How do you do this? All you need to do is, give the computer-specific set of instructions about when to enter into a trade and when to exit.

This may sound simple, however, this requires a deep understanding of programming languages, computer networks, and system integration.

Here is where Tradetron comes to your rescue. Even without any knowledge of computer science, Tradetron helps you build and automate your trading strategies.

Click here to see a simple strategy built on Tradetron. You will notice that Tradetron uses, pre-programmed functions, which are called keywords, inside the condition builder, to help you build your strategy.

So, what are these keywords? You will find the complete list here.

keywords are nothing but functions, wherein it takes input from you, performs a specific task, and gives you the desired output.

Before we go deeper into keywords, let us first understand, how the data flows into the system.

Let us assume for this example, you are observing a 15-minute OHLC candle data. The system designates, the current ongoing candle at position zero. The moment a 15-minute cycle gets over, and the candle is created, the system pushes the candle from position zero to position -1 and a new current candle is observed at position zero.

Subsequently, every time an on going candle finishes its cycle, the candle data is pushed to the left.

DataStream


With this knowledge under your belt, let us understand what are the most commonly used keywords in Tradetron.

1. Position This keyword returns the value stored by the system, from the series you specify.

Let us understand this from an example. Assume, you want to check if two days before, the closing of the State Bank of India(SBIN) stock was higher than the same day Open.
You already know how the system is getting its data. All you need to do now is to use the position keyword to get the result.
First Go to the condition builder, select Position keyword from the drop-down. Now it will ask you for the inputs.


PositionKeyword Inputs


Input 1: Series: You will select Close in the series
Input 2: Position: This is where you need to specify which past value you want to select. in our case, we need two days prior, hence, we select -2


When you click OK, your keyword is created.

However, we are not finished yet. Every keyword, just like Position will need additional information to exactly pull the data for you. In this case, we need to tell the keyword that we are considering the candle size (Day) and which instrument (SBIN).
Click the symbol inside Position and select your candle size and number of candles.


Then click the instrument and select your exchange(NSE) and instrument (SBIN).

Symbolinputs



Great!! your keyword is ready to pick the value.

instrument input


Fullpositionkeyword


But wait, we need to compare this value if it is greater than OPEN from the same candle.

To do this, click the drop-down again and select the greater than sign ">" (Greater than sign is a comparison operator and not a function like "Position" hence it will compare what is on its left with what it on its right) 

Now you need to pull the OPEN value from two days prior to the same instrument. Hence, we create the Position keyword again and follow the same procedure. This time, however, we will select, OPEN in the series, instead of CLOSE for the input.


Excellent!. What you see above is the representation of SBIN CLOSE(-2) > SBIN OPEN(-2). This will either return TRUE or FALSE.

closegreaterthanopen


Perfect!, You built a condition without any programming experience in computer science.

Let us now dig deeper and understand how you can use technical indicators inside the Position keyword.

2. RSI - Relative Strength Indicator [Technical Indicator] This key word calculates the relative strength of an instrument

For this example, let us assume, you want to find out if RSI for SBIN was greater than 70 yesterday.

Simple. Go to the condition builder, click the drop-down, and create the position keyword. This time in the series drop-down, select RSI and position as -1 as we want to check it for yesterday.

RSIkeyword


As we did earlier, once the keyword is created, we need to tell the keyword, the duration of the candle(day), and the instrument name (NSE, SBIN).

The RSI keyword does all the calculations for you in the background. Now we need to check if it was greater than 70.

For this, we will use the "Number" keyword. The Number keyword simply takes in the arithmetic value from the user as the input.

The final condition will look like this. it is equivalent to SBIN RSI (-1) > 70

RSIgreaterthan70


Let us take one last example.
In this example, let us assume you want to exit a trade when you achieve a profit of 10%.

For this condition, we will use two new keywords called LTP and EntryPrice.

LTP LTP stands for Last traded price. This keyword take only one input, the instrument name. Then it goes to the exchange and pulls the last traded price of that instrument. EntryPrice EntryPrice checks the price at which you have entered into a trade. This instrument also takes in only input(instrument name), however, for this keyword to work properly, the instrument name you give as input should be an position. which means, if you create this keyword and give it SBIN as input, it will only work if you are Long or Short on that instrument.

Go to the Exit condition builder, click the drop-down select LTP keyword and give it the instrument name(SBIN).

ltp


We need to compare this LTP with an entry price of SBIN, Hence, to calculate if we have booked 10% profits, we use the EntryPrice keyword and math operation on it. Note: Tradetron also follows the BODMAS rule. Hence you can use brackets to make your conditions easier to understand.

ltpgreaterthan10percent


When the above condition yields TRUE, the condition block will execute.

These are some of the basic keywords. Tradetron has more than 170 inbuilt keywords for making your strategy-making process easier.

Click here for the entire list for your reference.