log in     sign up for free
 
In addition, you should also have some idea about how you plan to take profits and a strategy for letting your profits run.
Van K. Tharp
 
 
Home
systems (285)
 
 
Special offer: buy MetaStock (try for free)   |   Reuters QuoteCenter Real-Time Data (get a free month)   |   EOD 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

Base Channel System

System for: MetaStock

 

 

Views:  2192

Added: December 08, 2006
 
Rate this code:  Rate: 1 Rate: 2 Rate: 3 Rate: 4 Rate: 5
This formula has not been rated yet
 
 

email this link

 
 
Tags: MetaStock, system
 


DBS in TS code

To: "metastock bulletin board" <metastock@xxxxxxxxxxxxx>
Subject: DBS in TS code
From: "Walter Lake" <wlake@xxxxxxxxx>
Date: Sun, 2 Aug 1998 19:08:04 -0400
Reply-To: metastock@xxxxxxxxxxxxx
Sender: owner-metastock@xxxxxxxxxxxxx

Mark Etzkorn in Futures Magazine listed the following code for a "Dynamic Breakout System" in Futures Jan '98:

Inputs: Ceil(60), Flr(20);

Vars: X(0), Y(0), VarA(0), VarB(0), OldVarA(0);

Y = X;
X = Stddev(Close,30);
ZDelta = (X - Y)/X;

If CurrentBar = 1 then VarA = 20

OldVarA = VarA;
VarA = OldVarA * (1 + ZDelta);
VarA = MaxList(VarA, Flr);
VarA = MinList(VarA, Ceil);
VarB = VarA * 0.5;

Buy tomorrow at Highest(High,VarA) stop;
Sell tomorrow at Lowest(Low,VarA) Stop;
ExitLong tomorrow at Lowest(Low, VarB) Stop;
ExitShort tomorrow at Highest(High, VarB) Stop;

- 0 -

The April issue of Tech Analysis of Stocks and Commodities (TASC) had a long article starting on page 22 that appears to use a Channel Breakout System. There are many charts indicating what the system looks like. Did Metastock publish anything in the "Traders Tips" section of TASC about how to program it?

Here are two out of three indicators that Futures magazine published in the March 98 issue, page 46, that are used with the DBS system.

The first one is just an extension of the code listed above.

The second one uses the same code but is shortened. It is placed in an inner window and shows how many days are used in the daily calculation of the variable channel length so that the volitility is clearly visible.

#1 Indicator Name: DBS-Break (or DBS-Breakout) charts the entry and exit trigger levels plus the price action.

Inputs: Ceil(60), Flr(20);

Vars: X(0), Y(0), ZDelta(0), VarA(0), VarB(0), OldVarA(0), EntryL(0),
EntryS(0), ExitL(0), ExitS(0);

Y = X;
X = Stddev(Close,30);
ZDelta = (X-Y)/X;

If CurrentBar = 1 then VarA = 20;

OldVarA = VarA;
VarA = OldVarA*(1 + ZDelta);
VarA = MaxList(VarA,Flr);
VarA = MinList(VarA,Ceil);
VarB = VarA * 0.5;

EntryL = Highest(High,VarA);
EntryS = Lowest(Low,VarA);
ExitL = Lowest(Low,VarB);
ExitS = Highest(High,VarB);

Plot1(EntryL,"EntryL");
Plot2(EntryS,"EntryS");
Plot3(ExitL,"ExitL");
Plot4(ExitS,"ExitS");


#2 Indicator Name: DBS-Day (i.e., DBS-Days in Channel)
NOTE: This code is almost identical to #1 without the Entry & Exit lines and the Plot lines, the Vars: is shortened and a different Plot1 is added at the end.

Inputs: Ceil(60), Flr(20);

Vars: X(0), Y(0), ZDelta(0), VarA(0), VarB(0), OldVarA(0);

Y = X;
X = Stddev(Close,30);
ZDelta = (X-Y)/X;

If CurrentBar = 1 then VarA = 20;

OldVarA = VarA;
VarA = OldVarA*(1 + ZDelta);
VarA = MaxList(VarA,Flr);
VarA = MinList(VarA,Ceil);
VarB = VarA * 0.5;

Plot1(VarA,"LookBack")

I believe the above is copied correctly from Futures magazine.

- 0 -

The following is Metastock's attempt to program the basic channel enter the following formula "BaseC" into the indicator builder. It needs to have the name of base for your system test to work.

 

 



Code:

BaseC
If(Cum(1)<=31,1,(((Stdev(C,30)-Ref(Stdev(C,30),-1))/Stdev(C,30))+1)*PREV)




The next two formulas should be entered in the Enter Long and Enter Short of a system test.

Base Channel System


Enter Long

Cross(H,Ref(HHV(H,20)+Fml("BaseC"),-1))


Enter short

Cross(Ref(LLV(L,20)-Fml("BaseC"),-1),L)






If you just want to look at the formulas on a chart enter the following into the indicator builder and plot then on top of your chart.

Base Channel
{Formula1}
Ref(HHV(H,20) + Fml("BaseC"),-1);

{Formula2}
Ref(LLV(L,20) - Fml("BaseC"),-1)


 




 

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

 


Source: http://purebytes.com/archives/metastock/

 

View similar:

Chandelier Exit Variation II
Genesis of a Simple Futures Trading System
Tema PV Binary Wave System
Tether Line Trading System
ROC Moving Average System Test
Bollinger Band Histogram Trading System
Time Series Forecast System Test
Gil Raff MarketSpace Timing System
Volume Oscillator System w/Optm
Experimental Williams Trading System
...
 
 
all systems for MetaStock
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