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

Re: Referring to the status of the trade in system tester



PureBytes Links

Trading Reference Links

Gerard,

Not having done this myself, I can only go by what you are writing. Looks 
like there IS a circular reference. I would try the following.
Create a single indicator which captures your entries and exits. Have the 
indicator create 3 values.

If("conditions met to open trade",1, if("conditions met to close 
trade",-1,0)

In your open and close tabs, use the value of this indicator to tell you 
what you want. This modularizes the system into a single variable which you 
should be able to plop into any system.

Let me know if this helps.

David

For example:

Trade

From: "Gerard Jeuken" <gjeuken@xxxxxx>
Reply-To: metastock@xxxxxxxxxxxxx
To: "metastock-list" <metastock@xxxxxxxxxxxxx>
Subject: Referring to the status of the trade in system tester
Date: Tue, 4 Jan 2000 15:09:07 +0100

Writing code in the EnterLong or CloseLong -tabs  of a system-test  , I
would like to refer to a variable or costume indicator ,  indicating whether
the trade is "long" "short" or "out"  at the actual bar.
I tried to solve this by writing a costume indicator for the status of the
trade , for instance for the status of   "long" or "out"

{name :"Status_Long" }
{Remark:  True if long , False if out}

If( "open formula", true ,
  if("close formula",false, prev)
  )

"open formula" is the code of the EnterLong-tab and "close formula" is the
code of the CloseLong-tab of the system tester.
This indicator works fine , however if I refer to it from  the code for
"Close formula" of the system tester  an error is generated telling me I'm
using a circular reference . Even if I refer to it by ref(Status_Long ,-1) a
error is generated .


Does anyone have a solution to be able referring to the  status of the
trade?
Thanks in advance


Gerard


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com