Basic EasyLanguage Tutorial & PowerLanguage Tutorial – Part 01

Are you searching a fast way to programming your custom indicator in EasyLanguage and PowerLanguage? This quick EasyLanguage Tutorial is designed to make the task of learning to code more accessible.

Generally, the programming tutorials start from the coding theory. It’s complicated and boring for a newbie. Conversely, we begin with a real case and with practice.

Traders don’t need to understand everything about programming; many times, they need only a simple indicator that they can’t find in their trading platform.

The language is called “EasyLanguage” because it must be simple!

If you follow this series of EasyLanguage tutorial, you will be able to realize your project.

We start from many fundamental indicators, and we show you how to add many interesting features that help you in your trading activity.

Let’s start!

Create an indicator: EasyLanguage Tutorial

First Step


Click on “Apps” and choose “EasyLanguage”; TradeStation will open a new window with the Editor.

In the Editor window, click on “New” bottom, choose “Indicator” and write the name of your new indicator.

Tutorial Easylanguage create an indicator


Click on “File”, “New” and choose “PowerLanguage Editor” and MultiCharts will open a new window with the Editor.

Easylanguage MultiCharts tutorial

 PowerLanguage – EasyLanguage MultiCharts Editor

In the Editor window, click on “New” bottom or click Ctrl+N, choose “Indicator” and write the name of your new indicator.

Create new Indicator in MultiCharts

How to use the EasyLanguage average function to create a Moving Average

Easy Mode:

1. Insert all Inputs

You can assign a default value to the inputs. In Easy Mode, you have to decide only the Period of your moving average.

Input can be:

  • Numeric
  • String
  • Boolean (True/False)

// EasyLanguage Comment

If you want to learn more: EasyLanguage Tutorial – The Inputs

2. Declare all Variables

The variables holds all values; for example, you will declare the “MA” or “MA_Value” variable to store all Moving Average values.

There are three types of variables:

  • Numeric
  • String
  • Boolean (True/False)

There are three Numeric Variable types:

  • Integer
  • Float
  • Double

You can choose any name for your Inputs and Variables, except for some special characters ($ % & / ).

ADVICE: you must always choose a name that has meaning. After some months, you have to open the code and immediately understand what a variable refers to.

Finally there are many pre-declared variables, you can use them like other variables but they don’t need to be declared. You can use this to test a draft program.

  • Condition1 = ……
  • Value1 = …..

Variables can reference previous bar value on any historical bar. To do this, you can use the square-bracket:

Close[3] –> the Closed Priced of 3 bars ago


3. The calculations

EasyLanguage and PowerLanguage calculate only in Bars. Everytime you use an indicator, you have to choose the number of bars to be analyzed.

If you want to learn more, read this:

We are here to calculate a moving average. TradeStation and MultiCharts are straightforward and have many pre-built functions. You don’t have to write extended code, because you can use a pre-built function like AverageFC() that calculate your moving average.

AverageFC() function will use the Close price and your MA_Period input to calculate the MA.

EasyLanguage PowerLanguage AverageFC function 3

4. Draw the indicator

The last step is to draw your indicator in a chart. To do this, you can use another pre-built function: Plot1().

With Plot Function you can draw many indicators in the same chart, you only have to add many functions changing the number: Plot1()  Plot2()  Plot3 (), etc.

5. Compile the program

The last step is to click on “compile” and verify in the output window if the code is correct. If you find an error, you must fix it before using the indicator.

EasyLanguage Tutorial compiler for tradestation and multicharts

That’s all! The first part of our EasyLanguage Tutorial is finished.

Advanced Mode:

In this part of the EasyLangauge tutorial, we add many user-friendly features. With the basic Moving Average, you can’t choose the color, the width, and the price. You can only select the MA Period and add another moving average.

1. User-friendly Inputs – EasyLanguage Tutorial plot name variable

Add all the inputs you need. When you add the indicator to the chart, you’ll choose the color, the width, and the price to use to calculate the Moving Average (Close, High, Low, Open).

Remember to separate the Inputs with a comma and to use a semicolon after the last input.

advanced mode easylanguage powerlanguage coding moving average

Add the correct inputs to the AverageFC() function.

calculation function powerlanguage easylanguage

2. Change the Plot1() function. Here you have two streets:

Simple: add your input directly in the Plot function.

EasyLanguage plot name variable powerlanguage

Advanced: add another two functions to set the color and the width. You can use the Set

functions EasyLanguage plot name variable

That’s all! Now your menu is complete and user-friendly.

If you liked this EasyLanguage tutorial, please share it!

EasyLanguage Tutorial custom indicator inputs multicharts tradestation

EasyLanguage Number to String Function

EasyLanguage Strategy Tutorial: Link

More from Finance Strategy System

EasyLanguage Number to String

EasyLanguage & PowerLanguage Tutorial – Time and Date


How to create a Show Me Indicator

How To (AUTO) Trade Divergences

The Vortex Indicator || Tutorial

Coppock Curve Indicator

Market Correlation | Stock Market – Bond – Commodities

OBV Indicator – On Balance Volume Tutorial

EasyLanguage & PowerLanguage Tutorial – The Bars

EasyLanguage References.