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

Re: [amibroker] Re: VBScript / Jscript



PureBytes Links

Trading Reference Links

bruce,

Thanks again. 

A
----- Original Message ----- 
From: "bruce1r" <brucer@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, June 24, 2007 10:04 AM
Subject: [amibroker] Re: VBScript / Jscript


> Static arrays - I'll tell you a way to do it without ATC that I've 
> used, but it comes with cautions.  I did it prior to the change to
> allow ATC's in indicators.  Performance wise, it is faster, but
> not that much since I suspect TJ optimized ATC and Foreign.  
> BUT, please observe the following constraint -
> 
> FOR THIS TECHNIQUE TO WORK , IN THE AA SETTINGS YOU MUST PAD AND ALIGN
> ALL DATA TO A REFERENCE SYMBOL
> 
> BTW, you might generally think that this is a bad thing to do, but it
> is actually useful.  If you know that you are only interested in
> recent history in a scan or explore, you can greatly speed up lengthy
> ones by using a reference symbol with limited history - like UCPIX -
> whose history starts on in 2004.
> 
> (I really wish that TJ would expose this thru automation ! )
> 
> So, say that you use pad and align, you can use the Windows Scripting
> Dictionary to hold the arrays.  This comes in all recent versions of
> IE/VBScript, and has many uses.  It is really easy to use, but you must
> do the following to make sure it stays in memory -
> 
> dict     = CreateStaticObject( "scripting.dictionary" );
> 
> Variant entries are referenced by key - so say that you have an array
> that you want to store with a key or name, the following form will add
> or update an entry (why the update has to be done this way isn't
> important here) -
> 
> if ( dict.exists( key ) )
>     dict.remove( key );
> dict.add( key, array );
> 
> To retrieve an entry -
> 
> array   = dict.item( key );
> 
> Lastly, there is a RemoveAll() method that can be handy.
> 
> REMEMBER - you must use "Pad and align all data to reference symbol".
> 
> Again, though, before TJ shoots me <g>, I'd advise against this for
> most everyone because if you are not careful, things can get ugly.
> I'd suggest just using ATC.
> 
> Bruce R.
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Ara Kaloustian" <ara1@xxx> wrote:
>>
>> Thanks Bruce
>> 
>> ----- Original Message ----- 
>> From: "bruce1r" <brucer@xxx>
>> To: <amibroker@xxxxxxxxxxxxxxx>
>> Sent: Sunday, June 24, 2007 5:39 AM
>> Subject: [amibroker] Re: VBScript / Jscript
>> 
>> 
>> > Ara -
>> > 
>> > I addressed it - just not in detail.  I mentioned that ATC's normally
>> > operate out of ticker data cache.  AB maintains its own memory cache
>> > for ticker data.  So, your retrievals of your ATC "static" arrays
>> > should be coming from this memory via a Foreign() call - and this is
>> > fast.  They are probably not coming from disk.  So, I can think of
>> > only three remotely possible reasons that you might see disk reads -
>> > 
>> > 1. The settings in Tools/Preferences/Data are unusually small for the
>> > cache,  and the ATC tickers cannot be kept there.  This seems
> unlikely.
>> > 
>> > 2. AB has a bug that flushes the cache.  Unlikely knowing TJ, and it
>> > probably would have been noticed by now.
>> > 
>> > 3. Your watchlist is lengthy or you do a large number of foreign's
>> > that flush the ATC's out of the cache.  Also unlikely.
>> > 
>> > BUT, I said that I would show you a hack for static arrays, and I'll
>> > do it in the a follow-up post to this.
>> > 
>> > Bruce R.
>> > 
> 
> 
> 
> 
> 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/