MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

A B C D E F G H I J K L M N O P R S T U V W Y Z #

Checks the %Profit Gained by Spyros Raftopoulos

* To: <metastock@xxxxxxxxxxxxxxxxxx>
* Subject: More on MS Explorer
* From: "SR" <raftsp@xxxxxxxxx>
* Date: Thu, 22 Nov 2001 19:45:19 +0200
* Importance: Normal
* In-Reply-To: <200110250942.DAA10080@xxxxxxxxxxxxxxxxxx>
* Reply-To: metastock@xxxxxxxxxxxxx
* Sender: owner-metastock@xxxxxxxxxxxxx

Here is another possible use of the MS Explorer for calculating the profitability of its own past explorations or for back testing a system during a specified period. I have been away for some time now, so I don't know if any other members have posted something like this in the meanwhile. I am aware of the fact that there have been a lot of interesting and more sophisticated exploring methods using the MS Explorer for back testing, but this one might be also useful, since it's quite simple, fast and easily adaptable to various needs.

Suppose we had performed an exploration on date xx/xx/xx, based on a set of conditions, like <myCondition1> and <myCondition2> and ..<myCondition10>, all part of the Explorer's Filter. Say that 3 securities had passed our strict filter and had been candidates for long entry at the next bar's Open. 10 periods after our long entry we want to check the performance of the above securities, to evaluate our conditions either as part of a system or as part of the exploration.

The following method checks the %profit gained 1, 2, 3, 4, 5 and 10 periods after our position has been opened.

1. Copy -paste the code into the corresponding fields of the Explorer.


Checks the %Profit Gained

Column A
Col Name: H1 %
Code: (Ref(HIGH,-9)-Ref(OPEN,-10))*100/Ref(OPEN,-10)
{%Gain 1 period after long entry}

Column B
Col Name: H2 %
Code: (Ref(HIGH,-8)-Ref(OPEN,-10))*100/Ref(OPEN,-10)
{%Gain 2 periods after long entry}

Column C
Col Name: H3 %
Code: (Ref(HIGH,-7)-Ref(OPEN,-10))*100/Ref(OPEN,-10)
{%Gain 3 periods after long entry}

Column D
Col Name: H4 %
Code: (Ref(HIGH,-6)-Ref(OPEN,-10))*100/Ref(OPEN,-10)
{%Gain 4 periods after long entry}

Column E
Col Name: H5 %
Code: (Ref(HIGH,-5)-Ref(OPEN,-10))*100/Ref(OPEN,-10)
{%Gain 5 periods after long entry}

Column F
Col Name: H10 %
Code: (H-Ref(OPEN,-10))*100/Ref(OPEN,-10)
{%Gain 10 periods after long entry ( the Exploration Date)}

Entry:= <myCondition1> and <myCondition2> and ..<myCondition10> ;
Ref(entry,-11)=1 {since we have entered long 10 periods ago, the signal has
been generated 11 periods ago}



2. Click on the Options button on the Exploration Editor, check the radio button "Specific date" and enter the date for which you want the exploration performed. Click OK, OK, Explore.

3. After the exploration is done click Reports:

The results in this case concern the maximum profits possible on each one of the above dates (periods).
For example the column H1 % shows the maximum %profit possible 1 period after our long entry, whereas H10 % shows the maximum %profit possible 10 periods after our long entry, which is the date for which we performed the

This is a simple method, not taking into account commissions or slippage. Nevertheless, it might be useful if one wants to have a rough idea of the profitability of his trading rules, performing back-tests rather "horizontally" (on multiple securities, on various dates, for a few specific date records) than "vertically" (on one security, on many adjoining date records).

An additional advantage of this method is that one can specify custom entry or exit prices, instead of fixed ones like Close, High, Low, Open. Furthermore, one is able to get an idea of how "crowded" his explorations usually are, since he knows how many securities pass his filter's conditions, on various dates.

Needless to say, that we can easily use Close in the place of High if we rather want to base the profitability on more "realistic" conditions than calculating max profits. We may also want to check the profits on other than the above-specified dates, for example on 5, 10, 15, 20 and 25 periods after our long entry. What's more, we can calculate the %drawdown on specific dates after long entry, by substituting High for Low prices. We can back-test for short entries instead of long ones, etc.

I hope this might be useful for some of you.
Happy analysis

Source / From: TOP

Equis and MetaStock® and MetaStock Professional® are registered trademarks of Equis International. Achelis Binary Wave®, The DownLoader®,
Expert Advisor®, OptionScope®, Quotecenter® and Smart Charts® are trademarks of Equis International, a Thomson Reuters company.

TradeStation® Pro, TradeStation® 2000i, OptionStation®, SuperCharts®, PowerEditor® and EasyLanguage®
are registered trademarks of TradeStation Technologies, Inc. Other names and marks referred to are the property of their respective owners.

All information provided on this website is for educational purposes only. Trading involves risk, including possible loss of principal and other losses.

Ten i inne materiały na tej stronie zostały zamieszczone zostały jedynie w celach edukacyjnych, nie ponoszę żadnej odpowiedzialno¶ci za ich stosowanie.

Gra na giełdzie i rynkach walutowych (FOREX) niesie ze sob± ryzyko poważnych strat finansowych!