Rank: Newbie
Groups: Registered, Registered Users Joined: 6/6/2005(UTC) Posts: 3 Location: Canada
|
How would I program reoccurring cycles. I have tried with prev but I cannot get it to start over when it reaches a certain number.
What I am looking for is something in the lines of example
If X=5 then count to five. Once five is reached, start over basically the formula would count 12345 and then would start over 12345
if X=3 the formula would count 123 and then would start over 123 and so on.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 6/6/2005(UTC) Posts: 3 Location: Canada
|
Hello
I do appreciate the file you posted in fact I have already read it. I was able to do a binary 1 or 0 but still was unable to make a cycle count. I know in trade stations I could use (for to loop) I am still unable to figure out how to do it in metastock.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
Roy Larsen's document contained all the information you needed to know to create the indicator you wanted....
Reset:=5;
Add(1,PREV)-If(PREV=Reset,Reset,0);
Hope this helps.
wabbit :D
Give a man a fish... teach a man to fish etc.
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 6/6/2005(UTC) Posts: 3 Location: Canada
|
I guess I have to reopen that document and reread it once again.
Thank you
Now who feel silly not the wabbit
:)
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
Its not in the reading of the code that Roy creates, its in the understanding of it!
I find red wine helps, a lot!
wabbit :D
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 9/10/2004(UTC) Posts: 863 Location: Salt Lake City, UT
|
:) That's my theory too! If I can't sort it out usually a glass of red wine helps my thinking process... :lol: Glad I am not the only 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.