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

[amibroker] Setforeign in Autotrading


  • Date: Wed, 3 Mar 2010 08:32:33 +0200
  • From: Adrian Mollenhorst <adrian.mollenhorst@xxxxxxxxx>
  • Subject: [amibroker] Setforeign in Autotrading

PureBytes Links

Trading Reference Links

Hi Guys,

I use IQFeed to receive NYSE Volume up/down indices to provide one of
my exit scenarios, however there has been a difference between real
trading results and the backtest. I trade intraday on 5 minute bars.
My code is as follows:


SetForeign("Vind.z");
downv = C;
RestorePriceArrays();
SetForeign("Vina.z");
upV = C;
RestorePriceArrays();
Vdir = upv-downv;

Sell =  Ref(Vdir,-1)<Ref(Vdir,-2);
Cover = Ref(Vdir,-1)>Ref(Vdir,-2);

The downv and upv variables are set be be based on closing prices,
however the Sell/Cover only refer to the previous bar, or the bar
before that, so there should be no look-ahead problems between real
trading and backtest.

I paint my exit bars white, and at the time of the exit in the real
trade, I do not remember seeing this exit bar being white, only much
later when I verified my real trades with backtested trades later in
the day. It was white at that time, however.

I am thinking that for some reason, perhaps Amibroker is not updating
the foreign tickers as quickly as the main ticker (@NQ#). Is this
possible? That I could not be getting quotes from a foreign ticker in
time to base the trading decision?

If this is possible, is there anything than can be done to get them
updated in time? I already have those tickers (Vina.z and Vind.z) as
open charts in Amibroker, with the setting 'RequestTimedRefresh( 1 )'.

Any help is much appreciated.

Adrian


------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

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

<*> Your email settings:
    Individual Email | Traditional

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

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

<*> 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/