Rank: Member
Groups: Registered, Registered Users Joined: 3/19/2012(UTC) Posts: 13
|
Hi All,
Been searching the web and forums for the system tester code to be able to include 'days delay' as an optimization as well as a 'points stop loss' on long and shorts.
I realize you can set these parameters in the system tester on a one off basis, but would like to be able to run optimizations in the formula instead of doing 5 individual tests on each stock.
So I guess for the days delay, that would require not only the opt for the number of days, but the code for on open or close.
And for the stop loss, it would be points or $ value plus selecting long and short.
On a final note, is there an all encompassing manual of metastock formula fields and data anywhere? I have the formula primer, the metastock manual, and mastering metastock...just wondering if there is something further.
Thanks very much for your help. Darren
|
|
|
|
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)
|
For the delayed entry, just use the Ref() function to lookback the OPTx bars to see if there was an entry signal. As for the stops; just enter OPTx into the appropriate section. wabbit [:D] wabbit attached the following image(s):
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 3/19/2012(UTC) Posts: 13
|
Hi Wabbit,
Thanks for the help, but when I tried the OPT in the stop section, it said it only works on pro, and being an EOD trader, I do not need realtime. Any other alternatives?
Darren
|
|
|
|
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)
|
You're going to have to code it then!
wabbit [:D]
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 3/19/2012(UTC) Posts: 13
|
Yep, that was what I assumed when I posted. Anybody out there that has already done this that could help out with the code?
Cheers, Darren
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/13/2005(UTC) Posts: 715 Location: Midwest, USA
Was thanked: 1 time(s) in 1 post(s)
|
You have to post your code if you want help. In a nutshell, you'd use something like this for the delay: Code:
EntrySignal:={whatever your signal is};
EntrySignal:=ref(EntrySignal,-OPTx);
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 3/19/2012(UTC) Posts: 13
|
Thanks for the help Johnathan.
Sorry, I am a bit of a novice when it comes to coding. Your solution makes sense though. I think where I am at a loss is that I have to keep stumbling on the terms that are acceptable in MS, like 'EntrySignal'. Is there a full glossary somewhere for usage terms?
Thanks again, Darren
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/13/2005(UTC) Posts: 715 Location: Midwest, USA
Was thanked: 1 time(s) in 1 post(s)
|
Warmuth327 wrote:Sorry, I am a bit of a novice when it comes to coding...I think where I am at a loss is that I have to keep stumbling on the terms that are acceptable in MS, like 'EntrySignal'. "That which is not forbidden is allowed". You can use or make up any word you like, unless it is RESERVED. These are keywords, like the name of a function (RSI, MOV, etc) or data array (O or OPEN, C or CLOSE, etc), that have already been defined within MSFL (MetaStock Formula Language). The same "issue" exists in any software (ie: Excel VBA) that allows you to write your own list of instructions, whether it is called a "formula", "subroutine" or "macro". If you don't want to do everything manually, sooner or later you get into writing such lists of instructions for the computer; it can be a very powerful tool/skill; just be sure to "think out" what you want it to do -- the computer will always do what you TELL it to do, which is not always what you WANT it to do. Warmuth327 wrote:Is there a
full glossary somewhere for usage terms? In the Help, click the INDEX button, type in "functions", and click on "list of". Also, read the Formula Primer.
|
|
|
|
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)
|
Warmuth327 wrote:Is there a full glossary somewhere for usage terms? F1 can be your best friend. 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.