Rank: Newbie
Groups: Registered, Registered Users Joined: 11/22/2006(UTC) Posts: 1
|
Having a hard time figuring this out. I want to be able to scan for stocks where the price or an indicator has broken past a given support level, then returned to touch (with a small tolerance accepted) the same line and reversed. For instance, if price crosses past 50, goes to 60, then goes back to between 49-51 and reverses, I want a signal. Of course, I want to be able to do this with oscillators and other indicators as well.
How would I go about this? I've programmed a bunch of indicators and experts, but having a hard time with the whole time shifting thing. :)
edit: I could figure out how to do it within a given range like 7 days, I think: look at the highest price and seeing if it's X% above the support line, then look for a cross say 7 days ago and a touch and reverse over the past 3 periods, but what I can't figure out is how to look for this 'pattern' over say a period of 5-20 days.
|
|
|
|
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)
|
Medin
You could use a count and reset function. It could get a little bit tricky, but have a go yourself and if you get stuck, then post your best attempt at the code and ask for some more help, I am sure someone will come to your assistance.
The outline of the code is something along the lines of:
count:= Cum( Condition to count ); reset:= myResetCondition; counter:= count - ValueWhen(1,reset,count);
Use this idea to count the instances of each of the events you are looking for, the events can be 'ordered' to form the required pattern...
Hope this helps.
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.