Metamaster

#1
Dear members,

I joined this beautiful forum just 4 months ago and learned a lot about system based trading. Certainly, a system based trading is more scientific and accurate than the trading based upon intutions.

I am starting this new thread for the newbies like me to share their experiences about the new indicators and systems specially for "METASTOCK". Metastock is the best software for this purpose because of its simplicity and excel like formulas.

I am sharing my first indicator. Indicator is simple and may not be as perfect as developed by experts. But it seems good for nifty and future stocks. Still there is great scope for the improvement of the same. I am posting the same to get some valuable tips to improve this from the learned members of this group.

{BASU'S POINT THEORY: I use this formula for comparisons etc. in place of percentages.}

bpt:=If(O>3900,O*.003,
If(O>3100,O*.0035,
If(O>2300,O*.004,
If(O>1800,O*.0045,
If(O>1300,O*.005,
If(O>1000,O*.0055,
If(O>700,O*.006,
If(O>500,O*.0065,
If(O>300,O*.007,
If(O>200,O*.008,
If(O>100,O*.009,
If(O>65,O*.01,
If(O>30,O*.011,O*.0125)))))))))))));

a:=If(C>O+5*bpt,H+C-O-L,
If(C>O+2*bpt,H-L,
If(C>O,C-L,
If(C>O-2*bpt,L-O,
If(C>O-5*bpt,L-H,L+C-O-H)))));

a1:=Mov(Ref(a,-2),3,S);
a2:=Mov(a,2,S);

aa:=(a2+a1);

bb:=If(aa<-10*bpt,a2-a1,
If(aa<-5*bpt,a1-a2,
If(aa<5*bpt,Ref(a,-1),
If(aa<10*bpt,a1-a2,a2-a1))));

a3:=If(a<-13*bpt,H+a*.7,
If(a<-8*bpt,H+a*.8,
If(a<-5*bpt,C-a*.6,
If(a<-2*bpt,O-a*.8,
If(a<0,a+(L+H)/2,
If(a<2*bpt,a+(L+H)/2,
If(a<5*bpt,C-a*.8,
If(a<8*bpt,O-a*.6,
If(a<13*bpt,L+a*.8,L+a*.7)))))))));

a4:=If(aa<-13*bpt,a3-bb*.3,
If(aa<-8*bpt,a3-bb*.5,
If(aa<-5*bpt,a3-bb*.8,
If(aa<-2*bpt,a3-bb*.5,
If(aa<2*bpt,a3-bb*.3,
If(aa<5*bpt,a3-bb*.5,
If(aa<8*bpt,a3-bb*.8,
If(aa<13*bpt,a3-bb*.5,a3-bb*.3))))))));


a5:=If(bb<-13*bpt,a4-aa*.2,
If(bb<-8*bpt,a4+aa*.2,
If(bb<-5*bpt,a4-aa*.3,
If(bb<-2*bpt,a4+aa*.3,
If(bb<2*bpt,a4-aa*.5,
If(bb<5*bpt,a4+aa*.3,
If(bb<8*bpt,a4-aa*.3,
If(bb<13*bpt,a4+aa*.2,a4-aa*.2))))))));

a5{a4 is also good indicator. if a5<l = buy signal at next bar's suitable prices. if a5>h = sell signal at next bar'suitable prices.}

BASUDEO
 

bjj9126

Active Member
#2
Dear members,

I joined this beautiful forum just 4 months ago and learned a lot about system based trading. Certainly, a system based trading is more scientific and accurate than the trading based upon intutions.

I am starting this new thread for the newbies like me to share their experiences about the new indicators and systems specially for "METASTOCK". Metastock is the best software for this purpose because of its simplicity and excel like formulas.

I am sharing my first indicator. Indicator is simple and may not be as perfect as developed by experts. But it seems good for nifty and future stocks. Still there is great scope for the improvement of the same. I am posting the same to get some valuable tips to improve this from the learned members of this group.

{BASU'S POINT THEORY: I use this formula for comparisons etc. in place of percentages.}

bpt:=If(O>3900,O*.003,
If(O>3100,O*.0035,
If(O>2300,O*.004,
If(O>1800,O*.0045,
If(O>1300,O*.005,
If(O>1000,O*.0055,
If(O>700,O*.006,
If(O>500,O*.0065,
If(O>300,O*.007,
If(O>200,O*.008,
If(O>100,O*.009,
If(O>65,O*.01,
If(O>30,O*.011,O*.0125)))))))))))));

a:=If(C>O+5*bpt,H+C-O-L,
If(C>O+2*bpt,H-L,
If(C>O,C-L,
If(C>O-2*bpt,L-O,
If(C>O-5*bpt,L-H,L+C-O-H)))));

a1:=Mov(Ref(a,-2),3,S);
a2:=Mov(a,2,S);

aa:=(a2+a1);

bb:=If(aa<-10*bpt,a2-a1,
If(aa<-5*bpt,a1-a2,
If(aa<5*bpt,Ref(a,-1),
If(aa<10*bpt,a1-a2,a2-a1))));

a3:=If(a<-13*bpt,H+a*.7,
If(a<-8*bpt,H+a*.8,
If(a<-5*bpt,C-a*.6,
If(a<-2*bpt,O-a*.8,
If(a<0,a+(L+H)/2,
If(a<2*bpt,a+(L+H)/2,
If(a<5*bpt,C-a*.8,
If(a<8*bpt,O-a*.6,
If(a<13*bpt,L+a*.8,L+a*.7)))))))));

a4:=If(aa<-13*bpt,a3-bb*.3,
If(aa<-8*bpt,a3-bb*.5,
If(aa<-5*bpt,a3-bb*.8,
If(aa<-2*bpt,a3-bb*.5,
If(aa<2*bpt,a3-bb*.3,
If(aa<5*bpt,a3-bb*.5,
If(aa<8*bpt,a3-bb*.8,
If(aa<13*bpt,a3-bb*.5,a3-bb*.3))))))));


a5:=If(bb<-13*bpt,a4-aa*.2,
If(bb<-8*bpt,a4+aa*.2,
If(bb<-5*bpt,a4-aa*.3,
If(bb<-2*bpt,a4+aa*.3,
If(bb<2*bpt,a4-aa*.5,
If(bb<5*bpt,a4+aa*.3,
If(bb<8*bpt,a4-aa*.3,
If(bb<13*bpt,a4+aa*.2,a4-aa*.2))))))));

a5{a4 is also good indicator. if a5<l = buy signal at next bar's suitable prices. if a5>h = sell signal at next bar'suitable prices.}

BASUDEO

thnx for it,
but how I can use it with Metastock,

bjj9126
(Prakash)
 
#4
Dear Raghu,

It is well working on my system, with metastock 10 EOD. Make bpt as a separate indicator and use it as:
pt:=fml("bpt");

I am using it in this way. May it solve your problem.

Basudeo
 
#5
Dear members,

I posted my first indicator in the forum. Here is the somewhat improved version.

{BASU'S POINT THEORY: I use this formula for comparisons etc. in place of percentages.}

bpt:=If(O>3900,O*.003,
If(O>3100,O*.0035,
If(O>2300,O*.004,
If(O>1800,O*.0045,
If(O>1300,O*.005,
If(O>1000,O*.0055,
If(O>700,O*.006,
If(O>500,O*.0065,
If(O>300,O*.007,
If(O>200,O*.008,
If(O>100,O*.009,
If(O>65,O*.01,
If(O>30,O*.011,O*.0125)))))))))))));

{Build new indicator with above name}

============================

pt:= FmlVar("BASU'S POINT THEORY","bPT");
hoc:=If(C>O,C,O);
loc:=If(C<O,C,O);
a:=If(C>O+5*pt,H+C-O-L,
If(C>O+2*pt,H-L,
If(C>O,C-L,
If(C>O-2*pt,C-H,
If(C>O-5*pt,L-H,L+C-O-H)))));

a1:=If(a>13*pt,L+a*.6,
If(a>8*pt,L+a*.55,
If(a>5*pt,loC+a*.4,
If(a>0,loC+a*.6,
If(a>-5*pt,hoC+a*.6,
If(a>-8*pt,hoC+a*.4,
If(a>-13*pt,H+a*.55,H+a*.6)))))));

a2:=Mov(a1,5,e)+a;

a3:=If(a2<L-11*pt,a2-a*.55,
If(a2<L-7*pt,a2-a*.35,
If(a2<L,a2-a*.25,
If(a2>H+11*pt,a2-a*.55,
If(a2>H+7*pt,a2-a*.35,
If(a2>H,a2-a*.25,a2))))));

a3

{SYMBOL: "BUY"
Fml( "a3")<L-1.5*pt

"SELL"
Fml( "a3")>h+1.5*pt

"MILDBUY"
Fml( "a3")<L+.5*pt

"MILDSELL"
Fml( "a3")>h-.5*pt}
===================

As there are lot of constants used in the formulas, so there is always scope for improvement. Please share your comments, suggestions and any improvement to above indicator.

BASUDEO
 
#6
Dear members,

I posted my first indicator in the forum. Here is more improved version.

{BASU'S POINT THEORY: I use this formula for comparisons etc. in place of percentages.}

bpt:=If(O>3900,O*.003,
If(O>3100,O*.0035,
If(O>2300,O*.004,
If(O>1800,O*.0045,
If(O>1300,O*.005,
If(O>1000,O*.0055,
If(O>700,O*.006,
If(O>500,O*.0065,
If(O>300,O*.007,
If(O>200,O*.008,
If(O>100,O*.009,
If(O>65,O*.01,
If(O>30,O*.011,O*.0125)))))))))))));

{Build new indicator with above name}

============================

pt:= FmlVar("BASU'S POINT THEORY","bPT");
pc:=If(Ref(C,-1)>O,Ref(C,-1),O);
ph:=Ref(H,-1);
pl:=Ref(L,-1);
al:=If(L>ph-pt,2*L-ph,(ph+L)/2);
ah:=If(H<pl+pt,2*H-pl,(pl+H)/2);
hoc:=If(C>pc,C,pc);
loc:=If(C<pc,C,pc);

a:=If(C>pc+8*pt,H+C-pc-al,
If(C>pc+2.5*pt,H-al,
If(C>pc,hoC-L,
If(C>pc-2.5*pt,loC-H,
If(C>pc-8*pt,L-ah,L+C-pc-ah)))));

a1:=If(a>11*pt,aL+a*.76,
If(a>7*pt,aL+a*1.23,
If(a>4*pt,Hoc+a*.2,
If(a>0,ph-a*1.2,
If(a>-4*pt,pl-a*1.2,
If(a>-7*pt,Loc+a*.2,
If(a>-11*pt,aH+a*1.23,aH+a*.76)))))));

a1
{SYMBOL: "BUY"
Fml( "a1")<L-1.5*pt

"SELL"
Fml( "a1")>h+1.5*pt

"MILDBUY"
Fml( "a1")<L+.5*pt

"MILDSELL"
Fml( "a1")>h-.5*pt}
===================

As there are lot of constants used in the formulas, so there is always scope for improvement. I plotted the same on nifty and see yourself the signals. Naturally signals are for the next bar and most of the time the next bar is favourable. Please share your comments, suggestions and any improvement to above indicator.

BASUDEO
 
#7
Dear members,

I started this thread to share indicators, experts and metastock formulas. Here is one more indicator to mark short term trends.

"trends"


pt:= FmlVar("BASU'S POINT THEORY","bPT");
ah:=ROC(H,5,$)-ROC(H,2,$)+Mov(Ref(H,-1),3,E);
al:=ROC(L,5,$)-ROC(L,2,$)+Mov(Ref(L,-1),3,E);
ac:=ROC(C,5,%)-ROC(C,3,%)+Mov(Ref(C,-1),2,E);
ao:=ROC(O,5,%)-ROC(O,3,%)+Mov(Ref(O,-1),2,E);

a:=If(aC>ao+7*pt,aH+aC-aO-aL,
If(aC>ao+4*pt,ah-al,
If(aC>ao+1.5*pt,ac-al,
If(aC>ao-1.5*pt,aC-aO,
If(aC>ao-4*pt,ac-ah,
If(aC>ao-7*pt,al-ah,aL+ac-ao-aH))))));

a1:=If(a>6*pt,ao+a*.34,
If(a>4*pt,al+a*.55,
If(a>2*pt,ac+a*.89,
If(a>O,ah+a*1.44,
If(a>-2*pt,al+a*1.44,
If(a>-4*pt,ao+a*.89,
If(a>-6*pt,ah+a*.55,ao+a*.34)))))));

Mov(ROC(-a,1,$)+a1,2,E)



{SYMBOL: "BUY"
Fml( "trends")<L-1.5*pt

"SELL"
Fml( "trends")>h+1.5*pt

"MILDBUY"
Fml( "trends")<L+.5*pt

"MILDSELL"
Fml( "trends")>h-.5*pt}

Please share your views about this post.

BASUDEO
 
#8
Dear members,

I am improving the following formula day by day and posting the same in this thread to get some suggestions from the members of this forum. As you see the indicator is giving good buy sell signals. I want to further improve this so that zigzag symbols disappear from the same. This indicator is giving the signals bar by bar.

I request the members to suggest me the method to improve this to reduce some unwanted signals. If some body gives the code for system testing based upon this formula, is most welcome.



{name=BASU'S BUY SELL}

pt:= pt:= FmlVar("BASU'S POINT THEORY","bPT");{already there in my previous posts}
ah:=ROC(H,5,$)-ROC(H,2,$)+Mov(Ref(H,-1),3,S);
al:=ROC(L,5,$)-ROC(L,2,$)+Mov(Ref(L,-1),3,S);
ac:=ROC(C,5,$)-ROC(C,3,$)+Mov(Ref(C,-1),3,E);
ao:=ROC(O,5,$)-ROC(O,3,$)+Mov(Ref(O,-1),3,E);

a:=If(C>O+7*pt,aH+aC-aO-aL,
If(C>O+4*pt,ah-al,
If(C>O+2*pt,ac-al,
If(C>O-2*pt,aC-aO,
If(C>O-4*pt,ac-ah,
If(C>O-7*pt,al-ah,aL+ac-ao-aH))))));

a1:=If(a>15*pt,aL+(ah-al)*.6,
If(a>10*pt,al+(ah-ao)*.9,
If(a>6*pt,al-(ac-al)*.2,
If(a>3*pt,ao-(ac-ao)*.3,
If(a>pt,ao-(ah-ao)*.5,
If(a>O,ao-(ah-al)*.8,
If(a>-pt,ao-(al-ah)*.8,
If(a>-3*pt,ao-(al-ao)*.5,
If(a>-6*pt,ao-(ac-ao)*.3,
If(a>-10*pt,ah-(ac-ah)*.2,
If(a>-15*pt,ah+(al-ao)*.9,aH+(al-ah)*.6)))))))))));


Mov(ROC((ao-ac+ah-al)+((ao+ac+ah+al)/4),1,$)+a1,3,E)

{SYMBOL: "BUY"
Fml( "BASU'S BUY SELL")<L-1.5*pt

"SELL"
Fml( "BASU'S BUY SELL")>h+1.5*pt

"MILDBUY"
Fml( "BASU'S BUY SELL")<L+.5*pt

"MILDSELL"
Fml( "BASU'S BUY SELL")>h-.5*pt}



BASUDEO
 
#10
dear members,

Here is the another version of my previous formula. The formula is for trend catching. Please post your evaluation of the same.

{name:BASU,S HIGHLIGHTS}

pt:= FmlVar("BASU'S POINT THEORY","bPT");{already there in my previous posts}
ah:=ROC(H,4,$)-ROC(H,1,$)+Mov(H,6,E);
al:=ROC(L,4,$)-ROC(L,1,$)+Mov(L,6,E);
ac:=ROC(C,4,$)-ROC(C,1,$)+Mov(C,6,E);
ao:=ROC(O,4,$)-ROC(O,1,$)+Mov(O,6,E);

a:=If(ac>aO+7*pt,(aH+aC-ao-aL)*.8,
If(ac>aO+4*pt,(ac-al)*1.5,
If(ac>aO+2*pt,(ah-ao)*.5,
If(ac>aO-2*pt,(ao-ah)*.6,
If(ac>aO-4*pt,(al-ao)*.5,
If(ac>aO-7*pt,(ac-ah)*1.5,(ac-ao+al-ah)*.8))))));

a1:=If(a>8*pt,ah-a*.8,
If(a>5*pt,ah-a,
If(a>3*pt,aH-a,
If(a>2*pt,(aC+ao)/2-a*2,
If(a>pt,aC-a*2,
If(a>O,aO-a*3,
If(a>-pt,aO-a*3,
If(a>-2*pt,aC-a*2,
If(a>-3.5*pt,(aC+ao)/2-a*2,
If(a>-5*pt,aL-a,
If(a>-8*pt,al-a,al-a*.8)))))))))));

Mov((O-a+a1)/2,2,E)

{(HIGHLIGHT: BUY: BLUE)
fml("BASU,S HIGHLIGHTS")<c

(HIGHLIGHT: SELL: RED)
fml("BASU,S HIGHLIGHTS")>c}

BASUDEO