Discussions
»
Product and Service Development
»
MetaStock
»
how to set "Sell before the market is closed" in backtesting?
Rank: Member
Groups: Registered, Registered Users Joined: 11/2/2012(UTC) Posts: 15
|
how to set "must sell before the market is closed" in backtesting?
I am a day trader,so i have to sell before the market is closed.
Thanks for reading the post!
|
|
|
|
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)
|
Use a forward reference to the next bar to see if it has the same date; if not then the current bar is the last bar of that trading day, so close the position at the CLOSE price with zero delay. Of course, you cannot do this in real-life, but then again, back-testing doesn't necessarily portray what really happens in the market.
wabbit [:D]
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 11/2/2012(UTC) Posts: 15
|
thank you!
could u give me the codes?
i am a very beginner to metastock :)
|
|
|
|
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)
|
Have a look in the MS User Manual and the free Equis Formula Primer for how to use the Ref() and DayOfWeek() functions. Whilst looking in those documents, read the entire thing and see what other information is there waiting for you.
wabbit [:D]
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 11/2/2012(UTC) Posts: 15
|
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Discussions
»
Product and Service Development
»
MetaStock
»
how to set "Sell before the market is closed" in backtesting?
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.