PureBytes Links
Trading Reference Links
|
Thanks for this, this solves my previous problem of trades not
closing at a specified time if there is no data there! (I just
needed to >= rather than = the time).
Unfortunately, I still cannot make the backtester reset at the
beginning of the day. I am now trying to use if...else statements.
Any suggestions appreciated.
Sam
--- In amibroker@xxxxxxxxxxxxxxx, "Herman van den Bergen"
<psytek@xxxx> wrote:
> Try to close out positions at the end of the day (untested) with
something
> like this:
>
> MarketClose= 155000; // set to suit your needs and TF used
> EndOfDayPeriod = Timenum() >= MarketClose;
>
> Sell = sell or EndOfDayPeriod ; // exit on last bar
> cover = cover or EndOfDayPeriod ;
>
> Buy = buy and not EndOfDayPeriod; // no entries on last bar
> Short = short and not EndOfDayPeriod ;
>
> herman
> -----Original Message-----
> From: qweds_560 [mailto:qweds_560@x...]
> Sent: Sunday, January 23, 2005 3:00 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Resetting exRem at the start of the day
>
>
>
> Hello,
>
> I am backtesting on an intraday basis. I am using a system which
> alternates between long and short positions. All positions are
> closed out at the end of the day. I seemed to have coded this so
far
> using exRem to remove any excessive signals.
>
> At present, the backtester will continue alternating into the
next
> day by referring to the last trade made on the previous day. For
> example, if the last trade today was a short position (which
will be
> closed at the end of the day), the backtester will monitor for a
buy
> signal the next day.
>
> I need to reset it somehow so that the backtester monitors for
> either a buy OR a short signal at the start of the next day (at a
> specified time) without reference to the last trade of the
previous
> day.
>
> I would be grateful for any suggestions on how to do this.
>
> Many thanks
>
> Sam
>
>
>
>
>
> 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
>
> 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.
------------------------ Yahoo! Groups Sponsor --------------------~-->
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/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/
|