Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/25/2010(UTC) Posts: 55
|
The forum wouldn't post this correctly when I used the mathematical symbols so I have typed "GT" for "greater than" and "LT" for "less than."
I want to to test a long/short system that is always in the market. The system is to buy when: 1. Average close of X days GT average close of X days taken Y days ago; 2. Close LT close Y days ago; and 3. Close GT Close X + Y days ago.
The system is to sell when: 1. Average close of X days LT average close of X days taken Y days ago; 2. Close GT close Y days ago; 3. Close LT Close X + Y days ago.
For use in EST, I would go long when: mov(C,X,S) GT ref(mov(C,X,S),-Y) and C LT ref(C,-Y) and C GT ref(C,(-X-Y).
I would go short when: mov(C,X,S) LT ref(mov(C,X,S),-Y) and C GT ref (C,-Y) and C LT ref(C,-X-Y).
I would leave the "sell to close" and "buy to cover" fields blank.
Would this be correct?
Thanks!
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 11/7/2005(UTC) Posts: 602
|
Best way to see if it is correct is to create an indicator and plot it in a inner window so you can see the results against the price trends. That's what I would do.
|
|
|
|
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)
|
Mark,
In the EST you need to provide a method to exit the long trade and swing to the short trade (and vice versa); i.e. you need to provide criteria for Buy, Sell, Sell Short and Buy To Cover. In order to always be in the market you will need to use some forward referencing tricks to "forecast" the exit by one bar with a one bar delay so the EST will swing long trades short and short trades long. Roy (MSTT) has written on this topic before: do a search and you will find many discussions on how to do this for your situation.
wabbit [:D]
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/25/2010(UTC) Posts: 55
|
Wabbit--
Why do I need a forward referencing forecast here? At every EOD, it's looking at the current X-SMA and that X-SMA as measured Y days ago, the current close, the close Y days ago, and the close X+Y days ago. If certain criteria are met then it could swing from buy to sell (or vice versa) on the next open.
|
|
|
|
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)
|
EST will not swing from long to short or short to long on the same bar, unless you use forward referencing. If you don't "trick" the EST, your long trade will exit on the next bar and the short will enter on the bar after that one. If you want true swing trading i.e. to exit the long at open and open a new short on the same open, then you'll need to do some more work with the EST. As previously mentioned, Roy has written up some of his findings already.
wabbit [:D]
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/25/2010(UTC) Posts: 55
|
I've searched the forum with keywords "est," "swing trading," "forecasting future bars," and even in Google with "MetaStock." I haven't found those links, Wabbit. Could you paste a couple?
|
|
|
|
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)
|
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/25/2010(UTC) Posts: 55
|
That makes sense. Thanks.
|
|
|
|
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.