PureBytes Links
Trading Reference Links
|
If({condition} 'your open formula' = 1 {thus true},
{then do} +1 {TRUE},
{else, thus false, do} 0 {FALSE} {or do another condition}
)
-----------------------------------------------------------------
If({bullish} C > Mov(c,5,s)=1 {thus IS one and positive in your SysTst},
{then do} +1 {=TRUE for SysTst},
{else and false do 0 (eg negative) or do another (nested) condition}
If({bearish} C < Mov(c,5,s)=1 {thus IS one and negative in your SysTst},
{then do} 0 {=FALSE for SysTst},
{else and false, do 0 (eg negative) or do another (nested) condition}
PREV
)
)
--------------------------------------------------------------------
Regards,
Ton Maas
ms-irb@xxxxxxxxxxxxxxxx
Dismiss the ".nospam" bit (including the dot) when replying and
note the new address change. Also for my Homepage
http://home.planet.nl/~anthmaas
----- Original Message -----
From: Gerard Jeuken
To: metastock-list <metastock@xxxxxxxxxxxxx>
Sent: dinsdag 4 januari 2000 15:09
Subject: Referring to the status of the trade in system tester
> 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
>
|