PureBytes Links
Trading Reference Links
|
The frequency of IPs is another, quite interesting
subject.
[A top stock may be volatile enough and suffer from drawdowns.
]
In the att. gif a per=25 and per=100 were used for the same WL
11.
The final equities now are significantly improved
.
The Long&Short code was
// Pick it Up, Long&Short
tradesSTART=DateNum()==1000601
;per=Param("per",100,25,150,25);EVENT=BarsSince(START)%per==0;Plot(10000,"Initial
Equity",Cum(1)%2,1);Plot(0,"0",1,styleNoLine);Counter=Cum(EVENT)%10;shape=IIf(Counter==1,shapeDigit0,IIf(Counter==2
,shapeDigit1,IIf(Counter==3 ,shapeDigit2,IIf(Counter==4
,shapeDigit3,IIf(Counter==5 ,shapeDigit4,IIf(Counter==6
,shapeDigit5,IIf(Counter==7 ,shapeDigit6,IIf(Counter==8
,shapeDigit7,IIf(Counter==9
,shapeDigit8,shapeDigit9)))))))));PlotShapes(shape*EVENT,colorIndigo);dcounter=1+Cum(Counter==1
AND Ref(Counter,-1)==0);dshape=IIf(dCounter==1,shapeNone,IIf(dCounter==2
,shapeDigit1,IIf(dCounter==3 ,shapeDigit2,IIf(dCounter==4
,shapeDigit3,IIf(dCounter==5 ,shapeDigit4,IIf(dCounter==6
,shapeDigit5,IIf(dCounter==7 ,shapeDigit6,IIf(dCounter==8
,shapeDigit7,IIf(dCounter==9
,shapeDigit8,shapeDigit9)))))))));PlotShapes(dshape*event,colorIndigo,0,Graph0,5);G=0;NUM=11;list
= GetCategorySymbols( categoryWatchlist, NUM );for( i = 0; ( sym =
StrExtract( list, i ) ) != ""; i++
){SetForeign(SYM,True,True);global Buy;global Sell;global
Short;global
Cover;for(b=10;b<90;b=b+5){P=5;X5=100*((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P))-(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P)))/((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P)+(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P))));Buy=Cross(-b,x5);Sell=Cross(x5,b);Short=Cross(b,X5);Cover=Buy;E1=Equity(1,0);E11=ValueWhen(EVENT,E1);G=IIf(G>E11,G,E11);}}GraphXSpace=3;fpass=0;bpass=0;Dpass=0;for(
i = 0; ( sym = StrExtract( list, i ) ) != ""; i++
){SetForeign(SYM,True,True);global Buy;global Sell;global
Short;global
Cover;for(b=10;b<90;b=b+5){P=5;X5=100*((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P))-(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P)))/((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P)+(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P))));Buy=Cross(-b,x5);Sell=Cross(x5,b);Short=Cross(b,X5);Cover=Buy;E1=Equity(1,0);E11=ValueWhen(EVENT,E1);fpass=IIf(e11==g,e1,0)+fpass;bpass=IIf(e11==g,b,0)+bpass;Dpass=IIf(e11==g,i,0)+Dpass;G=IIf(E11==G,0,G);}}STEP=IIf(EVENT,fpass-Ref(fpass,-1),0);T=Cum(STEP);Changes=Cum(Dpass!=Ref(Dpass,-1));SettingsCommission=0.25/100;FINAL=(fpass-T)*(1-2*Settingscommission*Changes);Cb=StrToNum(NumToStr(Dpass));Plot(IIf(FINAL>0,FINAL,0),WriteIf(event,"*","")+"The
topEquity stock for IP"+WriteVal(-1+Cum(event),1.0)+" is "
+StrExtract(List,Cb)+"[#"+WriteVal(Dpass,1.0)+ "]
[BuyLevel="+WriteVal(-bpass,1.0)+"] and
E",IIf(event,colorRed,colorBlack),8);
Note1: I added the [slight]
difference due to commissions [whenever the stock
change].
[this was not included in the previous // Pick it up
code]
Note2 : If the drawdowns are not huge
[I am afraid CMO5 suffers from this dangerous effect] we may see the initial
result 17,000 to be multiplied
10 or 20 times.
Note3 : In the above code two, crude
approximations were used : The buy/sell levels were symmetrical and the b
incrementwas 5.
If we use increment=1 [as we should do, because many stocks
play with slight changes, from 40 to 42 for example] and
asymmetrical buy/sell levels [as we must<FONT
size=2> do, symmetry is nothing but an illusion for this market !!]
we come to astronomical results. I will avoid to post
them...
Dimitris Tsokakis
----- Original Message -----
From: <A
title=tsokakis@xxxxxxxxx href="">Dimitris Tsokakis
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Monday, November 03, 2003 10:51 AM
Subject: Pick it up ! [was Symmetric OR not ? ]
The final step of this technique is to pick up the top stock
at the Inspection Point, together with the optimal buy/sell level.
I have placed 20 stocks** into WL11 to work with
the
// Pick it up
START=DateNum()==1000601
;per=25;EVENT=BarsSince(START)%per==0;Plot(10000,"Initial
Equity",Cum(1)%2,1);Plot(0,"0",1,styleNoLine);Counter=Cum(EVENT)%10;shape=IIf(Counter==1,shapeDigit0,IIf(Counter==2
,shapeDigit1,IIf(Counter==3 ,shapeDigit2,IIf(Counter==4
,shapeDigit3,IIf(Counter==5 ,shapeDigit4,IIf(Counter==6
,shapeDigit5,IIf(Counter==7 ,shapeDigit6,IIf(Counter==8
,shapeDigit7,IIf(Counter==9
,shapeDigit8,shapeDigit9)))))))));PlotShapes(shape*EVENT,colorIndigo);dcounter=1+Cum(Counter==1
AND Ref(Counter,-1)==0);dshape=IIf(dCounter==1,shapeNone,IIf(dCounter==2
,shapeDigit1,IIf(dCounter==3 ,shapeDigit2,IIf(dCounter==4
,shapeDigit3,IIf(dCounter==5 ,shapeDigit4,IIf(dCounter==6
,shapeDigit5,IIf(dCounter==7 ,shapeDigit6,IIf(dCounter==8
,shapeDigit7,IIf(dCounter==9
,shapeDigit8,shapeDigit9)))))))));PlotShapes(dshape*event,colorIndigo,0,Graph0,5);G=0;NUM=11;list
= GetCategorySymbols( categoryWatchlist, NUM );for( i = 0; ( sym =
StrExtract( list, i ) ) != ""; i++
){SetForeign(SYM,True,True);global Buy;global
Sell;for(b=10;b<90;b=b+5){P=5;X5=100*((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P))-(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P)))/((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P)+(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P))));Buy=Cross(-b,x5);Sell=Cross(x5,b);E1=Equity(1,0);E11=ValueWhen(EVENT,E1);G=IIf(G>E11,G,E11);}}GraphXSpace=3;fpass=0;bpass=0;Dpass=0;for(
i = 0; ( sym = StrExtract( list, i ) ) != ""; i++
){SetForeign(SYM,True,True);global Buy;global
Sell;for(b=10;b<90;b=b+5){P=5;X5=100*((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P))-(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P)))/((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P)+(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P))));Buy=Cross(-b,x5);Sell=Cross(x5,b);E1=Equity(1,0);E11=ValueWhen(EVENT,E1);fpass=IIf(e11==g,e1,0)+fpass;bpass=IIf(e11==g,b,0)+bpass;Dpass=IIf(e11==g,i,0)+Dpass;G=IIf(E11==G,0,G);}}STEP=IIf(EVENT,fpass-Ref(fpass,-1),0);T=Cum(STEP);FINAL=(fpass-T);Cb=StrToNum(NumToStr(Dpass));Plot(IIf(FINAL>0,FINAL,0),WriteIf(event,"*","")+"The
topEquity stock for IP"+WriteVal(-1+Cum(event),1.0)+" is "
+StrExtract(List,Cb)+"[#"+WriteVal(Dpass,1.0)+ "]
[BuyLevel="+WriteVal(-bpass,1.0)+"] and
E",IIf(event,colorRed,colorBlack),8);
The above code uses GetCategorySymbols() and StrExtract()
functions and, as explained many times, needs absolute alignement
for all stocks . The result
comes with some delay, but it scans all stocks/all levels to pick up the IP
optimal
<FONT
size=2>____________________________________________________
**The criterion was a July9, 2002 exploration of the
basic CMO5-34 system
Dimitris Tsokakis
----- Original Message -----
From: <A
title=tsokakis@xxxxxxxxx href="">Dimitris Tsokakis
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Sunday, November 02, 2003 7:31 PM
Subject: Symmetric OR not ? [was Add a gear box...]
The IPs search every 75 [for the example] bars the optimal
solution and apply it up to the next IP.
Their flexibility may be extended to the main question :
Symmetric or asymmetric buy/sell levels.
In APOL example the results are in the att. gif
symmetricE34 : 55,445
symmetricIP : <FONT
size=2>101,812
asymmetric IP : 227,427
For an explanation let us see the preferences per IP for
buylevel b/selllevel s
b/s
-11/50
-10/58
-10/58
-11/50
-11/47
-11/47
-11/49
-11/49
-11/50
-11/50
-11/50
-11/50
We see that b=-10 to -11 is a good level to buy, but the
symmetric solution should sell at +10 to +11, which is no good to
sell.
The same with the sell levels around 50 : -50 was too bad for
buys.
How about the whole N100 market ?
The average equity was
symmetricE34 17,072
symmetricIP
21,480
asymmetricIP 25,949
Use in Indicator builder the
// Inspection Points for Steve Karnish CMO5, asymmetric
buy/sell levelsSYM=Name();START=DateNum()==1000601
;per=Param("per",75,25,200,25);EVENT=BarsSince(START)%per==0;EXIT=Ref(EVENT,1);Plot(10000,"",Cum(1)%2,1);Plot(0,"",1,styleNoLine);Counter=Cum(EVENT)%10;shape=IIf(Counter==1,shapeDigit0,IIf(Counter==2
,shapeDigit1,IIf(Counter==3 ,shapeDigit2,IIf(Counter==4
,shapeDigit3,IIf(Counter==5 ,shapeDigit4,IIf(Counter==6
,shapeDigit5,IIf(Counter==7 ,shapeDigit6,IIf(Counter==8
,shapeDigit7,IIf(Counter==9
,shapeDigit8,shapeDigit9)))))))));PlotShapes(shape*EVENT,colorIndigo);G=0;for(b=10;b<90;b++){for(s=10;s<90;s++){P=5;X5=100*((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P))-(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P)))/((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P)+(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P))));Buy=Cross(-b,x5);Sell=Cross(x5,s);E1=Equity(1,0);E11=ValueWhen(EVENT,E1);G=IIf(G>E11,G,E11);}}GraphXSpace=3;fpass=0;bpass=0;spass=0;for(b=10;b<90;b++){for(s=10;s<90;s++){P=5;X5=100*((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P))-(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P)))/((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P)+(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P))));Buy=Cross(-b,x5);Sell=Cross(x5,s);E1=Equity(1,0);E11=ValueWhen(EVENT,E1);fpass=IIf(e11==g,e1,0)+fpass;bpass=IIf(e11==g,b,0)+bpass;spass=IIf(e11==g,s,0)+spass;G=IIf(E11==G,0,G);}}STEP=IIf(EVENT,fpass-Ref(fpass,-1),0);T=Cum(STEP);FINAL=(fpass-T);Plot(IIf(FINAL>0,FINAL,0),WriteIf(event,"*","")+"
[b="+WriteVal(-bpass,1.0)+",
s="+WriteVal(spass,1.0)+"]",IIf(event,colorRed,colorBlack),8);<FONT
size=2>
The code makes one decision from 80*80=6400 combinations for each IP
and consequently is a bit slow.
Select your favorite ticker, set scaling to automatic, hit Apply and
wait.
See also in the att. gif how the asymmetric IPs trade sucessfully ERTS :
the BuyLevel was -40 almost all the test period, the SellLevel was from 25 to
42.
Dimitris Tsokakis
----- Original Message -----
From: <A
title=tsokakis@xxxxxxxxx href="">Dimitris Tsokakis
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Saturday, November 01, 2003 4:29 PM
Subject: Add a gear box...[was Steve CMO5 rules and the
IPs]
Some more statistical notes:#1. 27/101
N100 stocks did not change their b more than two times over the last 46
months.[24 of them were IP-profitable.]#2. Only two stocks
[MSFT, b=80 and AMGN, b=75] followed the same b all the test period.The
N100 market does not agree to the fixed b
solution.#3. Only 8 stocks used b=34 as a
temporary optimal.MCHP [406 BARS]SYMC [225]ERICY [150]MLNM
[106]SANM [75]CPWR [75]INTC [75] andVRSN [31]The
b=34 adds profits to the 63% of the database without being the optimal
solution.To see these notes use in AA the
// Inspection Points for CMO5// Database : Nasdaq100, from
Jan2000 till Oct2003// Settings : Buy, Sell at Open, delay=+1,
commission=0.25%, all stops disabledSYM=Name();START=DateNum()==1000601
;per=Param("per",75,25,200,25);EVENT=BarsSince(START)%per==0;G=0;SetForeign(SYM,True,True);for(b=10;b<90;b++){P=5;X5=100*((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P))-(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P)))/((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P)+(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P))));Buy=Cross(-b,x5);Sell=Cross(x5,b);E1=Equity(1,0);E11=ValueWhen(EVENT,E1);G=IIf(G>E11,G,E11);
}fpass=0;bpass=0;for(b=10;b<90;b++){P=5;X5=100*((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P))-(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P)))/((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P)+(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P))));Buy=Cross(-b,x5);Sell=Cross(x5,b);E1=Equity(1,0);E11=ValueWhen(EVENT,E1);fpass=IIf(e11==g,e1,0)+fpass;bpass=IIf(e11==g,b,0)+bpass;G=IIf(E11==G,0,G);}STEP=IIf(EVENT,fpass-Ref(fpass,-1),0);T=Cum(STEP);FINAL=(fpass-T);IP=IIf(FINAL>0,FINAL,0);Filter=1;
// Explore all stocks for the n=1 last
quotationsAddColumn(IP,"IP");AddColumn(Cum(bpass!=Ref(bpass,-1)),"Changes",1.0);AddColumn(bpass,"Last
used bpass",1.0);AddColumn(Cum(bpass==34),"34",1.0);
#4. The optimal for the whole market was
b=42, as you may see
fromP=5;X5=100*((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P))-(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P)))/((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P)+(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P))));d=Optimize("d",10,10,80,1);Sell=Cross(x5,d);Buy=Cross(-d,x5);Buy=ExRem(Buy,Sell);Sell=ExRem(Sell,Buy);
with final average equity 17,696, b=34 was the 10th solution
with 17,010, whereas the average IP equity was at 21,500, quite better than
the all-time optimal b=42. Dimitris Tsokakis
----- Original Message -----
From: <A
title=tsokakis@xxxxxxxxx href="">Dimitris Tsokakis
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Saturday, November 01, 2003 2:10 PM
Subject: Add a gear box...[was Steve CMO5 rules and the
IPs]
The worse part of a research is the statistics, it leaves no
room for dreams [or illusions].
The best part of a research is the statistics, it is the
time to forget the dreams and make some money out of it.
Inspection Points were placed every 75 bars to watch buy/sell
CMO5 levels over the whole N100 market from Jan2000 till now.
Explore this database for the n=1 last quotations with the
educative
// CMO5-34 and CMO5-IP comparison, by D. Tsokakis,
Nov2003// Database : Nasdaq100, from Jan2000 till Oct2003// Settings :
Buy, Sell at Open, delay=+1, commission=0.25%, all stops
disabledSYM=Name();START=DateNum()==1000601
;per=Param("per",75,25,200,25);EVENT=BarsSince(START)%per==0;G=0;SetForeign(SYM,True,True);for(b=10;b<90;b++){P=5;X5=100*((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P))-(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P)))/((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P)+(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P))));Buy=Cross(-b,x5);Sell=Cross(x5,b);E1=Equity(1,0);E11=ValueWhen(EVENT,E1);G=IIf(G>E11,G,E11);
}fpass=0;bpass=0;for(b=10;b<90;b++){P=5;X5=100*((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P))-(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P)))/((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P)+(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P))));Buy=Cross(-b,x5);Sell=Cross(x5,b);E1=Equity(1,0);E11=ValueWhen(EVENT,E1);fpass=IIf(e11==g,e1,0)+fpass;bpass=IIf(e11==g,b,0)+bpass;G=IIf(E11==G,0,G);}STEP=IIf(EVENT,fpass-Ref(fpass,-1),0);T=Cum(STEP);FINAL=(fpass-T);IP=IIf(FINAL>0,FINAL,0);//
STEVE KARNISH
CMO5-34P=5;X5=100*((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P))-(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P)))/((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P)+(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P))));d=34;Sell=Cross(x5,d);Buy=Cross(-d,x5);Buy=ExRem(Buy,Sell);Sell=ExRem(Sell,Buy);E34=Equity(1,0);Filter=1;AddColumn(IP,"IP");AddColumn(E34,"E34");AddColumn(IP>E34,"IMPROVE",1.0);
<FONT
size=2>
IMPROVE
WORSENE34>10000 63
38
25E34>10000 38
18
20IP>10000
68 AVERAGE E34
17072.39 AVERAGE IP
21480.38
CMO5-34 is not any magic system, it was 63% profitable. These
profits may be improved by the IPs
For the non-profitable examples, the IPs can not do miracles
[although they turned 9 stocks into profits...]
The average final Equity was improved and could
add 25% more money in your account.
I will take two specific examples:
1. APOL, the lucky choice for both systems.
2. MSFT : By the end of 2000, the CMO5-34 lost the half of the
initial money and the next 32 months did not do anything important, except
the sweet commissions for the [happy]
broker.
The IPs "understood" from the first inspection what was going
on there : The CMO5 level was 80 !!
The most interesting is that b=80 was the best choice for all
the next IPs, one by one !!!
Even in this case, MSFT curve does not like the CMO5 rhytms
and could not exceed the +60%.
To see how the IPs trade the CMO5, paste in Indicator builder
the
// Inspection Points for CMO5 buy/sell automatic
levelsSYM=Name();START=DateNum()==1000601
;per=Param("per",75,25,200,25);EVENT=BarsSince(START)%per==0;EXIT=Ref(EVENT,1);Plot(0,"",1,1);Counter=Cum(EVENT)%10;shape=IIf(Counter==1,shapeDigit0,IIf(Counter==2
,shapeDigit1,IIf(Counter==3 ,shapeDigit2,IIf(Counter==4
,shapeDigit3,IIf(Counter==5 ,shapeDigit4,IIf(Counter==6
,shapeDigit5,IIf(Counter==7 ,shapeDigit6,IIf(Counter==8
,shapeDigit7,IIf(Counter==9
,shapeDigit8,shapeDigit9)))))))));PlotShapes(shape*EVENT,colorIndigo);G=0;SetForeign(SYM,True,True);for(b=10;b<90;b++){P=5;X5=100*((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P))-(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P)))/((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P)+(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P))));Buy=Cross(-b,x5);Sell=Cross(x5,b);E1=Equity(1,0);E11=ValueWhen(EVENT,E1);G=IIf(G>E11,G,E11);
}GraphXSpace=3;fpass=0;bpass=0;for(b=10;b<90;b++){P=5;X5=100*((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P))-(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P)))/((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P)+(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P))));Buy=Cross(-b,x5);Sell=Cross(x5,b);E1=Equity(1,0);E11=ValueWhen(EVENT,E1);fpass=IIf(e11==g,e1,0)+fpass;bpass=IIf(e11==g,b,0)+bpass;G=IIf(E11==G,0,G);}
Plot(bpass,"bpass",2,8);Plot(-bpass,"bpass",2,8);
<FONT
size=2>STEP=IIf(EVENT,fpass-Ref(fpass,-1),0);T=Cum(STEP);FINAL=(fpass-T);
<FONT
size=2>P=5;X5=100*((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P))-(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P)))/((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P)+(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P))));Plot(x5,"CMO5",colorLightBlue,1);
In the att. APOL example, the IPs started with b=21 for one IP
period, then b=41 or 42 for 20 months and the last 16 months they suggest
b=58.
It is the time, perhaps, to invent the gear box and add it to
your trading vehicle
Dimitris Tsokakis
----- Original Message -----
From: <A
title=tsokakis@xxxxxxxxx href="">Dimitris Tsokakis
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Friday, October 31, 2003 12:03 PM
Subject: Steve CMO5 rules and the IPs
at <A
href="">http://groups.yahoo.com/group/amibroker/message/50917 <SPAN
class=468263723-30102003>Steve wrote, among the
others
"...As I have begged many times: give me something
better...I'll use it instead of this...."
Steve,
The point is how we can make it better, keeping your
basic favorite principle
[not to begin again the symmetric/non-symmetric
discussion]Let us see if automation may replace the trading
experience.Your x=CMO5 is applied to SYMC and the threshold level b is
allowed to vary in the [wide] range [10,80]My IP theory has not your trading
experience but "understood" thatIP0 to IP7 : b=10IP7 : b=29IP8 to
IP11 : b=34[Steve is right !!]IP11: b=36 The black thick line is
the IP equity, your E34 is red, the E10 is white and the recent champion E36 is
green.IP points were placed every 75 bars for the example.
// Inspection Points for Steve Karnish CMO5, SYMC
applicationSTART=DateNum()==1000601
;per=Param("per",75,25,200,25);EVENT=BarsSince(START)%per==0;EXIT=Ref(EVENT,1);Plot(10000,"",Cum(1)%2,1);Plot(0,"",1,styleNoLine);Counter=Cum(EVENT)%10;shape=IIf(Counter==1,shapeDigit0,IIf(Counter==2
,shapeDigit1,IIf(Counter==3 ,shapeDigit2,IIf(Counter==4
,shapeDigit3,IIf(Counter==5 ,shapeDigit4,IIf(Counter==6
,shapeDigit5,IIf(Counter==7 ,shapeDigit6,IIf(Counter==8
,shapeDigit7,IIf(Counter==9
,shapeDigit8,shapeDigit9)))))))));PlotShapes(shape*EVENT,colorIndigo);G=0;SetForeign("SYMC",True,True);for(b=10;b<80;b++){P=5;X5=100*((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P))-(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P)))/((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P)+(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P))));Buy=Cross(-b,x5);Sell=Cross(x5,b);E1=Equity(1,0);E11=ValueWhen(EVENT,E1);G=IIf(G>E11,G,E11);}GraphXSpace=3;
<FONT
size=2>fpass=0;bpass=0;for(b=10;b<80;b++){P=5;X5=100*((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P))-(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P)))/((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P)+(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P))));Buy=Cross(-b,x5);Sell=Cross(x5,b);E1=Equity(1,0);E11=ValueWhen(EVENT,E1);fpass=IIf(e11==g,e1,0)+fpass;bpass=IIf(e11==g,b,0)+bpass;G=IIf(E11==G,0,G);}STEP=IIf(EVENT,fpass-Ref(fpass,-1),0);T=Cum(STEP);FINAL=(fpass-T);Plot(FINAL,WriteIf(event,"*","")+"
[b="+WriteVal(bpass,1.0)+"]",IIf(event,colorRed,colorBlack),8);P=5;X5=100*((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P))-(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P)))/((Sum(IIf(C>Ref(C,-1),(C-Ref(C,-1)),0),P)+(Sum(IIf(C<Ref(C,-1),(Ref(C,-1)-C),0),P))));b=34;Buy=Cross(-b,x5);Sell=Cross(x5,b);E1=Equity(1,0);Plot(e1,"E34",colorRed,1);b=10;Buy=Cross(-b,x5);Sell=Cross(x5,b);E1=Equity(1,0);Plot(e1,"E10",colorWhite,1);b=36;Buy=Cross(-b,x5);Sell=Cross(x5,b);E1=Equity(1,0);Plot(e1,"E36",colorBrightGreen,1);
As time goes by, the old top solution b=10 is not bad at all
[imagine an exit by the end of 2001], but new champions appeared [it is obvious
to me] and promiss more attractive profits.If their value is temporary, do
not worry, some other b=XX will be in the head of this [endless]
marathon.How does it looks like ?Dimitris
Tsokakis
Yahoo! Groups Sponsor
ADVERTISEMENT
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Attachment:
pickitup1.gif
Attachment:
Description: "Description: GIF image"
|