| |
 |
New Market Paradigm
|
 |
|
|
|
Views:
1730 |
| Added: June 11, 2007 |
| |
|
|
|
| This formula has not been rated yet |
| |
| |
email this link
|
| |
| |
| Tags:
TradeStation, system
|
| |
 |
To implement the strategies from my article, "Mutated variables, volatility
and a new market paradigm," first write the programs that will generate studies
and systems. Begin by building a function that indicates the current state of
the market. Use this function to build indicators, paintbars and systems. Use
of the BollingerBand function saves some programming time, but you could also
insert your own standard deviation function here if you want to be more precise.
New market paradigm system
This system will eventually be the finished model. It is very flexible, allowing
the trader to either write systems based solely on the NMP phases, or plug in
existing systems using the NMP as a filter.
Setting Defaults for NMP system:
Properties: Check "Allow multiple entries...." and "Generate
orders for next bar"
Code:
Type: Function, Name: NewMarketParadigm, Output: Numeric
Input: Price(NumericSeries),Length(NumericSimple),StdDevUp (NumericSimple),StdDevDn(NumericSimple);
value1 = BollingerBand(Price,Length,StdDevUp);
value2 = BollingerBand(Price,Length,StdDevDn);
Condition1 = value1 < value1[1] and value2 > value2[1]; {Contraction}{Built
as conditions for later revision --WD}
Condition2 = value1 > value1[1] and value2 < value2[1]; {Expansion}
Condition3 = Condition1 = False and Condition2 = False; {Transition}
IF Condition1 then NewMarketParadigm = 1; {Contraction}
IF Condition2 then NewMarketParadigm = 2; {Expansion}
IF Condition3 then NewMarketParadigm = 3; {Transition}
Name: NMP SYSTEM, Stops: None
Input: Price(close),Length(28),StdDevUp(2),StdDevDn(-2);
Vars: NmpC(0),NmpE(0),NmpT(0),Trigger(0);
{*1.}
If NewMarketParadigm(Price,Length,StdDevUp,StdDevDn) = 1 then NmpC = NmpC +
1
Else NmpC = 0; {Contraction phase}
If NewMarketParadigm(Price,Length,StdDevUp,StdDevDn) = 2 then NmpE = NmpE +
1
Else NmpE = 0; {Expansion Phase}
If NewMarketParadigm(Price,Length,StdDevUp,StdDevDn) = 3 then NmpT = 1
Else NmpT = 0; {Transition Phase}{Reversal traders will be using this phase,
so I left it in, although I donOt use it. No Counter is implemented, but one
could certainly do that N WD}
{*2.}
Condition1 = NmpE > 1; {2 consecutive NmpE ranges qualify as an Expansion
Phase. -- WD}
If Condition1 then begin
Trigger = 1;
End;
{*3.}
If Trigger = 1 then begin
Buy Highest(High,10) + 1 point Stop;
Sell Lowest(Low,10) - 1 point Stop;
End;
Name: NMP SYSTEM 2, Stops: None
Input: Price(close),Length(28),DevSet(2),Accfactr(.02);
value1 = StdDev(Price,Length)*DevSet - StdDev(Price,Length)*-DevSet;
If value1 = Lowest(value1,Length) and Adx(14) < 23 then begin
If SlowD(Length) > 75 OR SlowD(Length) < 25 then begin
IncludeSystem: "Parabolic",ACCFACTR;
End;
End;
Author: Walt Downs
Source: http://www.activetradermag.com
all systems for TradeStation
all systems
|