log in     sign up for free
 
The single most important advice I can give anybody is: Learn from your mistakes. That is the only way to become a successful trader.
David Ryan
 
 
Home
systems (285)
 
 
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

DoubleTopBot System

System for: TradeStation

 

 

Views:  2438

Added: December 08, 2006
 
Rate this code:  Rate: 1 Rate: 2 Rate: 3 Rate: 4 Rate: 5

5

1 ratings
 
 

email this link

 
 
Tags: TradeStation, system
 


DoubleTopBot Function

· To: "Omega List" <omega-list@xxxxxxxxxx>
· Subject: DoubleTopBot Function
· From: "Sentinel Trading" <rjbiii@xxxxxxxxx>
· Date: Fri, 06 Nov 1998 15:27:48 -0400
· Importance: medium
· Priority: normal
· Resent-Date: Fri, 6 Nov 1998 12:31:14 -0800 (PST)
· Resent-From: omega-list@xxxxxxxxxx
· Resent-Message-ID: <"zfjwf2.0.ZG3.IorGs"@mx2>
· Resent-Sender: omega-list-request@xxxxxxxxxx


First create a user function called Choose3.(See Below). Then create a user function DoubleTopBot. (See Below) These both verified for me you should be able to cut and paste these as is. Then just create the system.(At the Bottom).

And yes the way the code is presented in Futures is poor, and difficult to follow, they should put it together like TASC.

Hope this helps.

 

 



Code:

Type : Function, Name : Choose3

{===========User Function Choose3 ===============}

Inputs: Val1(Numeric), Val2(Numeric), Val3(Numeric), Ref(Numeric);

If MinList(Absvalue(Ref - Val1), absvalue(Ref - Val2), Absvalue(Ref - Val3)) =
Absvalue(Ref - Val1) then
Choose3 = 0;

If MinList(Absvalue(Ref - Val1), absvalue(Ref - Val2), Absvalue(Ref - Val3)) =
Absvalue(Ref - Val2) then
Choose3 = 1;

If MinList(Absvalue(Ref - Val1), absvalue(Ref - Val2), Absvalue(Ref - Val3)) =
Absvalue(Ref - Val3) then
Choose3 = 2;



Type : Function, Name : DoubleTopBot
{=================== User Function DoubleTopBot===============}

Inputs: StrnType(Numeric), TopBot(Numeric), Near(Numeric), Win(Numeric);

Vars: Trend(0),ShtTrend(0), LTrend(0), DnTrend(False),
UpTrend(False),CurLo(999999),
CurHi(-99999), CTLow(0),CtHi(0),Scale(0),CurHDt(0),CurLDt(0);


Arrays: LastH[3](0), LastLo[3](0),DateH[3](0),DateLo[3](0);

If StrnType = 0 then begin
DnTrend = High < High[1] and Low < Low[1];
UpTrend = High > High[1] and Low > Low[1];
End;

If STrnType = 1 then begin
DnTrend = High < High[1] and Low < Low[1] and High[1] < High[2] and Low[1] <
Low[2];
UpTrend = High > High[1] and Low > Low[1] and High[1] > High[2] and Low[1] >
Low[2];
End;

If DnTrend = True and Low <= CTLow then begin
ShtTrend = -1;
End;

If UpTrend = True and High >= CtHi then begin
ShtTrend = 1;
End;

If ShtTrend = 1 and High > CurHi and High > High[1] then begin
CtLow = Low;
End;

If ShtTrend = -1 and Low < CurLo and Low < Low[1] then begin
CTHi = High;
End;

If ShtTrend = -1 and CurLo > Low then begin
CurLo = Low;
CurLDt = DateToJulian(Date);
End;

If ShtTrend = 1 and ShtTrend[1] <> 1 then begin

LastLo[2] = LastLo[1];
LastLo[1] = LastLo[0];
LastLo[0] = CurLo;
CurLo = Low;
DateLo[2] = DateLo[1];
DateLo[1] = DateLo[0];
DateLo[0] = CurLDt;
End;

If ShtTrend = -1 and ShtTrend[1] <> -1 then begin

LastH[2] = LastH[1];
LastH[1] = LastH[0];
LastH[0] = CurHi;
CurHi = High;
DateH[2] = DateH[1];
DateH[1] = DateH[0];
DateH[0] = CurHDt;
End;

DoubleTopBot = 0;

If TopBot = 0 then value1 = Choose3(LastLo[0],LastLo[1],LastLo[2],Low);

If TopBot = 1 then value1 = Choose3(LastH[0],LastH[1],LastH[2],High);

If TopBot = 0 then begin
If MinList(Absvalue(Low - LastLo[0]),
AbsValue(Low - LastLo[1]),
AbsValue(Low - LastLo[2])) < Near
* Average(TrueRange,3) and DateToJulian(Date) - DateLo[Value1]
> Win and Low > Low[1] then
DoubleTopBot = 1;
End;

If TopBot = 1 then begin
If MinList(AbsValue(High - LastH[0]),
AbsValue(High - LastH[1]),
AbsValue(High - LastH[2])) < Near
* Average(TrueRange,3) and
DateToJulian(Date) - DateH[Value1]
> Win and High < High[1] then
DoubleTopBot = 1;
End;




Type : Signal, Name : DoubleTopBot

{=========DoubleTopBot System=================}

Inputs: Near(0.45), Dist(6);

If (DoubleTopBot(0,0,Near,Dist) = 1 or
DoubleTopBot(0,0,Near,Dist)[1] = 1)
and Close < Open then Buy at Open;

If BarsSinceEntry > 3 then ExitLong at Open;


 




 

Code to difficult? Find somebody to help you with coding here.

 



Author: Murray Ruggiero
Source: http://www.purebytes.com

 

View similar:

Williams 19
Stuckey 19
Breakout Range2
Dual Time Frame Moving Average
Neely31
Trend Continuation Factor
Delayed Channel Breakout
Divergence
New Market Paradigm
High Percentage Trading System
...
 
 
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.
PayPalSecure payments by PayPal S4T™ is a part of TAURO EDUCATION NETWORK
 
Privacy note | (c) copyrights systems4trading.com 2006-2009