[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [EquisMetaStock Group] System Tester



PureBytes Links

Trading Reference Links

Hi Martin


I believe there are only two functions that will allow you to relate a sell signal to the buy price or buy timing. These are the PREV and Simulation functions. The use of either function significantly slows the operation of the EST to the point of rendering it almost useless in some cases. Multiple Simulation functions can make optimising across a large portfolio of stocks quite unrealistic.

Preston has suggested the use of BarsSince() as a timing mechanism, and this can work on its own when the delay period is generally much shorter than the normal interval between buy signals. However, it fails when secondary buy signals reset the sell timer before it has timed when not used as part of a PREV latch. PREV allows a number of exit conditions to be monitored within a variable that can also hold the buy price and timing. There are limitations with the MetaStock Formula Language (no Branch, Loop or Jump fuctions) that make PREV essential for proper management of the various exit conditions being monitored.

In the following example the "R" variable stores the entry price and progress of an active trade. The PREV variable then allows you to reference either the price or the timing of the entry signal and base exit decisions upon those or independent conditions (introduced as the "X" variable).

{Timed Exit Signal}
D:=5; {delay period}
N:=Fml("System Entry ASX W"); {entry signal carrying price here}
X:=0; {independant exit condition signal here}
R:=If(PREV<=0,N,X OR If(BarsSince(PREV<=0)>=D,-PREV,PREV));
Exit:=R<0;
Exit;

Timed exits in the Enhanced System Tester can also be set up by using the Inactivity Minimum Change stops, and these do not need to code to be activated, just the setting of points or percentage thresholds (minimum required change) and the number of periods before activation.

Simulation.CurrentPositionAge>=5 is about as basic as a timed exit can be using the Simulation function. You can check out the various other Simulation functions by creating a New Indicator (or opening an existing one) in the Indicator Builder, positioning the cursor in the Formula window, clicking on the Functions... button and then moving down the Functions Category list until you find Simulation. Note that these function can only be used in the EST, but the Indicator Builder is where the syntax and some explanation is accessible.

Developing the skills to build the sort of system formulas that you want is not something that comes with five minutes of practice so don't expect instant results.


Regards

Roy
www.metastocktips.co.nz



  ----- Original Message ----- 
  From: martinjenkins2001 
  To: equismetastock@xxxxxxxxxxxxxxx 
  Sent: Tuesday, August 28, 2007 10:35 PM
  Subject: [EquisMetaStock Group] System Tester


  I need to relate my sell signal to the price at which I bought with
  the buy signal - what expression do I use? I would also like my sell
  signal to relate to when I bought (e.g. "X Days from the buy point").
  Any help gratefully received.

  Regards 



   

  __________ NOD32 2488 (20070828) Information __________

  This message was checked by NOD32 antivirus system.
  http://www.eset.com


[Non-text portions of this message have been removed]



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/equismetastock/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:equismetastock-digest@xxxxxxxxxxxxxxx 
    mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/