Rank: Advanced Member
Groups: Registered, Registered Users Joined: 1/13/2009(UTC) Posts: 42
|
Hello
I am trying to create an adaptive trend scoring indicator for SPY as follows:
tp:=Int(5*ATR(3)/1.5);
counter:=if(h>ref(h,-1) and l>ref(l,-1),1,if(h<ref(h,-1) and l<ref(l,-1),-1,0);
score:=Sum(counter,LastValue(tp+PREV-PREV));
I have used the "adaptive" trick code (LastValue(tp+prev-prev) before and it works well but I can't get it to work in this case.
Any ideas?
Many thanks
ZigZag
|
|
|
|
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)
|
extfml("forum.Sum",data,periods);
wabbit [:D]
|
|
|
|
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.