Hi - Your array size will always be limited to Barcount, but if you add
 
SetBarsRequired( 100000, 100000 ); // or substitute any number larger than total # of data bars
 
at the top of your code, charts will use full data arrays instead of QuickAFL mini-arrays and BarCount will be the total number of data bars.
 
Steve
 
----- Original Message -----
Sent: Monday, June 12, 2006 6:25 AM
Subject: [amibroker] Using arrays without barcount limits

(I posted this over on the amibroker mesageboards, but there seems to
be very little activity over there. Would really appreciate it if
someone could help me)

I would like to use arrays outside of the barcount range,
For example:
to load 1000 values into an array
then load these into another array (to be used as an indicator) by
calling certain array "cells" based on conditions.

I can't seem to be able to use arrays for anything that doesn't fit
within the 0 to (barcount - 1) limit (which seems to only calculate
what is on screen)

Is this possible? or do I need to create a work around using
delimited strings or something?

This is really annoying me, I've created an indicator, it works fine,
but it won't work unless I zoom out to allow 1000 bars on screen.

I appreciate any help anyone can give.

Here is the code, in case it helps:

"standard" array is defined earlier in the script

//This script will load previously calculated probabilities from file
and display them in an indicator
probload[1] = 0; //array loaded from file
probability[1] = 0; //indicator array

probfh = fopen( "C:\\probability.csv", "r"); // open file

for (i = 1;i < 1000; i++)
{
test = fgets(probfh); //load row
test2 = StrToNum(test); //convert to number
probload[i] = test2; //place in array
}

fclose( probfh ); //close file

for ( i=3; i < BarCount; i++) //run through and load probabilities
based on current price movement
{
three = ((standard[i-2]) * 100) + ((standard[i-1]) * 10) +
standard[i]; //last three days moves as value
probability[i] = probload[three]; //load associated
probability
}

Plot( probload, "Standard", ParamColor( "Standard Color",
colorBlue ), ParamStyle("Standard Style", styleHistogram, maskAll ));

__._,_.___

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






SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to