System Trading Forum

 

'Evolving Traders!'

Home Education Forums Products Links

 

     
 

Quick Links

Technical Analysis

Fundamental Analysis

Options

Articles

Newsletter

Find a Programmer

Free Stuff

Free code library

TradeStation EasyLanguage Course

 

 

What's New

Utilizing Inputs and Variables

An input is a value that is assigned a name. This value remains constant throughout. The value of inputs can be changed without having to modify the code. Inputs also allow you to optimize your strategy.

A variable is usually a word or alpha numeric sequence that is used to store a value. A variable allows you to change it's value as many times as you like when executing your code. There are 3 types of variables which you must know.

  1. Numeric - the variable will hold a numeric value ( ie. 1.28232 )
  2. String - the variable will hold a string value ( ie. "MyString" )
  3. Boolean - the variable will hold a true/false value ( ie. true )

It is useful to name inputs and variables in a manner that describes what value the variable is holding. In the following example we create a simple moving average indicator.

In the sample below we create a simple moving average indicator.

 

inputs:

MAVGPeriod( 20 ); // The default value is 20

variables:

{ The default value is 0, which implies that it is numeric }

MAVGValue( 0 );

{ code executes on the close of every bar, so our MAVGValue variable will update every bar as well }

MAVGValue=average(close, MAVGPeriod);

// The plot statement is used to plot a value on your chart

Plot1(MAVGValue);

 

Recent Posts


Need historic tick data: LME, OMX, KOSPI, TOCOM
TRADESTATION 8... AND METASTOCK DATABASE
Online Forex Trading Tips for Success
November crude oil prices
TIME TO BUY OIL STOCKS


 

Partner Site



 

Our Sponsors

 

 

Copyright Management Information Technologies, LLC. All Rights Reserved.

MIT Links Capturing Option Theta Futures and FX Broker