Discussions
»
Product and Service Development
»
MetaStock
»
Help with DeMark's Sequential Trading System
Rank: Newbie
Groups: Registered, Registered Users Joined: 4/16/2006(UTC) Posts: 4
|
I would like to do some experimentation with TD Sequential.
Can someone please explain in easy to follow instructions if/how I can get the information from the website below into Metastock.
(My version is 7.2)
Formula here................
http://eis.pl/kr/AFM/e-se-DeMarks_Sequential.html
Thanks - arco
|
|
|
|
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)
|
arco,
Have a read of the MS Users Manual that cam shipped with your legitimate copy of the software. Read up particularly on "Creating Your Own Indicators" and "Ranking and Screening Securities."
Then, work your way through the free Equis Formula Primer, available from the downloads section of this forum.
If, after doing all of that you are still having trouble, please ask for help in this forum.
wabbit :D
|
|
|
|
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)
|
.... and after doing all your "homework" you will be able to rewrite the functions in a much better method and more logical fashion, that will run heaps faster than the way it is presented on that page! This will speed up any explorations and system tests, and save your poor computer from having a meltdown...
wabbit :D
It's all in the Manual!
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 4/16/2006(UTC) Posts: 4
|
Thanks wabbit
I am familiar with pasting formula into the indicator builder and expert, but the amount (and where) to paste seems amazingly complex compared to others I have imported.
I also tried downloading Henrys formula here ........http://forum.equis.com/viewtopic.php?t=68&postdays=0&postorder=asc&start=20 ,
but the page / download seems to be missing???
I do have the original MS manual and will also read up on the subject again.
regards - arco
|
|
|
|
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)
|
that link is slightly corrupt... try this one:
http://forum.equis.com/viewtopic.php?t=68
As for the cut and paste jobs....
Each of the first four yellow blocks on that first link you posted has to be pasted into a new formula, named PRECISELY as given in the blue bold text i.e.
TD - SetUp-Buy
TD Count Down Buy A
TD Count Down Buy B
TD Count Down Buy C
The rest of the formulas in the yellow blocks are instructions for making Experts. Read up creating experts in the MS Users Manual and you should be able to find where all the little bits-and-pieces fall.
If you have any more questions, please feel free to ask.
wabbit :D
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 4/16/2006(UTC) Posts: 4
|
Thanks again wabbit - greatly appreciated.
Just one thing.............
If possible can you tell me what this means
"Buy Experts : Type / Change in Highlights:"
Regards - arco
|
|
|
|
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)
|
When you create an expert, you can:
create a trend ribbon, that appear at the bottom of a chart inner window, should you choose
create a commentary, that gives some details about the open chart
create highlight, that change the colours of the price bars according to some formulae
create symbols, that are placed on a chart plot according to some formulae
create alerts, that give a visual/audible sognal when specific criteria are met.
wabbit wrote:create highlight, that change the colours of the price bars according to some formulae
The code provided under the heading for " Buy Experts : Type / Change in Highlights" should be entered as price bar highlights in accordance with the code instructions.
wabbit wrote:create symbols, that are placed on a chart plot according to some formulae
The code provided under the heading for "Type / Change in Symbols" should be entered as new symbols in accordance with the code instructions.
The author has split the code into sections, one section for "Buy" indicators, highlights and symbols, the other for "Sell" indicators, highlights and symbols. They all need to go into one Expert Advisor though.
But again, I caution you about using this sloppy, slow, time wasting (and potentially error prone) code. Just because code is long and looks complicated doesn't mean it is good code. More often than not, the longer the code, the less the author knows about what is going on!
wabbit :D
|
|
|
|
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)
|
... and also note the code uses FORWARD referencing:
D8:=If(Ref(TD4,1)=1 AND TD5=1,1,0);
Pity real life doesn't work like this!
wabbit :D
|
|
|
|
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)
|
I have been doing a little playing around with the Demark Buy indicator to see what I could come up with..
As the code posted on the website was soooo illogical and almost impossible to fugure out, I gave up trying to rework the code and started again from scratch with the textual instructions provided on the web page.
If you start logically and think through the problems carefully, you can easily re-write the indicator using Roy Larsen's famous Signal Counter code and his theories relating to latches. I had some success and the code was a little long, BUT not nearly as long as the tripe posted before!
I cut this down to just a few lines by calling on a .dll I am in the process of writing (I found the first use for one of my new functions! :YAY:)
I challenge someone to come up with an interpretation of the Demark indicator (buy side only, as thats all I have looked at so far) for me to test my theory, external function and code against. If I can validate my code against yours/yours against mine in accordance with the textual instructions then I will give you the external function .dll file.
Its no big prize - its going to be released publically in the forum.dll at some point in time anyway! But I would like to see if this Demark thing can actually work.
wabbit :D
The instructions I was working with (edited from original):
A. Set Up Criteria
1. For a Buy signal. Nine consecutive daily price closes which are lower than the close four days earlier.
2. An Absolute Prerequisite
The day prior to the first day of a nine consecutive set up sequence must have a close higher than or equal to the close four days earlier,
B. Count Down
For a buy signal, following the successful completion of the count down we wait for thirteen closes which are lower than the close two days earlier (not consecutive, in fact extremely unlikely to be so).
C. Entry
On successful completion of set up and count down we now have a choice:
a) Enter on the close of the day that the count down is completed, i.e. the close of the thirteenth defined close.
Entry after reversal
b) On a close higher for a buy than a close four days earlier after the count down has been concluded, i.e. post reversal.
c) On a close higher for a buy than the high two days earlier after conclusion of the count down, i.e. a compromise between a) and b).
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 1/13/2005(UTC) Posts: 87 Location: perth australia
|
Hi Wabbit,
I have had a certain fascination with Demark. It is more complicated than that.
1.Completed Buy Setup : Sum(C < Ref(C,-4),9)=9 AND Ref(C,-9) >= Ref(C,-13)
This setup(which leads to the sequential countdown) is cancelled:
a. if the extreme high close and the extreme low close of the current Completed Buy Setup are contained within the extreme high close and the extreme low close of the previous buy setup,then the current setup is ignored.When comparingsetups for this cancellation examine the full setup ranges including price bars extending beyond the 9 count.
b. there is a price flip(ie a completed sell setup occurs b4 the countdown completes.)
c. The Completed Buy Setup recycles in which case the setup with the larger price range is used except if the larger setup is >161.8% than the smaller setup in which case the larger setup is ignored.
d. the low is > the highest high of the buy setup period OR the close of the day prior to that highest high whichever is greater
***Also the completed setup is only qualified if the low of the 7,8 OR 9 pricebar is below the low of the 6 pricebar***
Thus we have the setup phase qualified.
Next in order to begin the countdown phase the intersection phase is required whereby the high of the 8th pricebar of the completed buy setup OR the first subsequent bar thereafter of the completed buy setup must be >= to the low 3 or more bars earlier back to bar 1 of the setup.
If intersection occurs on bar 8 or 9 of the setup then the countdown commences on the 9 bar.
My metastock formula for intersection is H >= Ref(LLV(L,6),-3) AND H <= Ref(HHV(H,6),-3)
COUNTDOWN PHASE
completed buy countdown occcurs when c<=ref(l,-2) (13 bars not necesarily consecutive). The earliest point that the countdown can begin is the 9th bar of the buy setup.
the buy countdown is cancelled:
1. if b4 a series of 13 is achieved the share records a sell setup or another completed buy setup occurs
2. if b4 the countdown is completed it happens that a close is higher than the highest high of the buy setup.
*****postpone count 13 until it occurs below the 8th bar of the countdown phase*****
UTILISING COUNTDOWN AND RECYCLED BUY SETUP
Look for a countdown phase that is completed within a few pricebars of another completed buy setup.
When the 2 coincide with each other low risk entry opportunity is very powerful
STOP LOSS
project the range of the lowest bar in a countdown phase from the low of the same bar
Cheers
Norman
I can also explain TD combo if interested :)
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 4/16/2006(UTC) Posts: 4
|
Hi Wabbit
Many thanks - I look forward to your further positings on the subject.
Hi Norman
Yes, please also explain TD Combo.
Regards - arco
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 4/27/2005(UTC) Posts: 1
|
Arco my friend
I didnt undertant do you need ts or explanation. If it is ts I have it for another program not perfect but have 90% of what it should have.
send me email if you interested
salicsale@yahoo.com
Best regards Boldric
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 1/30/2007(UTC) Posts: 2
|
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 1/19/2005(UTC) Posts: 1,065 Location: Koh Pha-Ngan, Earth
Was thanked: 2 time(s) in 2 post(s)
|
Probably too many Fml() calls upsetting MetaStock.
For example:
Buy Bullish SetUp
{Color: Cyan}
Fml( "TD - SetUp-Buy" ) =1 OR
Ref( Fml( "TD - SetUp-Buy" ) ,1)=1 OR
Ref( Fml( "TD - SetUp-Buy" ) ,2)=1 OR
Ref( Fml( "TD - SetUp-Buy" ) ,3)=1 OR
Ref( Fml( "TD - SetUp-Buy" ) ,5)=1 OR
Ref( Fml( "TD - SetUp-Buy" ) ,6)=1 OR
Ref( Fml( "TD - SetUp-Buy" ) ,7)=1 OR
Ref( Fml( "TD - SetUp-Buy" ) ,8)=1
... could be re-coded this way:
x:=Fml("TD - SetUp-Buy");
Alert(x,4) OR Ref(Alert(x,4),5)
jose '-)
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 2/13/2007(UTC) Posts: 2
|
Hi Wabbit
I have only just joined today so please bear with me.
I too am very interested in Demark Indicators. I have tried (unsuccesfully at the moment) to program it in using the link: http://eis.pl/kr/AFM/e-se-DeMarks_Sequential.html however, while I get some form of result, it's nothing like I expected. I have read your and others posts on here but am finding things a little difficult to say the least! However, I do have Bloomberg and as you may know, they recently introduced Demark indicators as part of their technical package.
I can certainly help with letting you know where results are on the Bloomberg package to help if you still need it?
Do you know of somewhere I can download the (correct) formula for TD Seq and TD Combo at all? I use Metastock 9 if that helps. I just need a link that people have used successfully before with, hopefully, reasonably good instructions.
Please help!
Fletch
|
|
|
|
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)
|
Hi All,
Just before I went away on my holidays, I did some work for a client who never paid for the work, so never received it. The code is sitting here on my machine, unused, unloved [;)]
It is based on the De Mark system. After I have removed the client's proprietry ideas from the code I should be left with a full De Mark system. If someone is interested enough to check my understanding of the system and its implementation then I would be happy to make arrangements to do so. (Arrangements will be made by email or PM; depending on the accuracy of my code, some (heavily discounted) compensation MAY be sought to cover some of my time losses from before, we shall discuss this matter offline.)
If anyone is interested, please let me know.
wabbit [:D]
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 5/1/2006(UTC) Posts: 26
|
Jose wrote:
... could be re-coded this way:
--------------------------------
x:=Fml("TD - SetUp-Buy");
Alert(x,4) OR Ref(Alert(x,4),5)
-------------------------------- jose '-)
Jose,
I am trying to understand your code above. I am a novice with MS code, but some background in other programming languages.
For you second line, how did you come up with the "4" and "5" above? In your opinion would
REF(Alert(x,9),9)
worked the same? To me (my code) Alert is set for 9 bars when x goes true, and the REF looks back the 9 bars.
Not calling you out at all, just trying to learn. I want to code Bill Poulos Quantum Swing Trader into MS system tester as well as an Expert. I have the basics done for the explorer, and looking back like this is something I am needing to do.
Thanks
LH
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 1/19/2005(UTC) Posts: 1,065 Location: Koh Pha-Ngan, Earth
Was thanked: 2 time(s) in 2 post(s)
|
LH, the reason for breaking up the forward reference into two is that there is no Ref(Fml,4) in the original formula. i.e., there is no Ref(Fml( "TD - SetUp-Buy" ) ,4)=1
REF(Alert(x,9),9)
Asumming that "x" is a binary signal, this code moves the signal nine bars forward into the future, and then extends it for another nine bars.
Note that forward-referencing any data is useless for real-time signals.
I wouldn't spend much time on any strategy that requires hindsight or forward referencing, unless it's for pattern recognition and research purposes (i.e., not trading).
jose '-)
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 5/1/2006(UTC) Posts: 26
|
Quote: LH, the reason for breaking up the forward reference into two is that there is no Ref(Fml,4) in the original formula. i.e., there is no Ref(Fml( "TD - SetUp-Buy" ) ,4)=1
I missed that it was a forward reference, duh! I do most of my programming in Excel(VBA) and control basic for industrial control systems.
Quote:REF(Alert(x,9),9) Asumming that "x" is a binary signal, this code moves the signal nine bars forward into the future, and then extends it for another nine bars.
Yes, "x" would be a binary value. This should have been REF(Alert(x,9),-9) to look back 9 bars, and then extend it 9 bars forward. Idea being (as you discussed above) would be to remove the multiple FML(....) the original poster had, that would would look back 9 bars for X=true and then it would keep it active for 9 bars (to current bar)
LH
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 2/13/2007(UTC) Posts: 2
|
Hi Wabbit. Please don't forget that when (and if) you get things working please let me know and I will compare your results to that of Bloomberg's Demark Indicator. Just let me know mate.
Fletch
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Discussions
»
Product and Service Development
»
MetaStock
»
Help with DeMark's Sequential Trading System
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.