Hello,

These fields are mainly for READING from AFL.

If you want to write to them you need new composite ticker (AddToComposite() function).

With regards to writing to "current" ticker - my previous response was not entirely correct - composites won't add to themselves, otherwise the composite would be sum of itself and the rest, so internally AmiBroker has a protection against composite onto itself. It is not specific to
aux fields, it won't allow you to do that using OHLC too.
You need to use *different* symbol as a writing location than the one that is currently being
processed.

Generally price data (including aux fields) should not be written from AFL (with exception to composites). These fields are designed to be either imported using ASCII importer or fed via plugin. Primary "by design" purpose of those fields are to store Bid and Ask for real time plugins and unadjusted close for EOD plugins. There can be other uses hence 'general' name given to these fields, but in general, they are not "user" fields, but rather "auxilliary price" fields.

Best regards,
Tomasz Janeczko
amibroker.com

On 2010-04-23 10:25, Vladislav Titov wrote:


Does anybody use AUX1 and AUX2 fields from AFL?

How to assign values to these fields of original symbol from AFL directly? Is it possible?


BR, Vlad.



>

        



Hello Tomasz.


I am trying to use new AmiBroker 5.30 with my data and have difficulties with AUX1 and AUX2 fields.

I have local 1 hour DB (no plugins, just ASCII imported). And I am trying to assing AUX1 value. I am running Scan for all symbols with following code (Code just composed from your examples):


SetBarsRequired(sbrAll, sbrAll);

buy = 0;

tst = 123;

AddToComposite(tst, "1_"+Name(), "1", atcFlagResetValues);

AddToComposite(tst, Name(), "1", atcFlagResetValues);


As result I got 1_XXX symbols with AUX1 equal to 123 - this is correct. But value AUX1 for initial symbols XXX are still 0.

From you mail (see below) I understood that last line (for Name()) also have to work. But it isn't :( What I do wrong?


Thank you in advance.


BR, Vlad


--- In amibro...@yahoogrou <mailto:amibroker%40yahoogroups.com>ps.com <mailto:amibroker%40yahoogroups.com>, "Tomasz Janeczko" <gro...@...> wrote:

>

> Not necesarily. If you use existing symbol name it will write to existing.

> Specfically if you use AddToComposite( array, Name(), "1", atcFlagResetValues | atcFlagEnableInExplore )

> it will write data to *current* symbol and operate in explore mode too.

>

> Recommended reading:

> http://www.amibroke <http://www.amibroker.com/guide/h_workspace.html>r.com/guide/ <http://www.amibroker.com/guide/h_workspace.html>h_workspace. <http://www.amibroker.com/guide/h_workspace.html>html <http://www.amibroker.com/guide/h_workspace.html>

> http://www.amibroke <http://www.amibroker.com/guide/a_addtocomposite.html>r.com/guide/ <http://www.amibroker.com/guide/a_addtocomposite.html>a_addtocomposite <http://www.amibroker.com/guide/a_addtocomposite.html>.html <http://www.amibroker.com/guide/a_addtocomposite.html>

>

> Best regards,

> Tomasz Janeczko

> amibroker.com





Reply via email to