logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

2 Pages<12
Options
Go to last post Go to first unread
nasdaqtrader  
#21 Posted : Monday, March 5, 2007 7:39:02 AM(UTC)
nasdaqtrader

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 2/2/2005(UTC)
Posts: 307

Thanks: 7 times
Was thanked: 3 time(s) in 3 post(s)

minnamor,

Sorry for the delay in response to your email.

The formula you have enclosed can be used as additional filter see below.

1. a signal is valid if H>Mov(C,20,E) for longs and L<Mov(C,20,E) for shorts,
2. with a valid signal, place a stop order above/below the signal bar high/low with validity 2 days,
3. if entered a position, exits based on 3 rules: a) initial stop loss of 12% from entry level, b) a sell signal (no validity rules applicable) and a low below the signal bar low (for longs; no 2 day time limit) and c) price below/above a fractal of level 1, i.e.
upF:=H<Ref(H,-1) AND Ref(H,-1)>Ref(H,-2);
downF:=L>Ref(L,-1) AND Ref(L,-1)<Ref(L,-2);
F1:=ValueWhen(1,upF,Ref(H,-1));
F2:=ValueWhen(1,downF,Ref(L,-1)).

Thank you in advance for your reply.

nasdaqtrader


Regards, Frank Koenig Trade Like a Pro Trend is your Friend
nasdaqtrader  
#22 Posted : Friday, March 30, 2007 9:30:44 AM(UTC)
nasdaqtrader

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 2/2/2005(UTC)
Posts: 307

Thanks: 7 times
Was thanked: 3 time(s) in 3 post(s)

minnamor

Thank you, I'm just getting back from a long business trip and project.

What would the Shorts formula be and then I will try to see if this works.

Thank you

Nasdaqtrader

Regards, Frank Koenig Trade Like a Pro Trend is your Friend
minnamor  
#23 Posted : Friday, March 30, 2007 9:49:56 AM(UTC)
minnamor

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/27/2005(UTC)
Posts: 126
Location: Italy

Below is the short side code for System tester. I have reproduced the close long code because in the meantime I have replaced the fractal of 1st order with the "3 day ringed high / low" as defined in the plug-in documentation.

sell order

lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));
3DringedLow:=L>Ref(L,-3) AND Ref(L,-1)>Ref(L,-3) and Ref(L,-2)>Ref(L,-3) and Ref(L,-3)<Ref(L,-4);
isolatedlow:=ValueWhen(1,3DringedLow,Ref(L,-3));
L<isolatedlow OR (L<valuewhen(1,sc,L) and BarsSince(bc)>BarsSince(sc));

Stop price:
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H,Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));
3DringedLow:=L>Ref(L,-3) AND Ref(L,-1)>Ref(L,-3) and Ref(L,-2)>Ref(L,-3) and Ref(L,-3)<Ref(L,-4);
isolatedlow:=ValueWhen(1,3DringedLow,Ref(L,-3));
if(L<L<isolatedlow,min(O,isolatedlow),min(O,valuewhen(1,sc,L)))

Sell Short
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));
Alert(sc,2) AND L<ValueWhen(1,sc,L) AND ValueWhen(1,sc,L)>Mov(C,20,E);

Stop order
lb:=TroughBars(1,L,.1);hb:=PeakBars(1,H,.1); plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));
min(O,ValueWhen(1,sc,L))

Buy to cover
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));

3DringedHigh:=H<Ref(H,-3) AND Ref(H,-1)<Ref(H,-3) AND Ref(H,-2)<Ref(H,-3) and Ref(H,-3)>Ref(H,-4);
isolatedHigh:=ValueWhen(1,3DringedHigh,Ref(H,-3));

H>isolatedHigh OR (H>valuewhen(1,bc,H) and BarsSince(bc)<BarsSince(sc));

Stop order
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));
3DringedHigh:=H<Ref(H,-3) AND Ref(H,-1)<Ref(H,-3) AND Ref(H,-2)<Ref(H,-3) and Ref(H,-3)>Ref(H,-4);
isolatedHigh:=ValueWhen(1,3DringedHigh,Ref(H,-3));
If(H>isolatedHigh,max(O,isolatedHigh),max(O,valuewhen(1,bc,H)))

if not familiar with the definition, a "Three Day Ringed low/high" is a low (high) which is not exceeded for at least 3 days (more restrictive than a fractal of 1st order). Your input on the above would be much appreciated.

Maurizio

nasdaqtrader  
#24 Posted : Monday, April 2, 2007 11:41:27 AM(UTC)
nasdaqtrader

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 2/2/2005(UTC)
Posts: 307

Thanks: 7 times
Was thanked: 3 time(s) in 3 post(s)

Good Morning Maurizio,

Thank you once again for your help. I ran the system test with the following formulas:

buy order:
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
setup:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1))) and H>Mov(C,20,E) ;
H>(Valuewhen(1,setup,H)+0.1) and BarsSince(setup)<=2;

order type - stop:
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
setup:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1))) and H>Mov(C,20,E) ;
max(O,Valuewhen(1,setup,H)+0.1)

sell order

lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));
3DringedLow:=L>Ref(L,-3) AND Ref(L,-1)>Ref(L,-3) and Ref(L,-2)>Ref(L,-3) and Ref(L,-3)<Ref(L,-4);
isolatedlow:=ValueWhen(1,3DringedLow,Ref(L,-3));
L<isolatedlow OR (L<valuewhen(1,sc,L) and BarsSince(bc)>BarsSince(sc));

Stop price:
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H,Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));
3DringedLow:=L>Ref(L,-3) AND Ref(L,-1)>Ref(L,-3) and Ref(L,-2)>Ref(L,-3) and Ref(L,-3)<Ref(L,-4);
isolatedlow:=ValueWhen(1,3DringedLow,Ref(L,-3));
if(L<L<isolatedlow,min(O,isolatedlow),min(O,valuewhen(1,sc,L)))

Sell Short
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));
Alert(sc,2) AND L<ValueWhen(1,sc,L) AND ValueWhen(1,sc,L)>Mov(C,20,E);

Stop order
lb:=TroughBars(1,L,.1);hb:=PeakBars(1,H,.1); plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));
min(O,ValueWhen(1,sc,L))

Buy to cover
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));

3DringedHigh:=H<Ref(H,-3) AND Ref(H,-1)<Ref(H,-3) AND Ref(H,-2)<Ref(H,-3) and Ref(H,-3)>Ref(H,-4);
isolatedHigh:=ValueWhen(1,3DringedHigh,Ref(H,-3));

H>isolatedHigh OR (H>valuewhen(1,bc,H) and BarsSince(bc)<BarsSince(sc));

Stop order
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));
3DringedHigh:=H<Ref(H,-3) AND Ref(H,-1)<Ref(H,-3) AND Ref(H,-2)<Ref(H,-3) and Ref(H,-3)>Ref(H,-4);
isolatedHigh:=ValueWhen(1,3DringedHigh,Ref(H,-3));
If(H>isolatedHigh,max(O,isolatedHigh),max(O,valuewhen(1,bc,H)))

I used the Nasdaq 100 list for the system test it gave about 11 stocks which had errors

Here are the stocks:

ADSK

CELG

CTSH

ERIC.O

GOOG

LBTYA

SIRI

WYNN

XMSR

SEPR

SHLD

Can you see that I have everything correct, I believe everything is as you have emailed me, Can you see if you get the same results.

Thank you once again for you help.

Frank

Regards, Frank Koenig Trade Like a Pro Trend is your Friend
minnamor  
#25 Posted : Tuesday, April 3, 2007 10:20:40 PM(UTC)
minnamor

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/27/2005(UTC)
Posts: 126
Location: Italy

tested the above stocks both long and short over 2500 bars without any error message. Do not really know where problem is (I run 100% equity simulation without leverage). I could send you the .dta file of the system is needed. Verify number of bars loaded.

regards.

maurizio

nasdaqtrader  
#26 Posted : Wednesday, April 4, 2007 4:24:12 AM(UTC)
nasdaqtrader

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 2/2/2005(UTC)
Posts: 307

Thanks: 7 times
Was thanked: 3 time(s) in 3 post(s)

Maurizio,

Thank you, can you send me the file so I can check to see my problem where it lies.

How did the system perform for that period?

nasdaqtrader

Regards, Frank Koenig Trade Like a Pro Trend is your Friend
nasdaqtrader  
#27 Posted : Wednesday, April 4, 2007 11:27:18 AM(UTC)
nasdaqtrader

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 2/2/2005(UTC)
Posts: 307

Thanks: 7 times
Was thanked: 3 time(s) in 3 post(s)

Maurizio,

Good Morning I have attached the formulas for Swing Trading Indicator with the trading rules included. I hwas hoping you can check to see if this is correct and if not show me were I need to may any changes.

EXPERT ADVISOR

Trends:

Bullish:

lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;

bc:=If(new,Cross(H, Peak(2,plot,1)),
Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),
Cross(Trough(1,plot,1),L));
BarsSince(bc)<BarsSince(sc)

Bearish:

lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;

bc:=If(new,Cross(H, Peak(2,plot,1)),
Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),
Cross(Trough(1,plot,1),L));
BarsSince(bc)>BarsSince(sc)

EXPLORATION

Col A: lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;

bc:=If(new,Cross(H, Peak(2,plot,1)),
Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),
Cross(Trough(1,plot,1),L));
BarsSince(bc)<BarsSince(sc)
Col B:
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;

bc:=If(new,Cross(H, Peak(2,plot,1)),
Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),
Cross(Trough(1,plot,1),L));
BarsSince(bc)>BarsSince(sc)
Col C: Fml("s b")=1 AND Ref(Fml("s b"),-1)=0
Col D: Fml("s ss")=1 AND Ref(Fml("s ss"),-1)=0
Filter colA OR colB OR colC OR colD

Filter enabled Yes
Periodicity Daily
Records required 1000

INDICATOR

s b {swing buy}

lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;

bc:=If(new,Cross(H, Peak(2,plot,1)),
Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),
Cross(Trough(1,plot,1),L));
BarsSince(bc)<BarsSince(sc)

s s {swing sell}

lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;

bc:=If(new,Cross(H, Peak(2,plot,1)),
Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),
Cross(Trough(1,plot,1),L));
BarsSince(bc)>BarsSince(sc)

Expert Commentary

Highlights:

Buy Signal Color Green

lb:=TroughBars(1,L,.1);

hb:=PeakBars(1,H,.1);

plot:=Zig(If(lb<hb, L, H ),1,%);

new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;

bc:=If(new,Cross(H, Peak(2,plot,1)),

Cross(H, Peak(1,plot,1)));

sc:=If(new,Cross(Trough(2,plot,1),L),

Cross(Trough(1,plot,1),L));

bc AND Ref(BarsSince(bc)>BarsSince(sc),-1)

Sell Signal Color Red

lb:=TroughBars(1,L,.1);

hb:=PeakBars(1,H,.1);

plot:=Zig(If(lb<hb, L, H ),1,%);

new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;

bc:=If(new,Cross(H, Peak(2,plot,1)),

Cross(H, Peak(1,plot,1)));

sc:=If(new,Cross(Trough(2,plot,1),L),

Cross(Trough(1,plot,1),L));

sc AND Ref(BarsSince(bc)<BarsSince(sc),-1)

Expert Commentary

Symbols:

Buy Signal

lb:=TroughBars(1,L,.1);

hb:=PeakBars(1,H,.1);

plot:=Zig(If(lb<hb, L, H ),1,%);

new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;

bc:=If(new,Cross(H, Peak(2,plot,1)),

Cross(H, Peak(1,plot,1)));

sc:=If(new,Cross(Trough(2,plot,1),L),

Cross(Trough(1,plot,1),L));

bc AND Ref(BarsSince(bc)>BarsSince(sc),-1)

Sell Signal

lb:=TroughBars(1,L,.1);

hb:=PeakBars(1,H,.1);

plot:=Zig(If(lb<hb, L, H ),1,%);

new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;

bc:=If(new,Cross(H, Peak(2,plot,1)),

Cross(H, Peak(1,plot,1)));

sc:=If(new,Cross(Trough(2,plot,1),L),

Cross(Trough(1,plot,1),L));

sc AND Ref(BarsSince(bc)<BarsSince(sc),-1)

System Test:

buy order:
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
setup:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1))) and H>Mov(C,20,E) ;
H>(Valuewhen(1,setup,H)+0.1) and BarsSince(setup)<=2;



order type - stop:
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
upF:=H<Ref(H,-1) AND Ref(H,-1)>Ref(H,-2);
downF:=L>Ref(L,-1) AND Ref(L,-1)<Ref(L,-2);
F1:=ValueWhen(1,upF,Ref(H,-1));
F2:=ValueWhen(1,downF,Ref(L,-1));
setup:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L)) ;
If(ref(setup,-1),O,min(O,F2))

sell order

lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));
3DringedLow:=L>Ref(L,-3) AND Ref(L,-1)>Ref(L,-3) and Ref(L,-2)>Ref(L,-3) and Ref(L,-3)<Ref(L,-4);
isolatedlow:=ValueWhen(1,3DringedLow,Ref(L,-3));
L<isolatedlow OR (L<valuewhen(1,sc,L) and BarsSince(bc)>BarsSince(sc));

Stop price:
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H,Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));
3DringedLow:=L>Ref(L,-3) AND Ref(L,-1)>Ref(L,-3) and Ref(L,-2)>Ref(L,-3) and Ref(L,-3)<Ref(L,-4);
isolatedlow:=ValueWhen(1,3DringedLow,Ref(L,-3));
if(L<L<isolatedlow,min(O,isolatedlow),min(O,valuewhen(1,sc,L)))

Sell Short
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));
Alert(sc,2) AND L<ValueWhen(1,sc,L) AND ValueWhen(1,sc,L)>Mov(C,20,E);

Stop order
lb:=TroughBars(1,L,.1);hb:=PeakBars(1,H,.1); plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));
min(O,ValueWhen(1,sc,L))

Buy to cover
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));

3DringedHigh:=H<Ref(H,-3) AND Ref(H,-1)<Ref(H,-3) AND Ref(H,-2)<Ref(H,-3) and Ref(H,-3)>Ref(H,-4);
isolatedHigh:=ValueWhen(1,3DringedHigh,Ref(H,-3));

H>isolatedHigh OR (H>valuewhen(1,bc,H) and BarsSince(bc)<BarsSince(sc));

Stop order
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));
3DringedHigh:=H<Ref(H,-3) AND Ref(H,-1)<Ref(H,-3) AND Ref(H,-2)<Ref(H,-3) and Ref(H,-3)>Ref(H,-4);
isolatedHigh:=ValueWhen(1,3DringedHigh,Ref(H,-3));
If(H>isolatedHigh,max(O,isolatedHigh),max(O,valuewhen(1,bc,H)))

Is the above formula correct now?

nasdaqtrader

Regards, Frank Koenig Trade Like a Pro Trend is your Friend
nasdaqtrader  
#28 Posted : Wednesday, April 11, 2007 7:40:49 AM(UTC)
nasdaqtrader

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 2/2/2005(UTC)
Posts: 307

Thanks: 7 times
Was thanked: 3 time(s) in 3 post(s)

Good Evening Maurizio,

I hope you can check my formulas out on the Swing Trading Indicator, I have taken your system test and made a Expert Advisor, Exploratio, and Indicator to complet the whole system.

Here are the formulas:

The trading rules are as follows:

1. A signal is valid if H>Mov(C,20,E) for longs and L<Mov(C,20,E) for shorts.

2. With a valid signal, place a stop order above/below the signal bar high/low with validity 2 days.

3. If entered a position, exists based on 3 rules: a) Initial stop loss of 12% from entry level, b) A sell signal (no validity rules applicable) and a low below the signal bar low (for longs; no 2 day time limit) and c) price below/above a fractal of level 1, i.e.

upF:=H<Ref(H,-1) AND Ref(H,-1)>Ref(H,-2); downF:=L>Ref(L,-1) AND Ref(L,-1)<Ref(L,-2); F1:=ValueWhen(1,upF,Ref(H,-1)); F2:=ValueWhen(1,downF,Ref(L,-1)).

Short side for System Tester, I have reproduced the close long code because in the meantime I have replaced the fractal of 1st order with the “3 day ringed high/low.

EXPERT ADVISOR

Trends:

Bullish:

lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
setup:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1))) and H>Mov(C,20,E) ;
H>(Valuewhen(1,setup,H)+0.1) and BarsSince(setup)<=2;

Buy to cover
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));

3DringedHigh:=H<Ref(H,-3) AND Ref(H,-1)<Ref(H,-3) AND Ref(H,-2)<Ref(H,-3) and Ref(H,-3)>Ref(H,-4);
isolatedHigh:=ValueWhen(1,3DringedHigh,Ref(H,-3));

H>isolatedHigh OR (H>valuewhen(1,bc,H) and BarsSince(bc)<BarsSince(sc));


Bearish:

lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
setup:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1))) and H>Mov(C,20,E) ;
H>(Valuewhen(1,setup,H)+0.1) and BarsSince(setup)<=2;

Buy to cover
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));

3DringedHigh:=H<Ref(H,-3) AND Ref(H,-1)<Ref(H,-3) AND Ref(H,-2)<Ref(H,-3) and Ref(H,-3)>Ref(H,-4);
isolatedHigh:=ValueWhen(1,3DringedHigh,Ref(H,-3));

H>isolatedHigh OR (H>valuewhen(1,bc,H) and BarsSince(bc)<BarsSince(sc));

EXPLORATION

Col A:

lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
setup:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1))) and H>Mov(C,20,E) ;
H>(Valuewhen(1,setup,H)+0.1) and BarsSince(setup)<=2;

Buy to cover
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));

3DringedHigh:=H<Ref(H,-3) AND Ref(H,-1)<Ref(H,-3) AND Ref(H,-2)<Ref(H,-3) and Ref(H,-3)>Ref(H,-4);
isolatedHigh:=ValueWhen(1,3DringedHigh,Ref(H,-3));

H>isolatedHigh OR (H>valuewhen(1,bc,H) and BarsSince(bc)<BarsSince(sc));

Col B:

lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
setup:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1))) and H>Mov(C,20,E) ;
H>(Valuewhen(1,setup,H)+0.1) and BarsSince(setup)<=2;

Buy to cover
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));

3DringedHigh:=H<Ref(H,-3) AND Ref(H,-1)<Ref(H,-3) AND Ref(H,-2)<Ref(H,-3) and Ref(H,-3)>Ref(H,-4);
isolatedHigh:=ValueWhen(1,3DringedHigh,Ref(H,-3));

H>isolatedHigh OR (H>valuewhen(1,bc,H) and BarsSince(bc)<BarsSince(sc));


Col C: Fml("s b")=1 AND Ref(Fml("s b"),-1)=0
Col D: Fml("s ss")=1 AND Ref(Fml("s ss"),-1)=0
Filter colA OR colB

Filter enabled Yes
Periodicity Daily
Records required 1000

INDICATOR

s b {swing buy}

lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
setup:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1))) and H>Mov(C,20,E) ;
H>(Valuewhen(1,setup,H)+0.1) and BarsSince(setup)<=2;

Buy to cover
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));

3DringedHigh:=H<Ref(H,-3) AND Ref(H,-1)<Ref(H,-3) AND Ref(H,-2)<Ref(H,-3) and Ref(H,-3)>Ref(H,-4);
isolatedHigh:=ValueWhen(1,3DringedHigh,Ref(H,-3));

H>isolatedHigh OR (H>valuewhen(1,bc,H) and BarsSince(bc)<BarsSince(sc));

s s {swing sell}

lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
setup:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1))) and H>Mov(C,20,E) ;
H>(Valuewhen(1,setup,H)+0.1) and BarsSince(setup)<=2;

Buy to cover
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));

3DringedHigh:=H<Ref(H,-3) AND Ref(H,-1)<Ref(H,-3) AND Ref(H,-2)<Ref(H,-3) and Ref(H,-3)>Ref(H,-4);
isolatedHigh:=ValueWhen(1,3DringedHigh,Ref(H,-3));

H>isolatedHigh OR (H>valuewhen(1,bc,H) and BarsSince(bc)<BarsSince(sc));

Expert Commentary

Highlights:

Buy Signal Color Green

lb:=TroughBars(1,L,.1);

hb:=PeakBars(1,H,.1);

plot:=Zig(If(lb<hb, L, H ),1,%);

new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;

setup:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1))) and H>Mov(C,20,E) ;
H>(Valuewhen(1,setup,H)+0.1) and BarsSince(setup)<=2;

Buy to cover

lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));

3DringedHigh:=H<Ref(H,-3) AND Ref(H,-1)<Ref(H,-3) AND Ref(H,-2)<Ref(H,-3) and Ref(H,-3)>Ref(H,-4);
isolatedHigh:=ValueWhen(1,3DringedHigh,Ref(H,-3));

H>isolatedHigh OR (H>valuewhen(1,bc,H) and BarsSince(bc)<BarsSince(sc));

bc AND Ref (BarsSince(bc)>BarsSince(sc),-1)

Sell Signal Color Red

lb:=TroughBars(1,L,.1);

hb:=PeakBars(1,H,.1);

plot:=Zig(If(lb<hb, L, H ),1,%);

new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;

setup:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1))) and H>Mov(C,20,E) ;
H>(Valuewhen(1,setup,H)+0.1) and BarsSince(setup)<=2;

Buy to cover

lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));

3DringedHigh:=H<Ref(H,-3) AND Ref(H,-1)<Ref(H,-3) AND Ref(H,-2)<Ref(H,-3) and Ref(H,-3)>Ref(H,-4);
isolatedHigh:=ValueWhen(1,3DringedHigh,Ref(H,-3));

H>isolatedHigh OR (H>valuewhen(1,bc,H) and BarsSince(bc)<BarsSince(sc));

sc AND Ref(BarsSince(bc)<BarsSince(sc),-1)

Expert Commentary

Symbols:

Buy Signal

lb:=TroughBars(1,L,.1);

hb:=PeakBars(1,H,.1);

plot:=Zig(If(lb<hb, L, H ),1,%);

new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;

setup:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1))) and H>Mov(C,20,E) ;
H>(Valuewhen(1,setup,H)+0.1) and BarsSince(setup)<=2;

Buy to cover

lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));

3DringedHigh:=H<Ref(H,-3) AND Ref(H,-1)<Ref(H,-3) AND Ref(H,-2)<Ref(H,-3) and Ref(H,-3)>Ref(H,-4);
isolatedHigh:=ValueWhen(1,3DringedHigh,Ref(H,-3));

H>isolatedHigh OR (H>valuewhen(1,bc,H) and BarsSince(bc)<BarsSince(sc));

bc AND Ref (BarsSince(bc)>BarsSince(sc),-1)

Sell Signal

lb:=TroughBars(1,L,.1);

hb:=PeakBars(1,H,.1);

plot:=Zig(If(lb<hb, L, H ),1,%);

new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;

setup:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1))) and H>Mov(C,20,E) ;
H>(Valuewhen(1,setup,H)+0.1) and BarsSince(setup)<=2;

Buy to cover

lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));

3DringedHigh:=H<Ref(H,-3) AND Ref(H,-1)<Ref(H,-3) AND Ref(H,-2)<Ref(H,-3) and Ref(H,-3)>Ref(H,-4);
isolatedHigh:=ValueWhen(1,3DringedHigh,Ref(H,-3));

H>isolatedHigh OR (H>valuewhen(1,bc,H) and BarsSince(bc)<BarsSince(sc));

sc AND Ref(BarsSince(bc)<BarsSince(sc),-1)

System Test:

buy order:
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
setup:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1))) and H>Mov(C,20,E) ;
H>(Valuewhen(1,setup,H)+0.1) and BarsSince(setup)<=2;

order type - stop:
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
upF:=H<Ref(H,-1) AND Ref(H,-1)>Ref(H,-2);
downF:=L>Ref(L,-1) AND Ref(L,-1)<Ref(L,-2);
F1:=ValueWhen(1,upF,Ref(H,-1));
F2:=ValueWhen(1,downF,Ref(L,-1));
setup:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L)) ;
If(ref(setup,-1),O,min(O,F2))

sell order

lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));
3DringedLow:=L>Ref(L,-3) AND Ref(L,-1)>Ref(L,-3) and Ref(L,-2)>Ref(L,-3) and Ref(L,-3)<Ref(L,-4);
isolatedlow:=ValueWhen(1,3DringedLow,Ref(L,-3));
L<isolatedlow OR (L<valuewhen(1,sc,L) and BarsSince(bc)>BarsSince(sc));

Stop price:
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H,Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));
3DringedLow:=L>Ref(L,-3) AND Ref(L,-1)>Ref(L,-3) and Ref(L,-2)>Ref(L,-3) and Ref(L,-3)<Ref(L,-4);
isolatedlow:=ValueWhen(1,3DringedLow,Ref(L,-3));
if(L<L<isolatedlow,min(O,isolatedlow),min(O,valuewhen(1,sc,L)))

Sell Short
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));
Alert(sc,2) AND L<ValueWhen(1,sc,L) AND ValueWhen(1,sc,L)>Mov(C,20,E);

Stop order
lb:=TroughBars(1,L,.1);hb:=PeakBars(1,H,.1); plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));
min(O,ValueWhen(1,sc,L))

Buy to cover
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));

3DringedHigh:=H<Ref(H,-3) AND Ref(H,-1)<Ref(H,-3) AND Ref(H,-2)<Ref(H,-3) and Ref(H,-3)>Ref(H,-4);
isolatedHigh:=ValueWhen(1,3DringedHigh,Ref(H,-3));

H>isolatedHigh OR (H>valuewhen(1,bc,H) and BarsSince(bc)<BarsSince(sc));

Stop order
lb:=TroughBars(1,L,.1);
hb:=PeakBars(1,H,.1);
plot:=Zig(If(lb<hb, L, H ),1,%);
new:=PeakBars(1,plot,1)=0 OR TroughBars(1,plot,1)=0;
bc:=If(new,Cross(H, Peak(2,plot,1)),Cross(H, Peak(1,plot,1)));
sc:=If(new,Cross(Trough(2,plot,1),L),Cross(Trough(1,plot,1),L));
3DringedHigh:=H<Ref(H,-3) AND Ref(H,-1)<Ref(H,-3) AND Ref(H,-2)<Ref(H,-3) and Ref(H,-3)>Ref(H,-4);
isolatedHigh:=ValueWhen(1,3DringedHigh,Ref(H,-3));
If(H>isolatedHigh,max(O,isolatedHigh),max(O,valuewhen(1,bc,H)))

Maurizio, It looks to me that the 12% STOP LOSS is not there?

Please advise any changes and if the above formulas are correct.

Once again thank you very much for your support and advice.

Nasdaqtrader

Frank

Regards, Frank Koenig Trade Like a Pro Trend is your Friend
Jose  
#29 Posted : Wednesday, April 11, 2007 12:00:42 PM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
Nasdaqtrader/Frank... please tell me, why are you doing this? Why waste so much time and effort building and backtesting a trading system based on shifting hindsight functions? Is it some sort of a masochistic hobby you've got there? Please, try and understand that any "trading strategy" that incorporates any of the dynamically hindsight based functions (Peak/Trough/Zig/etc) is akin to building castles in the air - a total waste of time and effort. jose '-)
nasdaqtrader  
#30 Posted : Wednesday, April 11, 2007 1:58:27 PM(UTC)
nasdaqtrader

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 2/2/2005(UTC)
Posts: 307

Thanks: 7 times
Was thanked: 3 time(s) in 3 post(s)

Jose,

Thank you today for your email. I just wanted to get a complete system put together to see how well it works. What I am really looking for is to have a Momentum Trading System to use daily to tarde on, so far what I have seen in MetaStock plug ins are useless.

Momentuma Trading System to trade based on the following criterias:

  • 1 Year High (but only trade stocks at ALL TIME HIGHS)
  • Shares Outstanding < 30 Million
  • % Insiders > 25%
  • % Institutions < 25%
  • Average Volume > 100,000
  • % Rise 50%
  • # Weeks 8

I know some are fundamentals, and MetaStock does not use fundamentals. If you have any suggestions I would really appreciate your feedback. I'm looking to trade stocks that are ready to explode from anywhere from 50% to 200%+ per annum in the stock market.

Here is a outline what may be a good trading strategy.

As in all these scans ALL other criteria MUST be met. The stock MUST be at an all-time high, within the price, volume, market cap and Volume % increases these values you cannot comprise AND pay attention to the % Inst Ownership and Shares Outstanding.

  1. Entry

Once you have run your screens and are presented with a number of momentum stock trading candidates you must start charting these stocks on a weekly bar chart. We are now looking for an entry on weekly bar chart correction.

The entry point will be on the breakout. It is a very simple entry method. BUT it is still the most affective. You cannot simple enter the stocks as they appear on the screen. Stocks move in legs or spurts. Jumping into an overbought trend will result in quick losses nine out of ten times.

Be patient and no matter how long it takes only enter on the breakout. There never is a time limit placed upon them. Once you have a breakout price bar, simply draw a horizontal line across from that point and take a reading of this line. This will be your trigger point.

In my years of trading momentum stocks I have found it is best to enter your buy orders slightly above the break-out point. I used to try and “beat the masses” to the order by placing my stop slightly below the breakout point, but this has not worked so well lately.

You want to place your buy order clear of the breakout bar. This increases your chances of it being a real breakout rather than a false one. It will still happen but you have increased your odds. This is the entry signal as simple as I could describe it. Nothing complicated no complicated technical indicators to use. I use simple price data for all my trading decisions. Remember, all those oscillators, moving averages and indicators people love to use simply confirm what you see on the bar chart. In other words, every indicator “lags” actual price. It serves no purpose. Let price alone be your decision maker. You’ll be miles ahead of the masses.

Once you are filled on a trade the first concern is where to get out if things do not work out. Yes! Before you count those profits protect your capital.

Cutting losses is actually more important than making money.

So lets’ now talk about where to place initial stop losses on trades.

  1. Placing Initial Stops

Basically there are THREE simple rules in regards to placing initial stops: 1) NEVER take more than a 10% loss on your trade. 2) Place your stop slightly below the swing low pivot point. 3) The time exit. If you are NOT in profit after four weeks of entry then exit the trade. Use the stop that takes you out with the SMALLEST loss.

Rule 1: NEVER Take More Than A 10% Loss on Your Trade.

This is quite self explanatory. I have never seen the need to give a Momentum Stock any more than 10% room, 90% of the time the move goes our way right away and we are in profits from day one.

Sometimes the stock will flounder a while before taking off. But very rarely does a stock fall 10%+ from our buy point and then turnaround and take off. Your initial stop is your insurance policy. If the stock turns around and gives you a 10% loss, your timing is wrong and/or the stock has had a false breakout. Simply exit and move on.

Taking a loss is just as, if not more, important than riding out a profit.

Initial Stop Rule 2: Swing Low Pivot Point Exit.

Firstly let me say this initial stop is VERY rare to find. Normally your initial stop will be taken out by the 10% rule or the timing rule.

Finding swing low pivots closer than 10% away (because remember despite all other rules NEVER take a bigger initial loss of more than 10%) is quite rare.

My definition of a Swing Low Point for initial exit is:

“Is a price low which precedes the breakout”

As a tip. Do not place your stop right on the pivot low. Give it as much room as you can without exceeding the 10% initial stop loss. This goes for later on in the trade, as well, when you trail your stop behind the pivot low bars.

Why? I’ve seen it happen too many times where the price action comes down and actually seems to touch the previous pivot low point and then blast off again. It could be that the floor traders go hunting stop loss orders that are gathered at these points. It’s best to give it as much room as you can, within reason.

Initial Stop Rule 3: The Timed Exit

This rule I have adopted that gets me out of losses before the above two stops are hit. It works very well in momentum trading Stocks. If after 4 weeks of being in the trade you are not IN PROFIT, and then EXIT the trade. Don’t ask or try to justify your position. Exit the trade. You can always reenter at a later date. You will find, with experience, many trades, many of the great trades, go your way immediately. If it doesn’t, it doesn’t automatically mean it is a bad trade, but be on your guard for an exit.

The four week, loss, rule may get you out before your 10% loss or the pivot low is taken out.

Start counting after trade entry. Four weeks later are you showing a profit? If the answer is no, Exit. Either look to re-enter or look for a new trade.

Once you are stopped out of a trade there is nothing wrong with going back in. That concludes the section on where to place initial stops. Once we are in a profitable position we need to know where to trial the Stop Loss to ensure we exit with maximum profits.

  1. How To Trial Your Stop Loss

For Peace of mind and superior profits:

Once you are in a profitable stock position you have to trial your stop behind sufficiently close so as not to give back too high of a percentage of your profits BUT, at the same time you must not “overcrowd” your profitable trade by placing your stop loss so close you will be stopped out on a minor correction.

Which will happen, when it comes to trialing your stop loss it becomes a little bit of an “art”? A dreaded word in the world of systematic and mechanical trading but there really is no one golden rule to get you out of a trade with maximum profits.

There are two rules I use to trial my stop once I am in a profitable position.

  1. When I am 20% up me move my stop to break-even.
  2. I trial my stop loss behind pivot low points.

Let me expand upon these two rules.

Rule 1: When I am 20% up I move my stop to break-even.

When my position is by 20% I move my stop to break-even. Regardless of where the pivot low is. Quite simple; when a position I am in is up 20% or more I move my stop to break-even, where I was filled. Now if the position turns down from here I get out without a loss. Why 20%? No reason, it works for me. Maybe you prefer to move your break-even stop once your position is up by say 10%, 15% or 25%. I simply find 20% a happy medium.

Don’t be too keen to protect your profits. Remember to give a profitable trade as much room as you can in hope of small, initial profits, becoming much larger ones. But at the same time I see no point in letting a stock which was 20% profitable at one stage then turn around and give you a loss. That’s just plain bad money management.

The 20% Break-even rule is ALWAYS superseded by this rule:

Rule 2: I trial my stop loss behind pivot low points.

SOME RULES ABOUT TRAILING PIVOT LOW STOPS:

Rule 1: Once a stop has been placed under a pivot low bar IT CAN NEVER BE LOWERED.

Rule 2: A VALID Pivot Low can ONLY be established AFTER a previous high has been taken out.

A PIVOT LOW CAN ONLY BE VALID AFTER A VALID SWING HIGH HAS BEEN ESTABLISHED.

Let’s quickly recap:

  • Once in a trade place a stop 10% below the stock or slightly below the pivot low bar, whichever is closer.

  • When you are 20% in profit on the trade, regardless of where the pivot low point is, move your stop to break-even.

  • Trail your stop slightly below pivot low bars as the stock “zigzags” in an up trend until you are stopped out. While this will exit you from over 95% of the trades there are one or two trades where trailing your stop below pivot low points will simply mean giving back too much of your profits.

    1. EXITS

There are three exit signals. You must never exit until one of these signals tells you to get out of the trade. Remember we are not trading from opinion or emotion. We always follow our rules.

1. A Reversal Exit:

This is the most common type. As the trade goes our way pivot low bars are created behind our trade. Eventually things reverse and we are stopped out. Don’t be too upset if you give 20-30% of your profits back.

You can never pick tops and bottoms.

Just be glad you made a profit and move on. No need to listen to outside advice, or complicated technical analysis in order for you to exit with profits.

    1. The Volatility Exit:

When the volatility (length) on the daily bars goes wild it is a sure sign “greed” as entered the market and the party is over.

But how do we define volatility?

I have defined it as when the length of a daily bar is three times the average daily bar over the past three months. When this happens move your stop close to the action. Protect your profits. Where should you place your stop? That depends on how much you are willing to risk. Personally I place my stop a fraction below the most volatile bar.

Often I give up some profit but its okay by then as I am usually well ahead. Some traders get out immediately, some place their stops further away “hoping” for more profits. It’s your choice but just be aware the move is “probably” almost over.

    1. The Profit Exit:

I struggled to come up with a name for this exit but finally decided that you are doing is protecting some of your profits regardless of what the chart tells you, hence the name.

This is the least common exits.

If the floor gets left way, way behind and the share keeps climbing steadily never giving a volatility exit you have to protect your profits.

Imagine if this has happened to you (I’ll admit it is very rare not to have a weekly low pivot stop). Are you going to watch all your paper profits disappear until you are stopped out? No. I didn’t think so. So at all time regardless of what the chart is doing, you must have a trailing stop that will protect a percentage of your profits.

How much of your profits will you protect? Again this is up to the individual. I ALWAYS keep a stop in the market which that 50% of my profits. That may seem like a lot of profit to give up, but remember it is profit and not losses. You must give leeway to profit taking than to taking a loss.

This concludes EXITS.

Re-Cap:

1. Once in a trade place a stop behind the pivot low or 10% away. Whichever is CLOSEST?

2. As the trade goes your way simply trail the stop behind new Pivot Low bars as they developed

3. When 20% up move your stop to break-even.

If the stock flies up with creating a new Pivot Low Bar, use a little discretion to protect some of those profits. Remembering you can always get out with a profit and re-enter the trade

Currently I cannot find any great system to follow with MetaStock on a daily basis,

Looking forward hearing from you soon.

Nasdaqtrader

Frank

Regards, Frank Koenig Trade Like a Pro Trend is your Friend
PTJim  
#31 Posted : Thursday, April 12, 2007 4:32:53 PM(UTC)
PTJim

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/10/2006(UTC)
Posts: 252

Thanks: 11 times
Was thanked: 9 time(s) in 6 post(s)
Frank, thanks very much for your thoughtful, detailed strategy outline. People may argue about the details, but you've put a lot of work into it, put it into writing and seem to follow a plan - that's more than most amateur traders do, by far.

But I disagree with one of your premises:

"I use simple price data for all my trading decisions. Remember, all those oscillators, moving averages and indicators people love to use simply confirm what you see on the bar chart. In other words, every indicator “lags” actual price. It serves no purpose. Let price alone be your decision maker."

While price is key, in my opinion it cannot stand alone - volume and time periods must be considered. In other words, the past provides more information if you include these rather than just price. Factoring in volume over the period of time of interest, you get some insight into the strength behind the price - is it likely to hold, go higher, go lower? That's where I think volume-inclusive indicators are useful.

To put it simply, in the words of Alexander Elder: "Price shows you what people are thinking. Volume shows you what they are feeling."

Volume shows the commitment behind the price.

Again, thanks for taking the time for such a detailed posting.

nasdaqtrader  
#32 Posted : Friday, April 13, 2007 7:46:24 AM(UTC)
nasdaqtrader

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 2/2/2005(UTC)
Posts: 307

Thanks: 7 times
Was thanked: 3 time(s) in 3 post(s)

PT Jim,

Thank you for you email post. Thank you also for your response on my Trading strategy. So you would use Price Volume and time period instead of the following:

  • 1 Year High (but omly trade stocks at ALL TIME HIGHS)
  • Min Price $5.00 Max Price $75.00
  • Shares Outstanding < 30 Million% Insiders > 25%
  • % Institutions < 25%
  • Average Volume > 100,000
  • % Rise 50%
  • # weeks 8

Like to hear your feedback again.

Nasdaqtrader

Regards, Frank Koenig Trade Like a Pro Trend is your Friend
PTJim  
#33 Posted : Saturday, April 14, 2007 4:38:13 PM(UTC)
PTJim

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/10/2006(UTC)
Posts: 252

Thanks: 11 times
Was thanked: 9 time(s) in 6 post(s)
I wish I could give you more-specific info, but I'm not smart/experienced enough yet to know what's best even for me.

But I'm exploring both Elder's Force Index and Bollinger's Money Flow Index as volume-inclusive indicators. They are similar, but Force Index uses only closing-price comparisions (CloseToday-CloseYesterday multiplied by VolumeToday) whereas Bollinger uses HLC numbers to create a synthetic daily-composite price. Both use these price values multiplied by daily volume and are then smoothed over a multi-period timeframe. Elder recommends a short (2 or 3 period) smoothing while Bollinger's is much longer (20-50 periods).

My daily/weekly templates currently plot both FI and MFI and it's interesting to watch how such similar indicators provide significantly different plot trends.

Like I said, I can't tell you what's "best" at this point, but perhaps you might explore these and other volume-inclusive indicators to see if they're helpful for your trading methodologies.

amory  
#34 Posted : Tuesday, May 1, 2007 4:59:00 PM(UTC)
amory

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/18/2007(UTC)
Posts: 99
Location: sydney australia

<< Volume shows the commitment behind the price. >>

fully agree with you there, PTJim. I use the following line in some of my explorations:

VOLUME>=(1.6*(Mov(VOLUME,50,S )))
AND C>Ref(C,-1)

the idea is that I am looking for stocks showing well above average volume. the amazing thing is that even this very basic formula (price is up & volume more than one-and-a-half times 50-day average) offers a rejection rate of >97%!

then, by way of additional research, I ran the "price-up" line on its own & the rejection rate was only 74%.

which goes to show that volume doesn't grow on trees.

Users browsing this topic
Guest (Hidden)
2 Pages<12
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.