log in     sign up for free
 
In my opinion, you do not have a trading system unless you know exactly when you will get out of the market position at the time you enter it.
Van K. Tharp
 
 
Home
systems (284)
 
Special offer: buy MetaStock (try for free)   |   Reuters QuoteCenter Real-Time Data (get a free month)   |   EOD Data
 
Formula Library
 
AmiBroker
MetaTrader
MetaStock
TradeStation
Wealth-Lab
NinjaTrader
 
add your formula
System Library
 
 
Account login
Your email:
Password:
 
Log in
New to s4t? Sign up.
If you forgot your password click here.
Search the Web
 
Custom Search

Moving Beyond the Closing Price

Formula for: TradeStation

indicator


 

 

Views:  1489

Added: June 24, 2008
 
Rate this code:  Rate: 1 Rate: 2 Rate: 3 Rate: 4 Rate: 5
This formula has not been rated yet
 

email this link

 
 
Tags: TradeStation, indicator
 
Your Ad Here
Most indicators have two limitations: They're usually based on specific price levels rather than price changes, and they only use the closing price of a bar. This technique allows you to build a price-change-based indicator that incorporates all the price points in a bar.

 

 



Code:

Type : Indicator, Name : 20-day MA of Close-to-Close Price Changes, Added To Closing Price
Inputs:
LookBack(20);
Variable:
PercChange(0),
NewLevel(0),
AvgPercChange(0);

PercChange = (Close - Close[1])/Close[1];
AvgPercChange = Average(PercChange,20);
NewLevel = Close * (1 + AvgPercChange);
Plot1[1](NewLevel,"");







Type : Indicator, Name : HighPercChange

{Percentage Change Between Yesterday's Closing Price and Today's High}

HighPercChange = (High - Close[1])/Close[1];






Type : Indicator, Name : Meander Indicator
Inputs:
StDevs(1);
Variable:
StdDevChange(0),
UpLevel(0),
DownLevel(0);
StdDevChange = StdDev(PercChange, 20);
UpLevel = Close * (1 + AvgPercChange + StDevs * StdDevChange);
DownLevel = Close * (1 + AvgPercChange - StDevs * StdDevChange);
Plot2[-1](UpLevel,"");
Plot3[-1](DownLevel,"");





Type : Indicator, Name : 20-day Price Point MA

Input:
VSStd(1);
Vars:
SumVS(0),
AvgVS(0),
DiffVS(0),
StdVS(0),
SetArr(0),
SumArr(0),
DiffArr(0),
VSLow(0),
VSMid(0),
VSHigh(0);

{First we define the array}

Array: VS[20](0);

{Then we're using a loop function to fill it with the different price changes}

For SetArr = 0 To 4 Begin
VS[SetArr * 4 + 0] = (O[SetArr] - C[SetArr + 1]) / C[SetArr + 1];
VS[SetArr * 4 + 1] = (H[SetArr] - C[SetArr + 1]) / C[SetArr + 1];
VS[SetArr * 4 + 2] = (L[SetArr] - C[SetArr + 1]) / C[SetArr + 1];
VS[SetArr * 4 + 3] = (C[SetArr] - C[SetArr + 1]) / C[SetArr + 1];
End;

For SumArr = 0 To 19 Begin

If SumArr = 0 Then
SumVS = 0;
SumVS = SumVS + VS[SumArr];

If SumArr = 19 Then
{Here we calculate the average price change over the period}
AvgVS = SumVS / 20;

For DiffArr = 0 To 19 Begin

If DiffArr = 0 Then
DiffVS = 0;
{Then we calculate the standard deviation}
DiffVS = DiffVS + Square(VS[DiffArr] - AvgVS);
If DiffArr = 19 Then
StdVS = SquareRoot(DiffVS / 20);

End;

End;

{Finally, we add the moving average (and the standard deviations) to the latest close for an indication of tomorrow'âs trading range}

VSLow = C * (1 + (AvgVS - StdVS * VSStd));
VSMid = C * (1 + AvgVS);
VSHigh = C * (1 + (AvgVS + StdVS * VSStd));

Plot1[-1](VSLow, "VS Low");
Plot2[-1](VSMid, "VS Mid");
Plot3[-1](VSHigh, "VS High");



 






Author: Thomas Stridsman
Source: http://www.activetradermag.com

 

View similar (indicator for TradeStation):

Variable Volatility Stops
Better Bollinger Bands
Triangle Pattern Indicator
Buy/Sell Pressure
Standard Error Bands
Finite Volume Element (FVE)
One Point Two Eight
Buff Averages
TrendArea_2 Indicator
Signal to Noise Ratio (SNR)
...
 
 
all formulas for TradeStation
all formulas

 

 

Email to friend

Top

 

     
However we try to maintain hiqhest possible level of service - most formulas, oscillators, indicators
and systems are submitted by anonymous users.
Therefore S4T™ does not take any responsibility for it's quality.
If you use any of this information, use it at your own risk. You are responsible for your own trading decisions.
Be sure to verify that any information you see on these pages is correct, and is applicable to your particular trade.
In no case will S4T™ be responsible for your trading gains or losses.
 
Privacy note | (c) copyrights systems4trading.com 2006-2012