What Is A Programming Language?

When you want your computer to perform a task for you, you have to tell it exactly what to do. Unlike humans, computers unfortunately do not understand natural English language very well, or any other natural language. Therefore you have to use a special kind of language, a programming language. In case of writing studies for TeleTrader WorkStation, this is the TeleTrader Language.

At first glance, a programming language usually looks like English, mixed with mathematical calculations. A part of a program written in the TeleTrader Language might look like this:

Result = Sum(source, period) / period;
If IsValid(Result) Then
DrawLine("MovS", Result);

In this example, you first tell the computer to calculate a result with a particular (mathematical) formula. When the result is valid, the computer then should draw a line (on your chart) that represents the result.

You can see that the way you "talk" to the computer is very formalized. This is because computers do not handle ambiguity very well. Natural languages are full of multiple meanings. Although there are some rules that you should obey in natural language, such as grammatical and orthographical rules, you can easily "bend" them and be understood anyway. If you leave out some commas in your sentences, your friends can still guess what you meant to say. Programming languages also have rules but computers cannot guess what you wanted to say to them. Therefore, you have to observe their rules very strictly. If, by mistake, you write "rseult" instead of "result", your human friend would probably guess that you really meant to refer to "result". The computer, on the other hand, will simply report an error.

When you use a programming language for the first time, it will probably take some time until you get used to its elements and rules: You have to learn what commands you have to give to the computer, and in what order, where to set the punctuation, how to define inputs and outputs for your program, how to calculate, store and give out results. In a way, you have to learn to think about what will happen in the computer when it executes your program.

On the other hand, this will probably also help you to gain deeper insight into how the studies and trading strategies that you create actually work. After all, you have to put down your thoughts in a very clear and structured manner in order for the computer to understand them.