December 2005
Archived Issues esignal.com esignalcentral.com Referral Program
 
 
Trading Education
Third Party
Spotlight
StockWatch
Investor's Library
eSignal Central
 

 
   
The Ease of EFS2
 
   

By Todd Pellizzer, eSignal Product Manager

 
   

In the May 2005 Product News article, eSignal announced the release of the newest version of eSignal Formula Script (EFS2). I briefly described some of the most significant enhancements it brought to the existing language and let you see the importance of this addition. In this article, I’ll be using a few practical examples to illustrate how EFS2 has simplified programming within eSignal, thereby allowing you to easily build your customized studies and dedicate more of your time to trading.

One of the key enhancements introduced with EFS2 is the ability to calculate any study, built-in or custom, on multiple time frames. This means that, with only a few simple lines of code, a trader can quickly compute any indicator on an external interval (i.e., an interval that is different from the one that is being plotted on the chart). This is accomplished by means of the new EFS2 inv() function, which enables the formula engine to synchronize the plots of the indicator and the chart, regardless of the intervals being used.

As an example, Figure 1 shows the code required with EFS2 to calculate a Simple Moving Average of (High+Low)/2 based on a 30-minute interval (see line 7). Figure 2 shows this 30-minute study on a 5-minute chart. A stair-step graph displays because this is a study based on a 30-minute interval; therefore, the values only change every 6 bars.

Figure 1: EFS2 code snippet that returns a 30-minute moving average, regardless of the interval used on the chart

 

Figure 2: Display of a 30-minute study on a 5-minute chart

Together with the inv() function, another key enhancement provided by EFS2 is the ability to compute any indicator, built-in or custom, on a symbol that is different from the one being charted. This is accomplished with the new EFS2 sym() function, which enables the formula engine to synchronize the plots of the indicator and that of the chart.

As an example, Figure 3 shows the necessary code to plot a CCI study based on the Dow Jones Industrials (see line 8). This study will plot a CCI of the Dow regardless of the symbol being charted. Figure 4 shows this data for IBM.

Although the price bars are for IBM data, the CCI below the price bars is based on $INDU. The EFS2 engine is also lining up the values in the CCI study to the times of the IBM price bars, which enables you to make an accurate comparison.

Figure 3: EFS2 code snippet that always returns a CCI study for the symbol $INDU

Figure 4: Display of a CCI study of $INDU on a chart of IBM

It’s important to note that these two functions can be easily combined on a single chart to allow a trader to conduct an inter-market analysis using multiple time frames. This makes for a very powerful tool that no longer requires the trader to waste precious time comparing data in several charts.

Another highly requested and significant improvement introduced with EFS2 is the ability to use a study-on-study formula, where the source of the study is based on a custom calculation. Using the new EFS2 efsInternal() function, the formula engine now allows the end user to take advantage of the existing built-in studies to accomplish this task. This function converts any custom calculation into a format that can be used as a source by any built-in study.

To illustrate this, Figure 5 shows a code example of the TRIX study using the built-in Exponential Moving Average function ema() and the custom calculation of the Log of the Close as the source for the indicator (see lines 10 and 11).

Figure 5: EFS2 code snippet that allows the custom function, calcLog() to be used as a source

While these new functions may not seem revolutionary, they’re a few examples of how EFS2 has enhanced the capabilities of eSignal’s formula scripting language. Along with many other EFS2 improvements, these functions give our traders more analytical power with less effort.

Take a look at the many information sources about EFS2 and Advanced Charts, which can be found on eSignal Central, and join your fellow users as they use analytical studies to improve their trading decisions.

 

 


 
 

HOME | MONEY & INVESTINGTRADING EDUCATION
PRODUCT NEWS THIRD PARTY SPOTLIGHT
STOCKWATCH
INVESTOR'S LIBRARY | eSIGNAL CENTRAL