Saturday, September 29, 2012

Outstanding Guidelines On Setting Any New Indicator With TradeStation Program Code

Even though the TradeStation trading package comes with a wide array of trading indicators referred to as analysis techniques, lots of people who use TradeStation develop the desire to customize or add their very own indicators making use of technical TradeStation code. This information will reveal the best way to create a simple indicator that displays the current trading volume plus transforms the visible indication of that volume to green if the price closes up.

The most effective method to create a new indicator is to locate a pre-existing indicator that in some measure addresses the requirements and then adjust it again even further. For this instance, the Volume indicator that accompanies TradeStation supplies a satisfactory starting point.


Fractal Indicator


To start out utilizing TradeStation code, to start with open up the Volume indicator using the EasyLanguage editor. EasyLanguage is the coding language that TradeStation uses. Begin with right-clicking upon any chart, after which you can select Insert Analysis Technique within the pop-up menus. From the dialog field that presents itself, pick the Indicator tab, after which you can scroll down to find the Volume indicator in the listing. Just click once on the Volume indicator row to highlight it, after which you can select the Edit EasyLanguage button underneath the listing field. Your EasyLanguage editor will then open up having the code for your Volume indicator all set for the purpose of selected editing tasks.

EasyLanguage program code is split in to 3 areas. The very first block identifies your Inputs. These inputs can only be modified through formatting the indicator immediately after it has been added to your TradeStation chart. Right after the Inputs are the Variables. Those initialize when the indicator initially starts during the session, and the values tend to be modified using code. Just after those 2 blocks will be the exact program code that completes. This is what really needs to be modified for that scenario.

To begin with look for the next series of program code:

Plot1( Volume Value, "Volume" ) ;

Sections having to do with program code that begin with Plot1, Plot2, etc., draw graphic features for example bars and lines on a chart. When it comes to the actual Volume indicator, this specific line of program code determines the value connected with the current volume for that bar, VolumeValue. This value is also granted the name "Volume" which enables a user to spot and change the style of any plot in the Format Analysis Technique dialog field. Nevertheless, an individual can only alter the defaulting colors, widths, and styles of the plots. To complete our case in point, program code needs to be modified.

Put the cursor after the line previously mentioned and then push Enter on the PC keyboard to create a new line. At this point enter in the subsequent section of program code:

If Close > Open then SetPlotColor(1, Green);

Be sure to add the semicolon at the end of the line, or your program code will not verify.

The line just added in is a conditional statement which says, in layman's terms, if the closing price (Close) of the current bar is more as compared to the opening price (Open) of the current bar then you should alter the plot color (SetPlotColor) of the Plot1 element to be Green (1,Green).

Finally push the F3 key or alternatively click the Verify button in order to compile the program code.

Congrats. The Volume indicator now plots as green as soon as price closes above the open, and you've now established your first TradeStation indicator.

Naturally, if you wish to go after more information relating to TradeStation trading, you will find a really excellent resource available at Customized Trading that will be able to meet your needs, irrespective of what they might be at this moment. Please be sure to look for additional information, right this moment!

No comments:

Post a Comment