log in     sign up for free
 
Combine your enthusiasm, energy, focus, devotion, and discipline to becoming the best trader you can be, but once you have done that, there is no point in agonizing over the details.
Jack D. Schwager
 
 
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

Trend Continuation Factor

System for: TradeStation


 

 

Views:  1913

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 "Trend Continuation Factor" in this issue, M.H. Pee includes the code for a spreadsheet implementation of the TCF indicator and trading strategy. Here, we present the TradeStation EasyLanguage code for the TCF trading strategy. The strategy can easily be converted into a TradeStation indicator by replacing the buy/sell statements with plot statements as follows:



Type : Strategy, Name : Trend Cont Factor
inputs:
Length( 35 ) ;
variables:
Change( 0 ),
PlusChange( 0 ),
MinusChange( 0 ),
PlusCF( 0 ),
MinusCF( 0 ),
PlusTCF( 0 ),
MinusTCF( 0 ) ;
Change = Close - Close[1] ;
PlusChange = iff( Change > 0, Change, 0 ) ;
MinusChange = iff( Change < 0, -Change, 0 ) ;
PlusCF = iff( PlusChange = 0, 0, PlusChange + PlusCF[1] ) ;
MinusCF = iff( MinusChange = 0, 0, MinusChange + MinusCF[1] ) ;
PlusTCF = Summation( PlusChange - MinusCF, Length ) ;
MinusTCF = Summation( MinusChange - PlusCF, Length ) ;
if PlusTCF > 0 then
Buy next bar at market
else if MinusTCF > 0 then
Sell next bar at market ;






This code will be available for download from www.tradestation2000i.com . Select Support -> EasyLanguage -> Strategies and Indicators -> Traders' Tips, and look for the file TrendContFactor.Els.

--Ramesh Dhingra

Director, EasyLanguage Consulting

TradeStation Technologies, Inc. (formerly Omega Research, Inc.), a wholly owned subsidiary of TradeStation Group, Inc.
http://www.TradeStation.com

 

 



Code:


Type : Strategy, Name : Trend Cont Factor
inputs:
Length( 35 ) ;
variables:
Change( 0 ),
PlusChange( 0 ),
MinusChange( 0 ),
PlusCF( 0 ),
MinusCF( 0 ),
PlusTCF( 0 ),
MinusTCF( 0 ) ;
Change = Close - Close[1] ;
PlusChange = iff( Change > 0, Change, 0 ) ;
MinusChange = iff( Change < 0, -Change, 0 ) ;
PlusCF = iff( PlusChange = 0, 0, PlusChange + PlusCF[1] ) ;
MinusCF = iff( MinusChange = 0, 0, MinusChange + MinusCF[1] ) ;
PlusTCF = Summation( PlusChange - MinusCF, Length ) ;
MinusTCF = Summation( MinusChange - PlusCF, Length ) ;
if PlusTCF > 0 then
Buy next bar at market
else if MinusTCF > 0 then
Sell next bar at market ;


 






Author: M.H. Pee
Source: http://www.traders.com

 

View similar:

Seasonal Trade
Simple Futures MA System
Divergence
Macd RS Ratio
Stuckey 19
Parabolic System
True Range Breakout
Neely31
Conner 19
Dual Time Frame Moving Average
...
 
 
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