log in     sign up for free
 
The trading rules I live by are: 1. Cut losses. 2. Ride winners. 3. Keep bets small. 4. Follow the rules without question. 5. Know when to break the rules.
Ed Seykota
 
 
Home
systems (284)
 
Special offer: buy AmiBroker and EOD+Real-Time 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

Simple Futures MA Indicator

Formula for: TradeStation

indicator


 

 

Views:  1400

Added: August 01, 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
The TradeStation programming tip for this month focuses on a rather simple idea, but it's one that's often requested by users. The code for the system and indicator presented here is based on the analysis techniques discussed in the interview with Jay Kaeppel in the May 1997 issue, namely, a filtered moving average crossover. The code given below is for the Power Editor, but both the indicator and the system can also be created in the Quick Editor.
Below is the Power Editor code for the filtered moving average crossover indicator, also called "Simple futures MA," which is very similar to the code given above for the crossover system. For the indicator code, we've simply added the Plot statements and the Alert.



Type: Indicator, Name: Simple Futures MA
Inputs: Price(Close), FastAvg(9), SlowAvg(50), AvgFltr(80);
Vars: FastMA(0), SlowMA(0), Filter(0);

FastMA = Average(Price, FastAvg);
SlowMA = Average(Price, SlowAvg);
Filter = Average(Price, AvgFltr);
Condition1 = Close > Filter;
Condition2 = Close < Filter;

Plot1(FastMA, "FastMA");
Plot2(SlowMA, "SlowMA");
Plot3(Filter, "MAFilter");

IF (Plot1 Crosses Above Plot2 OR Plot1 Crosses Below Plot2) AND
(Condition1 OR Condition2) Then
IF CheckAlert Then Alert = True;






Notice that you must specifically format the above indicator.
The scaling for this indicator should be set to "Same as price data," and the MaxBarsBack can simply be set to "Auto-Detect. "
This code is available at Omega's Web site. The file name is "SFAvg.ELA."
The Quick Editor code is provided in a file called "SFAvgQ.ELA."

-- Gaston Sanchez, Omega Research
800 422-8587, 305 270-1095
Internet: http://www/omegaresearch.com

 

 



Code:

Type: Indicator, Name: Simple Futures MA
Inputs: Price(Close), FastAvg(9), SlowAvg(50), AvgFltr(80);
Vars: FastMA(0), SlowMA(0), Filter(0);

FastMA = Average(Price, FastAvg);
SlowMA = Average(Price, SlowAvg);
Filter = Average(Price, AvgFltr);
Condition1 = Close > Filter;
Condition2 = Close < Filter;

Plot1(FastMA, "FastMA");
Plot2(SlowMA, "SlowMA");
Plot3(Filter, "MAFilter");

IF (Plot1 Crosses Above Plot2 OR Plot1 Crosses Below Plot2) AND
(Condition1 OR Condition2) Then
IF CheckAlert Then Alert = True;

 






Author: Jay Kaeppel
Source: http://www.traders.com

 

View similar (indicator for TradeStation):

MACD\\Rise\\Fall
Better Volume Indicator
Pretty Weird Late Night Stuff
Close From One Day To The Next
ADX / MovAvg
Instantaneous Trend Line
MACD RS
## Top & Bottom Indicator
Quarterly Pivots
Finite Volume Element (FVE)
...
 
 
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