Rank: Newbie
Groups: Registered, Registered Users Joined: 6/15/2005(UTC) Posts: 4 Location: milan
|
Hi :D,
I've just finished reading 'MS formula primer' and I'm trying to do my first system.
Enter Long: Fml("my formula")=1
Close Long: Fml( "my formula")=0
where "my formula" is: (H-L)/L>=0.01 AND H=C
I would like to enter long the Open the day after the condition is true and exit on the Close of the same day.
so in System Tester-->options-->testing--trade price I put:
Entry Price: Open
Delay: 1
Exit Price: Close
Delay: 0
but it does not work. from the reports I see the exit is the day after the entry. I would like to exit the same day. Can someone help me understand where is my mistake?
thank you
ps: I apologize for my english
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 6/15/2005(UTC) Posts: 4 Location: milan
|
Hi,
After some research on the web I have come to the conclusion that it is not possible.
Some time ago Roy Larsen answered to a similar question:"The Metastock EOD System Tester can't handle an entry and exit on the same bar".
However I think this code is useful to know if a strategy in which you enter the day after the signal on the Open and Exit on the Close the very same day is good:
Cum(If((H-L)/L>=0.01 AND H=C,Ref(C-O,1),0))
because this code plots the equity line of the strategy (I hope... :wink:)
|
|
|
|
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)
|
Hi filo, I think there was a way but I forgot ...
Don't despair, I will post the solution as soon as I find it ...
Patrick :mrgreen:
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 6/15/2005(UTC) Posts: 4 Location: milan
|
Thank you Patrick :D
what do you think of the formula I wrote? I think that as soon as it is correct it is useful, isn't it?
your video lessons are great! Thank you
|
|
|
|
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)
|
Why not Just :
Cum(If(Ref(Condition,-1),C-O,0))
So if I understood your formula :
Condition:=(H-L)/L>=0.01 AND H=C;
Cum(If(Ref(Condition,-1),C-O,0))
That way you get rid of the nasty reference in the future : Ref(C-O,1) :wink:
I'm glad you like the videos, I appreciate the compliments :D
Patrick :mrgreen:
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 6/15/2005(UTC) Posts: 4 Location: milan
|
of course you're right Patrick :)
looks like I did not pay enough attention to your lessons... :wink:
you were very clear about reference in the future.
Thank you
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 6/22/2005(UTC) Posts: 29 Location: Singapore
|
Hi Patrick,
Did you manage to locate the code to EXIT on the same day as the ENTRY for MS system tester?
I visited another website:
[http://www.debry.com/msst_options.htm]
Maybe need to have the plugin or similar program to do it.
Please advise.
Regards,
Edwin[/url][/code]
|
|
|
|
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)
|
No don't spend money on a plug in :oops:
Don't give up on me yet :D
I will try to get the answer today, promised :D
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 6/22/2005(UTC) Posts: 29 Location: Singapore
|
Patrick wrote:No don't spend money on a plug in :oops:
Don't give up on me yet :D
I will try to get the answer today, promised :D
Hi Patrick,
Any luck on the solution for the exit on same day close?
Thanks again,
Edwin
|
|
|
|
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)
|
Alright I sent an email to the person that originally found the workaround.
I will post his answer as soon as he replies ...
Sorry guys I get easily distracted :D
Patrick :mrgreen:
|
|
|
|
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)
|
At last, got the answer ... I think ...
From William Golson ...
1. In the System Editor, on both the Buy Order and the Sell Short Order tabs, set the Strategic delay to 1 Day. Leave the Sell Order and Buy to Cover Order Strategic delay set at 0.
2. When running a new simulation, under System Testing Options | More | Trade Execution, uncheck Realistic Market Prices.
3. Set both the Buy Price and Sell Short Price to Open.
4. Set Sell Price and Buy to Cover Price to either Close, or High/Low (with appropriate slippage).
5. Set Delay order opening to 0 bars.
Patrick :mrgreen:
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 6/22/2005(UTC) Posts: 29 Location: Singapore
|
Hi Patrick,
Thanks for the prompt reply. Will try to digest all these info and see if it works.
Regards,
Edwin :D
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 6/22/2005(UTC) Posts: 29 Location: Singapore
|
Hi Patrick,
Able to exit on the same day now using your info!
But my entry strategy loses money.....hahhahaha, have to keep on working on my entry!
You guys are simply great for helping newbies like me!! ThankQ!
Regards,
Edwin
|
|
|
|
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)
|
Excellent I'm glad it worked :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.