Rank: Newbie
Groups: Registered, Registered Users Joined: 6/25/2013(UTC) Posts: 2
|
Could someone please explain the use of <=0.001 in this
code
Cum((H-L)/Ref(C,-1)<=0.001)
(H-L) / Ref(C,-1) gives the price range / closing price of
previous day The function Cum(Array) calculates the total of all records
in the array I do not get the <=0.001
Normal
0
false
false
false
EN-AU
X-NONE
X-NONE
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/29/2004(UTC) Posts: 1,394 Location: Glastonbury, CT
Was thanked: 2 time(s) in 2 post(s)
|
Code:
Cum((H-L)/Ref(C,-1)<=0.001)
The cum function counts the number of times the range divided by the previous close is less than or equal to .001 as an example a .10 range divided by the previous close of 100 would equal .001 and the cum function would count the number of times that would happen
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 6/25/2013(UTC) Posts: 2
|
Thanks Henry. The code now makes sense.
I did not find this feature of cum when I googled "metastock cum function" Is there a good web site for the definition of metastck functions.
From what you are saying: On a daily chart Cum(C>30) examines every day for which there is data and returns the number of days on whch the closing price was over 30 $/share
I supose that is because Boolean False is recorded as zero and True is recorded as one.
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
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.