how does the cum() function work?

dpleydell

Junior member
Messages
11
Likes
0
setbars:=3;
ff:= Stoch(7,1);
ss:=Stoch(16,1)
cbuy:=If(ff<=Ref(ff,-1) AND ss>=Ref(ss,-1),Cum(1),0);
bbuy:=If(cbuy>=setbars,H, 99999);

This is some sample code, but I'm not sure exactly what the Cum() function is doing here?
The Metastock primer says it just adds time but when does that happen?

ie is the Cum(1) in this example just doing this: cbuy = cbuy + 1 if that condition is true?

Thanks
David
 
dpleydell said:
setbars:=3;
ff:= Stoch(7,1);
ss:=Stoch(16,1)
cbuy:=If(ff<=Ref(ff,-1) AND ss>=Ref(ss,-1),Cum(1),0);
bbuy:=If(cbuy>=setbars,H, 99999);

This is some sample code, but I'm not sure exactly what the Cum() function is doing here?
The Metastock primer says it just adds time but when does that happen?

ie is the Cum(1) in this example just doing this: cbuy = cbuy + 1 if that condition is true?

Thanks
David

Join these guys. They will help you enormously.
http://groups.yahoo.com/group/equismetastock/

The above code is incomplete.
line ss:=Stoch(16,1) should read ss:=Stoch(16,1); ( semi colon missing)
 
commanderco said:
Join these guys. They will help you enormously.
http://groups.yahoo.com/group/equismetastock/

The above code is incomplete.
line ss:=Stoch(16,1) should read ss:=Stoch(16,1); ( semi colon missing)

Sorry David, I am only a simple man, I cannot imagine why you would want to
accumulate 1 event, cum(1)

Have you tried removing it and comparing the difference.

The metaStock group can clear this up for you quickly.
 
Not sure, It's more looking at momentum I think. It's from a trader named: Linda .... not sure of the second name. My friend gave it to me to code up for him.

David
 
Top