Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 9/15/2005(UTC) Posts: 24
|
Can someone point to me to method (ideally MS code) for creating zigzag-like lines that connect alternating highs and lows?
Thanks,
Systematic
|
|
|
|
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)
|
The first obstacle to get over with this indicator is the logic required to switch between using HIGH and LOW data. How are you going to deal with the outside bar which could "simultaneously" be a peak and a trough? What to do with inside bars? etc. Once you have these conundrums sorted, you can pass the resultant data array to the hindsight-based Zig() function. This is one basic take on the concept: !!WARNING:: the logic may not suit your own needs!! Code:
pct:=5;
hilo:=
If(H>Ref(H,-1),H,
If(L<Ref(L,-1),L,
If(Ref(H,-1)>Ref(H,-2),H,
If(Ref(L,-1)<Ref(L,-2),L,
PREV))));
Zig(hilo,pct,%);
wabbit [:D]
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 9/15/2005(UTC) Posts: 24
|
Thanks, Wabbit.
Just the sort of thing I was looking for to get pointed in the right direction.
Systematic
|
|
|
|
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.