Rank: Newbie
Groups: Registered, Registered Users Joined: 7/6/2009(UTC) Posts: 3
|
I am trying to write a code to calculate the total up move on a series of back to back up bars (or total down move on a series of back to back down bars...(this is only part of the code because I have to take into consideration the case when ROC(C,1,$)=0 which I have done in part of a code thats not below...) A:= BarsSince(ROC(C,1,$)>0);
B:= BarsSince(ROC(C,1,$)<0);
If(ROC(C,1,$)<0,
|
|
|
|
|
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)
|
Hi Arash,
Welcome to the Forum.
As it seems you have most of the code sorted out for what I think you are trying to achieve, I wont distract you with other possibilities, except to suggest you download the free forum.dll from the files section as this contains a variable ROC indicator where the lookback periods does not have to be a static integer value.
Hope this helps.
wabbit [:D]
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 7/6/2009(UTC) Posts: 3
|
Thank you for your help. Thats exactly what I needed...I guess I was not the only person in need of a variable ROC, LOL
Thank you!
|
|
|
|
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.