log in     sign up for free
 
People avoid looking for good exits because exits do not give them control over the market. However, exits do control something. They control whether you make a profit or a loss, and they control just how big that profit or loss will be. Since they do so much, perhaps they are worthy of a lot more study on the part of most people.
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

LMS Predictor

Formula for: TradeStation

indicator


 

 

Views:  1719

Added: June 14, 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
EasyLanguage code to calculate and plot the LMS Predictor.
The same code is used to plot the oscillator and price predictions by using the desired calculation for Value1 and commenting out the undesired expression.

 

 



Code:

Type: Indicator, Name : LMS Predictor

{************************************************************************

LMS Predictor
John Ehlers MESA Software
adapted from Lloyd J. Griffiths, "Rapid Measurement of Digital
Instantaneous Frequency", IEEE Transaction ASSP-23, pp207-222, April 1975

*************************************************************************}

Inputs: Price((H+L)/2),
Length(10);

Vars: SigPower(0),
Mu(0),
XBar(0),
count(0),
count1(0);

Arrays: G[30](0),
SigPredict[30](0);

{To be used as counter trend indicator
Value1 = .25*(Price + .5*(Price - Price[4])) + .75*Value1[1];
}

{To be used as a cycle mode indicator}
Value1 = .2*(2*(SlowK(Length) / 100 - .5)) + .8*Value1[1];

{Compute average power for normalization}
SigPower = 0;
For count = 0 to Length - 1 begin
SigPower = SigPower + Value1[count]*Value1[count];
end;
SigPower =SigPower / Length;

{Convergence Factor}
if SigPower > 0 then Mu = .25 / (SigPower*Length);

If CurrentBar > Length then begin
XBar = 0;
{Compute signal estimate}
For count = 1 to Length begin
XBar = XBar + Value1[count]*G[count];
end;
{Compute gain coefficients}
For count = 1 to Length begin
G[count] = G[count] + Mu*(Value1 - XBar)*Value1[count];
end;
{Compute signal prediction waveform}
For count = 0 to Length begin
SigPredict[count] = Value1[Length - count];
end;
{Extend signal prediction into the future}
For count = Length + 1 to Length + 5 begin
SigPredict[count] = 0;
For count1 = 1 to Length begin
SigPredict[count] = SigPredict[count] + SigPredict[count - count1]*G[count1];
end;
end;
Value2 = SigPredict[Length + 2];
Value3 = SigPredict[Length + 5];

Plot1(Value1, "SlowK");
Plot2(Value2, "2Bar");
Plot3(Value3, "5Bar");

end;


 






Author: John Ehlers
Source: http://www.tradestationzone.com

 

View similar (indicator for TradeStation):

Trades After the Fact
Better Bollinger Bands
Heikin Ashi II
Double Smoothed Exponential Moving Average
Standard Error Bands
TrendArea Indicator
Relative Vigor Index
Pretty Weird Late Night Stuff
RSI of Volatility
Honey Baked
...
 
 
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