Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 5/28/2007(UTC) Posts: 5
|
I read this very interesting blog:
http://www.priceactionlab.com/Blog/2015/08/the-day-momentum-died/
It shows a method for indicating the type of market: trending or mean reversion. I wonder if it is possible to make a custom indicator for Metastock of this idea. The calculation is:
If close of today > close of yesterday then buy at the close
If close of today < close of yesterday then short at the close
It looks somewhat like the On Balance Volume only with price and not volume. Is anyone able to code this? It's way beyond my coding skills...
Gr,
Tjarko
|
|
|
|
Rank: Advanced Member
Groups: Moderators, Registered, Registered Users, Subscribers Joined: 10/8/2010(UTC) Posts: 1,960
Thanks: 92 times Was thanked: 155 time(s) in 150 post(s)
|
Hello,
If I understand you correctly, that would just require using the RoC (Rate of Change) function. Depending on where you want to use the formula would depend on how you write it, but the basic formulas would be:
{Close Up}
RoC(C,1,$) > 0
{Close Dn}
RoC(C,1,$) < 0
That said if you were to use this as an expert advisor, you would see a buy or sell arrow over every price bar. If you only want a signal when you get an opposing direction signal the formulas would get a little more complex. However, these formulas should also work in the system tester under the typical system tester settings (limiting the # of simultaneous positions to 1).
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 5/28/2007(UTC) Posts: 5
|
Hi MS,
The ROC is the start indeed. The trouble for me was combining longs and shorts. The System Tester is the answer to that one. Should have thought about it myself...
Thanks,
Tjarko
|
|
|
|
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.