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

Notification

Icon
Error

Options
Go to last post Go to first unread
cancerman  
#1 Posted : Tuesday, August 30, 2005 8:50:31 PM(UTC)
cancerman

Rank: Newbie

Groups: Registered, Registered Users
Joined: 8/26/2005(UTC)
Posts: 7

Hey all, so i've run into a little snag... what i'd been trying to code is a positive signal to be generated whenever the 9 day EMA of the macd histogram crosses over the macd histogram and when the rsi line dips below the 70 mark all within 10 periods. this is what i've got so far: Alert( (Cross( Mov(Fml("*MACD Histogram"),9,E), Fml("*MACD Histogram")) and Cross( 70,RSI(C,14))) ,10) {the formula for MACD Histogram is on the meta website} the reason i'm using a cross instead of a > is that i want the signal to dissipate 10 days after the initial cross (which will not necessarily happen when using >). If the two events occur within 10 days of each other, then I'll consider it a significant event. i've tried the sum function but it doesn't help. I think i've got to separate the two events in the code (ie: not use the AND function) but i don't know how else to do it... in other words i'm basically looking for this signal within the last 10 trading days only. as i do only weekly scans, this prevents me from missing signals. i'd appreciate any help/ideas that can be passed along. cancerman
Patrick  
#2 Posted : Tuesday, August 30, 2005 8:57:22 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)
Try this : Alert( Cross( Mov(Fml("*MACD Histogram"),9,E), Fml("*MACD Histogram")) ,10) and Alert( Cross( 70,RSI(C,14))) ,10) Patrick :mrgreen:
cancerman  
#3 Posted : Tuesday, August 30, 2005 9:59:33 PM(UTC)
cancerman

Rank: Newbie

Groups: Registered, Registered Users
Joined: 8/26/2005(UTC)
Posts: 7

Perfect!!! Thanks P
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.