Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 5/13/2010(UTC) Posts: 17
|
I am new to metastock and am looking at various indicators etc. When I run the default indicators on the Enhanced System Tester, the reports generated show where the trades take place i.e when orders are put in, held or taken off. Is it possible to be able to close a position on the close of everday, and then reopen the position at the open of the next day. Basically I would like the P&L on a daily basis as opposed to any indefinite time. Thanks
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/6/2010(UTC) Posts: 113 Location: London
|
I use an "Inactivity Minimum Change" Stop of 99% (Periods: 0) as a workaround, although you might be able to do it another way:
http://forum.equis.com/forums/thread/18540.aspx
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 5/13/2010(UTC) Posts: 17
|
Thanks for getting back to me. Could you kindly take me through the individual steps of how to input this into the System Editor. I took the reference:
*******
{Buy Order} Ref(Fml("My Buy Signal"),+1);
{Price} Ref(Fml("My Buy Price"),+1);
Strategic Delay (bars); [1]
{Sell Order} Fml("My Sell Signal");
Strategic Delay (bars); [0]
Set the Simulation Buy Price to OPEN and Delay order opening to 0.
******
Not clear on where to put in:
{Price} Ref(Fml("My Buy Price"),+1);
Thanks
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/6/2010(UTC) Posts: 113 Location: London
|
The price formula applies if you have a Limit, Stop or Stop Limit order in place. If you always enter and exit at the market price, you don't need to enter a price formula.
Under each order tab in the System Editor, there is an "Order Type" section at the bottom, and a "Limit or Stop Price" box. To the right of this box there is an "f" button which will open a new window where the price formula is entered.
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 5/13/2010(UTC) Posts: 17
|
Appreciate the help. I have my own customised data which only includes CLOSE prices. My trading strategy is based around the Close Prices. I would like to trade everyday and calculate the P&L on a daily basis. In the sense I would like to produce the BUY/SELL at the Close of each day and then calculate the P&L based on the (Close of tommorow - Close of today).
If I were to use the above strategy using the Equis-RSI-Expert System. Should I take the following steps in the System Editor:
In {Buy Order} Tab:
Ref(Cross(RSI(14),30),1)
(Click STOP in Order Type: In Limit or Stop Price Functions : Ref(C,1))
(In Strategic Delay(Bars) in Day =1)
In{Sell Order} Tab:
Ref(Cross(70,RSI(14)),1)
(Click STOP in Order Type: In Limit or Stop Price Functions : Ref(C,1))
(In Strategic Delay(Bars) in Day =1)
In{Sell Short Order} Tab:
Ref(Cross(70,RSI(14)),1)
(Click STOP in Order Type: In Limit or Stop Price Functions : Ref(C,1))
(In Strategic Delay(Bars) in Day =1)
In {Buy to Cover Order} Tab:
Ref(Cross(RSI(14),30),1)
(Click STOP in Order Type: In Limit or Stop Price Functions : Ref(C,1))
(In Strategic Delay(Bars) in Day =1)
Is this the correct way to do it? I would appreciate your help a lot. Thanks
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/6/2010(UTC) Posts: 113 Location: London
|
The thread (http://forum.equis.com/forums/thread/18540.aspx) states that for a Sell Order and a Buy to Cover Order you shouldn't add a strategic delay and forward reference. This is what it should be:
Strategic delay Forward Reference Buy Order 1 Yes Sell Order 0 No Sell Short Order 1 Yes Buy to Cover Order 0 No
You mention that your Stop formula is "Ref(C,1)". I'm not sure this is correct. What are you trying to achieve? Do you have a Stop or Limit price?
You can also view the daily change in Equity by exporting the Equity Report (right-click on the Equity Report and select "Export to Microsoft Excel") and entering these formulae into Excel:
In Cell K2:
=RIGHT(J2,LEN(J2)-1) [Copy and paste all the down]
In Cell L3:
=K3-K2 [Copy and paste all the way down]
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 7/25/2005(UTC) Posts: 1,042
Was thanked: 57 time(s) in 54 post(s)
|
Hi Sajeel
While not wanting to pour cold water on your efforts I fear that they are doomed to frustration and failure. Although it's possible to open and close a trade on the same EOD bar with the EST I'm not sure that possibility can be forced when attempted on an entire series of contiguous bars.
You state that you have customised data with CLOSE prices only, so your earlier comments about wanting to open and close an ongoing trade at the beginning and end of each day is going to be difficult to achieve without OPEN prices (even without any of the other obstacles that you face). I have to question whether the EST is the right tool to achieve whatever it is that you're attempting to do.
To calculate P&L on a daily basis you might be better to use an ROC() function combined with a latch indicating whether a trade is active or not. A slightly more sophisicated approach, but more easily doable than with the EST, would be to use Trade Equity indicators to plot results for individual securities as P&L in the form of equity, points or percent. I must admit, however, that I don't understand what it is you're trying to achieve, so coming up with the best method to get the desired result is something of a challenge.
Roy
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 5/13/2010(UTC) Posts: 17
|
Thank you both for your help!
Currently I am using Close prices only, however with a bit of data manipulation I can add Open prices too. My strategy is to trade the Cash market, where I always Buy/Sell stocks at the close, thus the Profit and Loss,for each stock, starts at the Close of day 1 and ends at the Close of day 2.
By trading on the same bar, i.e using the Open price to generate the signal and closing the position at the Close price, will the system work if I keep the Open Price =Yesterdays Close Price, Close=Tommorows Close Price
Thanks
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 7/25/2005(UTC) Posts: 1,042
Was thanked: 57 time(s) in 54 post(s)
|
Hi Sajeel
The best way to find out if something will work is to try it and see what the result is. So I did. My test consisted on buying long every bar on the CLOSE with no delay and selling on the CLOSE with a 1 bar delay using the Ref() function to generate a delay in the Sell Order window. I limited the test to 100 bars on a portfolio of about 200 stocks. The results appear to deliver 100 trades with appropriate profits and losses.
The simulation was set up to trade 100% of capital for every trade. At a glance it seems that one trade is closed on each bar before the next trade is opened, so the EST doesn't cancel trades because of insufficient capital (because of two concurrent trades attempting to each use 100% of available capital).
If you wish to inhibit initiating a new trade on every bar you well need to set up a mechanism, such as a latch, that is TRUE when you want to continue the longer term trade and FALSE when you don't. I hope this helps move you forward.
Roy
www.metastocktips.com
|
|
|
|
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.