Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/16/2005(UTC) Posts: 93 Location: Maryland,US
|
I am trying to figure out how to check when an indicator on a chart is no longer rising. At the moment I am looking at a rising MACD graph. How can I check to see if the line is starting to level off {not rise as quick as it has in the recent past}? I am not looking for the peak, which is identified after the line starts receding, but when it is starting to flatten out.
I tried comparing the ROC of the last 2 days and a few days before that, but it doesn’t look too good.
Any ideas?
vm
|
|
|
|
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)
|
Sorry to say but your idea is getting too subjective ...
[quote=no longer rising" means in a way that can be formulated you won't find a solution ...
is "No longer rising" when the roc slows down 33% , 50%, 75% ? ...
Take a general value and test it but please make sure you do not waste your time curve fitting ...
Patrick :mrgreen
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 6/13/2005(UTC) Posts: 52
|
Another thought would be to compare the slope of the Linear Regression line from the last period to the current period. Of course, the length of the LR line and rate of change is very subjective and may not give you the desired results; howerver, this would have a tendency to smooth out the data points.
|
|
|
|
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 Vaughn-
Maybe you could test for the significance of a slope using r-Squared. This would assume that non-significant ~ flat. Here is an example that I made, but you'll have to tailor it to your own style of trading. You mentioned shorter periods and I believe that there is a table of significant r-Squared values in the User's Manual, but I don't have access to mine at the moment.
{Significant Short-term Linear Regression Slope}
ST:=
If(LinRegSlope(Typical(),11)>0 AND RSquared(Typical(),11)>0.4,1,-1);
{Significant Long-term Linear Regression Slope}
LT:=
If(LinRegSlope(Typical(),22)>0 AND RSquared(Typical(),22)>0.18,1,-1);
{Indicator}
Signal:=
If(ST= 1 AND LT= 1, 1,
{else}If(ST= 1 AND LT=-1, 1,
{else}If(ST=-1 AND LT= 1, 1,
{else}If(ST=-1 AND LT=-1,-1, 0))));
Signal;0;
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/16/2005(UTC) Posts: 93 Location: Maryland,US
|
Thanks for the info. I knew this would be a strange one because it was difficult to explain what I was looking for. I tried different periods ROC and averages. I seen the Linear regression Slope in the book, but haven't check it yet. I have not used r-Squared yet, but will check on it as well. Patrick also mentioned percentages, I was thinking more with individual values and not percentages of changes. This will definitely give me something to check..
Thanks
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 5/18/2005(UTC) Posts: 10
|
forget all those complex formulas and the linear regression. thats not what you want. the information contained in the slope is exactly the same as the 1 period ROC of the line. Its that simple.
|
|
|
|
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:the information contained in the slope is exactly the same as the 1 period ROC of the line. Its that simple.
Well... try an exploration comparing slope and ROC over different time periods and see if you find a corresponding relationship. In most cases... yes. In every case... no. This is because there is a difference between the average rate of change and the instantaneous rate of change.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/16/2005(UTC) Posts: 93 Location: Maryland,US
|
I was messing around with the ROC for a while. What I have done lately is to simply compare todays value and yesterdays. The arrays are already smoothed moving averages, even though I get small spikes every now and then. Strangely enough looking at the values of moving averages flips about a day earlier than the ROC I was trying.
The whole idea was to exclude on my explorations, which it does. It may not be the best or most efficient - but I will keep kicking it around. Worse case, I can visually look at a graph and see if it looks like it is starting to slow even if I can't programatically describe it yet.
vm
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 8/22/2005(UTC) Posts: 30
|
I think what you are asking is that once the 2nd derivative of the slope is decreasing you want out of the trade. As long as the 2nd derivative of the slope is increasing, the trend is increasing at an increasting rate.
the 2nd derivative measures what rate the the slope is increasing. Basically it is the slope of the slope. Try taking a linreg slope of the linreg slope and see what you can find.
I'm going to give it a try myself.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/16/2005(UTC) Posts: 93 Location: Maryland,US
|
Let me take in what you just said :smt073
Actually I think I understand and will give it a shot.
|
|
|
|
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.