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

Notification

Icon
Error

Options
Go to last post Go to first unread
alphateam  
#1 Posted : Thursday, June 2, 2005 9:53:15 PM(UTC)
alphateam

Rank: Advanced Member

Groups: Registered, Registered Users, Unverified Users
Joined: 3/25/2005(UTC)
Posts: 90
Location: London

Please can you help me. I developed a linear regression formula to detect an uptrend but when I came to run the exploration, I got an error message along the lines of "you can't enter a variable in a formula." I want the regression lines to continue with parallel support/resistance lines for variable bars, until a sharp price fall breaches the support line. Have any experienced formula writers managed to produce a workaround to this? Your kindly advice would be much appreciated. If this is impossible, can the SDK (software dev. kit) help?
wabbit  
#2 Posted : Friday, June 3, 2005 5:38:30 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)
depending on whether tha value changes over time, or remains constant, you might get away with using LastValue(thevalue()) wabbit :D P.S. Its easier to answer questions if you post your code too!
alphateam  
#3 Posted : Friday, June 3, 2005 7:06:14 PM(UTC)
alphateam

Rank: Advanced Member

Groups: Registered, Registered Users, Unverified Users
Joined: 3/25/2005(UTC)
Posts: 90
Location: London

The variable is "time" it is not a constant. I'm trying to get the exploration to calculate and extend the Lin Reg lines bar by bar - in a similar way that a moving average average continually unfolds bar by bar.
wabbit  
#4 Posted : Saturday, June 4, 2005 12:45:45 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)
... but a simple moving average is just Sum(C,prd)/prd and the EMA is pct=2/(1+prd); (1-pct)*PREV + pct*C Each unfolds bar by bar because each bar is calculated with the exception of the first prd bars. If you post your code, or just the snippets where you are having trouble, it will be much easier to help you. 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.