PureBytes Links
Trading Reference Links
|
Not quite sure what you are doing ... buy I think you may have to use a
loop...if you haven't tried loops it is worthwhile to read up on them, they
give you access to the numerical values of each bar.
best regards,
herman
-----Original Message-----
From: Beachie [mailto:beachie41@xxxxxxxxxxx]
Sent: Thursday, September 16, 2004 6:23 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: ValueWhen(Ref()) question
OK, I've tried my best, but I now presume that it cannot be done in
Amibroker i.e
correctly reference the last trade in a backtest ( without resorting to
some sort of
workaround). I've searched the archives, and despite trying to use
relevant search
criteria I cannot find a solution.
Just to clarify, in case I've not made myself clear, I wish to SAR a trade
if the original
entry criteria is voided. eg a close under the low of a Buy entry bar. To
do this ( under
a backtest) I need to be able to reference the H,L,C,O for that particular
signal.
As previously posted, using something like "Sell = C <
LastValue(ValueWhen(Buy, Low));"
only references the very last signal in a backtest, instead of stepping
through each
signal as it is generated.
Anyone???
----- Original Message -----
From: "Beachie" <beachie41@xxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
>
> Not out of the woods yet...
> The following code works, but only on the very last Buy signal when
running a backtest.
> How is it possible to have it check each & every Buy signal in a
backtest?
>
> Sell = C < LastValue(ValueWhen(Buy, Low));
>
> ----- Original Message -----
> From: "Beachie" <beachie41@xxxxxxxxxxx>
> To: amibroker@xxxxxxxxxxxxxxx
>
>> Thanks Herman!
>>
>> ----- Original Message -----
>> From: "Herman van den Bergen" <psytek@xxxxxxxx>
>>
>>
>>>
>>> LastValue(valuewhen(Buy,Close));
>>>
>>> herman
>>> -----Original Message-----
>>> From: Beachie [mailto:beachie41@xxxxxxxxxxx]
>>> >
>>> Thanks Anthony....not what I was wanting to hear though :(
>>> Do you (or anyone for that matter) have any ideas how I can retrieve
the
>>> value of the
>>> Close of the last Buy that was traded on?
>>>
>>>
>>> ----- Original Message -----
>>> From: "Anthony Faragasso" <ajf1111@xxxxxxxx>
>>>>
>>>
>>> >I read it as this.....
>>> >
>>> > Give me the value of the close when the Buy was the day before....
>>> > ----- Original Message -----
>>> > From: "Beachie" <beachie41@xxxxxxxxxxx>
>>> >
>>> >
>>> >> Just some clarification please for the following:
>>> >> ValueWhen(Ref(Buy,-1),C)
>>> >> Does this return the Close value of the last time a Buy was
actually
>>> >> executed, or does it
>>> >> return just the last Buy signal, regardless whether there was
still a
>>> >> trade open before
>>> >> that? In other words I wish to only reference the last Buy signal
that
>>> >> actually caused me
>>> >> to enter a trade, despite subsequent Buy signal positives.
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Sponsor
ADVERTISEMENT
----------------------------------------------------------------------------
--
Yahoo! Groups Links
a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
b.. To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|