logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
dieselpr  
#1 Posted : Monday, June 13, 2005 7:01:37 PM(UTC)
dieselpr

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/27/2005(UTC)
Posts: 130

Patrick, How would you start off a formula if you wanted to get a cross from 3 different indicators with in 4 periods? Say you wanted to get a cross from the MACD, RSI and the final confirmation from a 5 and 20 day moving avg with in 4 periods?
Patrick  
#2 Posted : Monday, June 13, 2005 7:31:35 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
CD1:=Cross1; CD2:=Cross2; CD3:=Cross3; Alert(CD1,4) and Alert(CD2,4) and Alert(CD3,4) Patrick :mrgreen:
wabbit  
#3 Posted : Monday, June 13, 2005 10:41:15 PM(UTC)
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)
Just a friendly word of caution there Patrick and dieselpr, The code checks for the cross condition in the last four days, but the condition might not still be true on the final bar. E.g The RSI could have crossed up on day one and dipped back below on any of days two - four and still be found by the code kindly provided by Patrick. This is one of the drawbacks of using the alert method like Patrick has demonstrated. I prefer to use the Alert() method in a slightly different way, and many would have seen me use this code and wondered why.... CD1:=RSI>threahold and Alert(RSI<threshold,4); CD2:=C>MA and Alert(C<MA,4); CD1 and CD2 etc This will return stocks that are still TRUE on the last day. You have to be very careful to understand EXACTLY what you are asking MS to do. Are you happy with just an event occurring some time during the period, or must the event happen and remain true? Hope this helps. wabbit :D
Patrick  
#4 Posted : Tuesday, June 14, 2005 2:42:57 AM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
Damn you are picky :evil: Alright I will admit that Wabbit is a 1000% right ... :oops: Patrick :mrgreen:
wabbit  
#5 Posted : Tuesday, June 14, 2005 8:10:42 AM(UTC)
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)
Not picky.... reflective. I got burned on this one some time ago. wabbit :D
Users browsing this topic
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.