PureBytes Links
Trading Reference Links
|
ATCs are designed to accuulate values, so you can not do what you want using
ATCs.
Use a "normal" (array) variable and use subscripts so you write into only
one cell of the array.
bi = BraIndex();
Myarray[bi] = new value.
If you want this saved you should save it as an ATC (for example when you
switch symbols or at end of day), then when you start again read in the ATC
and put it in your "Myarray" to contunue adding vaues.
So you save ATC at the end of the program and read it back in at the
beginning.
This may slow down real time processing because AB may need to load all data
and negating Quick AFL benefits - not sure about this, but verify speed
impact. It may not be significant anyway.
----- Original Message -----
From: "cdepuy" <cdepuy@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, March 31, 2008 10:52 AM
Subject: [amibroker] ATC question
>I would like to write values that change each bar to a "dummy ticker"
> using ATC. Here in my example, I am retrieving real-time data from
> eSignal and trying to write it to various fields in a dummy ticker
> called ~QQQQBA (where QQQQ is ticker). The problem I'm having is that
> the current values are overwritten each bar and somehow "composited"
> such that the bids and asks double up, then triple up and so on, rather
> than just being stored and not modified. Can anyone point me in the
> direction that allows me to write values to a dummy ticker that does
> not get operated on once placed in those fields? Tx in advance.
>
> bidc = GetRTData("bid");
> askc = GetRTData("ask");
> spread = ask-bid;
> bidvc = GetRTData("bidsize");
> askvc = GetRTData("asksize");
>
> AddToComposite(bidc,"`" +Name()
> +"BA","O",atcFlagDeleteValues|atcFlagCompositeGroup);
> AddToComposite(Askc,"`" +Name()
> +"BA","H",atcFlagDeleteValues|atcFlagCompositeGroup);
> AddToComposite(bidvc,"`"+Name()
> +"BA","L",atcFlagDeleteValues|atcFlagCompositeGroup);
> AddToComposite(askvc,"`"+Name()
> +"BA","C",atcFlagDeleteValues|atcFlagCompositeGroup);
>
>
> ------------------------------------
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> For other support material please check also:
> http://www.amibroker.com/support.html
> Yahoo! Groups Links
>
>
>
------------------------------------
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
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:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto: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/
|