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

Notification

Icon
Error

Options
Go to last post Go to first unread
StorkBite  
#1 Posted : Thursday, August 25, 2005 1:56:45 AM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
Hey all- I'm trying to put together a simple ROC/ EMA crossover indicator, but the signal is coming one period late. I can adjust it with the ref() function, but don't understand why that would be needed. This is what I have: [code:1:13ec7b50f7]{Simple ROC Crossover} a:=Input("Rate of Change Period: ",1,100,30); b:=Input("Moving Average Period: ",1,100,12); PROCH:=ROC(C,a,%); PROCA:=Mov(PROCH,b,E); PROCH; PROCA; le:=Cross(PROCH, PROCA); le;[/code:1:13ec7b50f7] Any help is appreciated.
Patrick  
#2 Posted : Thursday, August 25, 2005 2:09:24 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)
What about something like that: {Simple ROC Crossover} a:=Input("Rate of Change Period: ",1,100,30); b:=Input("Moving Average Period: ",1,100,12); PROCH:=ROC(C,a,%); PROCA:=Mov(PROCH,b,E); PROCH; PROCA; le:=Cross(PROCH, (PROCA*.95)); le; Patrick :mrgreen:
StorkBite  
#3 Posted : Thursday, August 25, 2005 3:54:33 AM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
Well... that didn't work. However, I know what's happening now. Whenever the crossover occurs, it doesn't signal until the start of the next full period. e.g., on a 1-minute chart, if the crossover occurs at 08:36:15, the signal appears at 08:37:00. On a daily chart, if the crossver occurs somewhere in the middle of Monday, it will signal on Tuesday's opening. That doesn't sound right... UserPostedImage
mstt  
#4 Posted : Thursday, August 25, 2005 5:02:36 AM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
G It looks fine to me - exactly what I'd expect. A Cross() requires two bars to function (excuse the pun) - a "before" bar and an "after" bar. The actual cross will dispaly somewhere between those two bars. There cannot be a cross until the "after" bar is at least partially formed. How much of that bar is needed before the cross is signalled will depend on the intrabar price or indicator movement that the Cross() is being used with. An EOD Cross() related to the CLOSE could appear and disappear several times during the day (corresponding to price oscillations) if intraday data was being used to feed the current EOD bar. Roy
StorkBite  
#5 Posted : Thursday, August 25, 2005 12:48:31 PM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
Quote:
An EOD Cross() related to the CLOSE could appear and disappear several times during the day.
Thanks Roy. :D It makes sense once explained. I got confused after re-reading the cross() description in the manual.
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.