log in     sign up for free
 
To be a money master, you must first be a self-master.
J. P. Morgan
 
 
Home
systems (284)
 
 
Special offer: buy AmiBroker and EOD+Real-Time Data
 

Buy

MetaStock

     (special offer)
 
 
 

Buy

EOD data for MetaStock

     (special offer)
 
 
 

Buy

Realtime data for MetaStock

     (special offer)
 
 
 
 
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

TFS System

System for: TradeStation


 

 

Views:  1728

Added: August 23, 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, system
 
Your Ad Here
In Traders' Tips this month, we take a look at the trend-following system and its accompanying indicators as presented in "How To Get In With The Trend And Out At The End" by Bryan Strain in this issue.
A set of three indicators are used, and each contributes a criterion for entering the market. For the record, when I implemented this trend-following strategy in EasyLanguage, not all of my entries and exits coincided with those presented in the article.

Here is the EasyLanguage code for the three indicators that were described in the article, as well as the EasyLanguage code for the signal that is used to create the trading strategy. The indicators and the trading strategy are fairly straightforward. The properties for each indicator are presented after the EasyLanguage. The first indicator presented is the tether line indicator.



Type: Indicator, Name: TFS Tether Line
Input: Length(50);
Variables: HighVal(0), LowVal(0), Tether(0);

HighVal = Highest(High, Length);
LowVal = Lowest(Low, Length);
Tether = (HighVal + LowVal) / 2;

Plot1(Tether, "Tether");






Chart style:

PlotName Style Weight
Tether Line thinnest

Scaling: Same as symbol

The next indicator is the volume oscillator indicator.


Type: Indicator, Name: TFS Vol Osc Avg
Input: AvgLength(7);
Variables: VolAccum(0), VolOsc(0);

VolAccum = 0;

For value1 = 0 To AvgLength -1 Begin
If Close[value1] > Open[value1] Then
VolAccum = VolAccum + Volume[value1];
If Close[value1] < Open[value1] Then
VolAccum = VolAccum - Volume[value1];
End;

VolOsc = VolAccum / AvgLength;
Plot1(VolOsc, "Vol Osc");
Plot2(0, "ZeroLine");






Chart Style:

PlotName Style Weight
Vol Osc Histogram thinnest
ZeroLine Line thinnest

Scaling: Screen

The third indicator is the MBO indicator.



Type: Indicator, Name: TFS MBO Indicator

Inputs: FastAvg(25), SlowAvg(200);
Variable: MBO(0);

MBO = Average(Close, FastAvg) - Average(Close, SlowAvg);

Plot1(MBO, "MBO");
Plot2(0, "ZeroLine");






Chart style:

PlotName Style Weight
MBO Histogram thinnest
ZeroLine Line thinnest

Scaling: Screen


Finally, everything is brought together in the TFS signal. Below is the EasyLanguage for the TFS signal.
The signal is referenced in StrategyBuilder to create the TFS strategy.


Type: Signal, Name: TFS Signal

Inputs: TetherLen(50), OscAvgLength(7), MBOFastAvg(25), MBOSlowAvg(200);
Variables: MBO(0), Tether(0), VolAccum(0), VolOsc(0);

VolAccum = 0;
For value1 = 0 To OscAvgLength -1 Begin
If Close[value1] > Open[value1] Then
VolAccum = VolAccum + Volume[value1];
If Close[value1] < Open[value1] Then
VolAccum = VolAccum - Volume[value1];
End;

Tether = (Highest(High, TetherLen) + Lowest(Low, TetherLen)) / 2;
MBO = Average(Close, MBOFastAvg) - Average(Close, MBOSlowAvg);
VolOsc = VolAccum / OscAvgLength;

{Entry Conditions}
Condition1 = Close Crosses Above Tether;
Condition2 = VolOsc > 0;
Condition3 = MBO > MBO[1];

If Condition1 AND Condition2 AND Condition3 Then
Buy Next Bar at Market;

{Trailing Exit}
If Close Crosses Below Tether Then
ExitLong Next Bar at Market;






This EasyLanguage code for the TFS indicators, signal, and strategy are also available from Omega Research's Website. Two files will be posted: TFS.ELS and TFS.ELA. The TFS.ELS file is for TradeStation and ProSuite 2000i. TFS.Ela is for all other software versions (including SuperCharts). The QuickEditor cannot edit the contents of either of the TFS files.
-- Gaston Sanchez, EasyLanguage Expert
Omega Research Inc., 800 422-8587, 305 270-1095
http://www.omegaresearch.com

 

 



Code:

Type: Indicator, Name: TFS Tether Line
Input: Length(50);
Variables: HighVal(0), LowVal(0), Tether(0);

HighVal = Highest(High, Length);
LowVal = Lowest(Low, Length);
Tether = (HighVal + LowVal) / 2;

Plot1(Tether, "Tether");






Chart style:

PlotName Style Weight
Tether Line thinnest

Scaling: Same as symbol

The next indicator is the volume oscillator indicator.


Type: Indicator, Name: TFS Vol Osc Avg
Input: AvgLength(7);
Variables: VolAccum(0), VolOsc(0);

VolAccum = 0;

For value1 = 0 To AvgLength -1 Begin
If Close[value1] > Open[value1] Then
VolAccum = VolAccum + Volume[value1];
If Close[value1] < Open[value1] Then
VolAccum = VolAccum - Volume[value1];
End;

VolOsc = VolAccum / AvgLength;
Plot1(VolOsc, "Vol Osc");
Plot2(0, "ZeroLine");






Chart Style:

PlotName Style Weight
Vol Osc Histogram thinnest
ZeroLine Line thinnest

Scaling: Screen

The third indicator is the MBO indicator.



Type: Indicator, Name: TFS MBO Indicator

Inputs: FastAvg(25), SlowAvg(200);
Variable: MBO(0);

MBO = Average(Close, FastAvg) - Average(Close, SlowAvg);

Plot1(MBO, "MBO");
Plot2(0, "ZeroLine");






Chart style:

PlotName Style Weight
MBO Histogram thinnest
ZeroLine Line thinnest

Scaling: Screen




Type: Signal, Name: TFS Signal

Inputs: TetherLen(50), OscAvgLength(7), MBOFastAvg(25), MBOSlowAvg(200);
Variables: MBO(0), Tether(0), VolAccum(0), VolOsc(0);

VolAccum = 0;
For value1 = 0 To OscAvgLength -1 Begin
If Close[value1] > Open[value1] Then
VolAccum = VolAccum + Volume[value1];
If Close[value1] < Open[value1] Then
VolAccum = VolAccum - Volume[value1];
End;

Tether = (Highest(High, TetherLen) + Lowest(Low, TetherLen)) / 2;
MBO = Average(Close, MBOFastAvg) - Average(Close, MBOSlowAvg);
VolOsc = VolAccum / OscAvgLength;

{Entry Conditions}
Condition1 = Close Crosses Above Tether;
Condition2 = VolOsc > 0;
Condition3 = MBO > MBO[1];

If Condition1 AND Condition2 AND Condition3 Then
Buy Next Bar at Market;

{Trailing Exit}
If Close Crosses Below Tether Then
ExitLong Next Bar at Market;



 






Author: Bryan Strain
Source: http://www.traders.com

 

View similar:

RS system No. 1
DBS-March
New Market Paradigm
Williams 19
Hull Moving Average Trading System
E2 Bonder
Trend Continuation Factor
Gettess 30
Simple Futures MA System
Dynamic Zones
...
 
 
all systems for TradeStation
all systems

 

 

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