This EasyLanguage tutorial is a starting point to your long term goal of learning to program your ideas in TradeStation . TradeStation is one of the most powerful tools available to all levels of traders, however it takes quite awhile to master the language. Dubbed “EasyLanguage” for its relative ease of use, TradeStation developers need to know the ins and outs of the language in order to take full advantage of the platform.
One important point to consider while developing systems is that you do not have to be online in order to use the TDE (previously known as the PowerEditor). The words TDE and EasyLanguage Editor may be interchanged throughout the rest of this EasyLanguage tutorial since they are one in the same. It can be started by itself by clicking on its icon. If you are in TradeStation, you can switch to the TDE by clicking the EL (EasyLanguage) icon.
Every analysis technique requires a minimum amount of data before any processing can occur successfully. A 50-bar moving average requires 50 bars of data. A 10-bar momentum will need 10 bars of data. A 14-bar SlowK stochastic will require 14 bars. If you have a system that combines two or more of these techniques, the one that requires the most bars determines the Maxbarsback (MBB) setting. This becomes the number of bars reserved for computation on which no plotting or any other action can take place. The first bar after the MBB setting is called barnumber 1. Then bars are sequentially numbered from that point till the end of the chart.
Some indicators require very few bars for MBB but are still unstable many bars later. The exponential moving average requires only one bar for MBB but it requires many more bars before it accurately computes value. You can verify this by plotting a chart with only a few bars and then adding the XAverage indicator. You can then increase the number of bars in the chart and see how the value of this indicator changes on a particular day. When the value no longer changes when you add more days to the chart, it is stable.
MBB is affected by all of the data series plotted in the window. It is computed from the shortest data series (the one with the fewest bars). Once you locate the MBB on the shortest data series, this determines the start of all of the other data series. So even, if you have 10000 bars of daily data in Data1 and 100 weekly bars in Data2, the weekly bars will restrict you. If MBB is 75, you will only have 25 weeks of data upon which to perform your analysis.
As you can see all TradeStation systems that depend upon EasyLanguage require the knowledge of bars. In the next tutorial we’ll cover how to use this information with control statements to direct the program.