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

Re: [amibroker] Re: Initializing Variables once at the start of the program



PureBytes Links

Trading Reference Links

Hi Tomasz,
 
What setting would that be ? In Misc, I ticked the display chart timing (advanced) and then at the bottom of my screen I have # of extra bars back 999 - is that it ? I didn't see anything that was labeled "VISIBLE" in preferences.
 
I will be running tick charts, 600 volume - trading futures. Using the lastest beta.
 
If you read my post, I have had some good feed back from Fred, but I still would like to keep my own variables from the moment I place the indicator on my chart (initialize to 0) and then control them myself - right now, as soon as I get another bar, they get initialize to 0 again. How can I initiaize them to 0 ONCE, and then allow me to change them as I see fit, and have them stay at that value until I change them again. Seems like a basic thing to me.
 
 
Thanks.
 
 
-----amibroker@xxxxxxxxxxxxxxx wrote: -----

To: <amibroker@xxxxxxxxxxxxxxx>
From: "Tomasz Janeczko" <amibroker@xxxxxx>
Sent by: amibroker@xxxxxxxxxxxxxxx
Date: 01/31/2006 09:29AM
Subject: Re: [amibroker] Re: Initializing Variables once at the start of the program

Hello,

One thing that needs to be corrected is that when new data arrives indicators
do not recalculate over all the data, but rather over VISIBLE bars only
(plus some extra bars required to calculate). This can be observed
using new 'display indicator timing' feature (Tools->Prefs->Misc.)

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "Fred" <ftonetti@xxxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Tuesday, January 31, 2006 2:49 PM
Subject: [amibroker] Re: Initializing Variables once at the start of the program


> Your getting into an area that requires an in depth knowledge of how
> the internals of AB work ... I don't pretend to be an expert in this
> area but I'll take a stab at answering your question based on what I
> have observed.
>
> If you are asking your question relative to new data arriving on an
> intraday basis and being updated to the database and that those
> database items are components of indicators and AA's in a chart that
> you have up then I believe that ... Indicators are sort of event
> triggered if you will, based on the arrival of new data and are thus
> executed again over all the data that the indicator sees.  I think
> AA's ( Systems, Explores , Scans ) run only at the push of a button
> in the AA window.
>
> Take what is above with a grain of salt until someone better in the
> know than I confirms or corrects the content.
>
> --- In amibroker@xxxxxxxxxxxxxxx, "J. Biran" <jbiran@xxxx> wrote:
>>
>> What happens when new data arrives then?
>>
>> 
>>
>>
>>
>> Joseph Biran
>> ____________________________________________
>>
>> 
>>
>>   _____ 
>>
>> From: amibroker@xxxxxxxxxxxxxxx
>> [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Fred
>> Sent: Monday, January 30, 2006 8:49 PM
>> To: amibroker@xxxxxxxxxxxxxxx
>> Subject: [amibroker] Re: Initializing Variables once at the
>> start of the program
>>
>> 
>>
>> TradeStation easy language is processed from to top to
>> bottom a bar
>> at a time ...
>>
>> AmiBroker AFL is processed from top to bottom with each
>> statement
>> being executed ONCE and ONLY ONCE ... NOT ONCE PER BAR ...
>>
>> Unless you build your own Do / While / For Loops and
>> subscript the
>> ARRAYS then typically each statement works on the entire
>> ARRAY ...
>>
>> For example ...
>>
>> If I write the AFL
>>
>> BS = Ref(H, -1) * 1.001;
>> SS = Ref(L, -1) * 0.999;
>>
>> Buy = C > BS;
>> Sell = C < SS;
>>
>> Then each of the above statements will be evaulated once ...
>> not once
>> per bar ...
>>
>> The first statement will cause an array to be built with
>> each value
>> along the array being 1.001 * The previous bars high.  Once
>> this
>> statement is executed or evaluated once it will never be
>> executed or
>> evaluated again.
>>
>> The second statement will cause an array to be built with
>> each value
>> along the array being 0.999 * The previous bars low.
>>
>> The third and fourth statement evaluate whether buys and
>> sells take
>> place over the entire history of data that is being looked
>> at ...
>> again by being evaluated ONCE ... NOT ONCE PER BAR ...
>>
>> I came from TS as well ... years and years of it ... it is
>> at first
>> difficult to visualize the concept of array arithmetic but
>> in time
>> you'll get used to it ...
>>
>>
>>
>> --- In amibroker@xxxxxxxxxxxxxxx, "clarusinnovation"
>> <mfishburn@xxxx>
>> wrote:
>> >
>> > Hi,
>> >
>> > I want to initialize a variable CurrentBar at the start of
>> my
>> program
>> > once to 0 - meaning I haven't processed this bar yet. (and
>> a lot of
>> > other variables I want too)
>> >
>> > I don't know how or where to put the variables so they
>> won't get
>> > initialized every time through the program. I want to keep
>> their
>> > values as I climb up through the bars.
>> >
>> > each bar that counts up, I want to increment this counter.
>> >
>> > I tried StaticVariables, but they don't seem to work. How
>> do I
>> > initialize them ONCE and then increment them from there ?
>> >
>> > Please don't tell me to read the manual, I have been up
>> and down
>> it,
>> > reading Understanding AFL, it is taking me days to do the
>> simplest
>> > things...... and it isn't working for me.  I came from
>> Tradestation
>> > and I could understand bar flow, with Ami I don't.
>> >
>> > Please just tell me what to do, and where to put the code.
>> >
>> > I tried initalizing the variable in a #Include_ONCE file,
>> that
>> didn't
>> > work.
>> >
>> > Thanks a lot, it is very frustrating.
>> >
>> > Mark
>> >
>>
>>
>>
>>
>>
>>
>>
>> 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 other support material please check also:
>> http://www.amibroker.com/support.html
>>
>>
>>
>>
>>
>>
>>   _____ 
>>
>> YAHOO! GROUPS LINKS
>>
>> 
>>
>> * Visit your group "amibroker
>> < http://groups.yahoo.com/group/amibroker > " on the web.
>>  
>> * To unsubscribe from this group, send an email to:
>>  amibroker-unsubscribe@xxxxxxxxxxxxxxx
>> <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubs
>> cribe>
>>  
>> * Your use of Yahoo! Groups is subject to the Yahoo!
>> < http://docs.yahoo.com/info/terms/ >  Terms of Service.
>>
>> 
>>
>>   _____
>>
>
>
>
>
>
>
>
> 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 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 other support material please check also:
http://www.amibroker.com/support.html





YAHOO! GROUPS LINKS