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

[amibroker] PlottingFunctions() arrrrgh...



PureBytes Links

Trading Reference Links

Hopefully gracious soul can help me. 
I am having a very difficult time trying to plot something so easy as a c style function I think and I just don't "get it".
Sometimes I can get it to work and others not.
 
What is the logic behind plotting a "function" used this way.
 
Just thinking of plotting a distribution of the Close or even a random number just to get it working...
...the [index] brackets are throwing me off... with a syntax error...
 
Thanks in advance...
 
Mr Valley
 
///////////////////////////////////////////////////////////////////////////////////////
 
// InitializeNormalCDF.afl
//
function InitializeNormalCDF()

// array for the Normalized Cum Dist function.
{
 NormCDF[0] = -3.090;
 NormCDF[1] = -2.326;
 NormCDF[2] = -2.053;
 NormCDF[3] = -1.881;
 NormCDF[4] = -1.751;
 NormCDF[5] = -1.645;
 NormCDF[6] = -1.555;
 NormCDF[7] = -1.476;
 NormCDF[8] = -1.405;
 NormCDF[9] = -1.341;
 NormCDF[10] = -1.282;
 NormCDF[11] = -1.227;
 NormCDF[12] = -1.175;
 NormCDF[13] = -1.126;
 NormCDF[14] = -1.080;
 NormCDF[15] = -1.036;
 NormCDF[16] = -0.994;
 NormCDF[17] = -0.954;
 NormCDF[18] = -0.915;
 NormCDF[19] = -0.878;
 NormCDF[20] = -0.842;
 NormCDF[21] = -0.806;
 NormCDF[22] = -0.772;
 NormCDF[23] = -0.739;
 NormCDF[24] = -0.706;
 NormCDF[25] = -0.674;
 NormCDF[26] = -0.643;
 NormCDF[27] = -0.613;
 NormCDF[28] = -0.583;
 NormCDF[29] = -0.553;
 NormCDF[30] = -0.524;
 NormCDF[31] = -0.496;
 NormCDF[32] = -0.468;
 NormCDF[33] = -0.440;
 NormCDF[34] = -0.412;
 NormCDF[35] = -0.385;
 NormCDF[36] = -0.358;
 NormCDF[37] = -0.332;
 NormCDF[38] = -0.305;
 NormCDF[39] = -0.279;
 NormCDF[40] = -0.253;
 NormCDF[41] = -0.228;
 NormCDF[42] = -0.202;
 NormCDF[43] = -0.176;
 NormCDF[44] = -0.151;
 NormCDF[45] = -0.126;
 NormCDF[46] = -0.100;
 NormCDF[47] = -0.075;
 NormCDF[48] = -0.050;
 NormCDF[49] = -0.025;
 NormCDF[50] = 0.000;
 NormCDF[51] = 0.025;
 NormCDF[52] = 0.050;
 NormCDF[53] = 0.075;
 NormCDF[54] = 0.100;
 NormCDF[55] = 0.126;
 NormCDF[56] = 0.151;
 NormCDF[57] = 0.176;
 NormCDF[58] = 0.202;
 NormCDF[59] = 0.228;
 NormCDF[60] = 0.253;
 NormCDF[61] = 0.279;
 NormCDF[62] = 0.305;
 NormCDF[63] = 0.332;
 NormCDF[64] = 0.358;
 NormCDF[65] = 0.385;
 NormCDF[66] = 0.412;
 NormCDF[67] = 0.440;
 NormCDF[68] = 0.468;
 NormCDF[69] = 0.496;
 NormCDF[70] = 0.524;
 NormCDF[71] = 0.553;
 NormCDF[72] = 0.583;
 NormCDF[73] = 0.613;
 NormCDF[74] = 0.643;
 NormCDF[75] = 0.674;
 NormCDF[76] = 0.706;
 NormCDF[77] = 0.739;
 NormCDF[78] = 0.772;
 NormCDF[79] = 0.806;
 NormCDF[80] = 0.842;
 NormCDF[81] = 0.878;
 NormCDF[82] = 0.915;
 NormCDF[83] = 0.954;
 NormCDF[84] = 0.994;
 NormCDF[85] = 1.036;
 NormCDF[86] = 1.080;
 NormCDF[87] = 1.126;
 NormCDF[88] = 1.175;
 NormCDF[89] = 1.227;
 NormCDF[90] = 1.281;
 NormCDF[91] = 1.341;
 NormCDF[92] = 1.405;
 NormCDF[93] = 1.476;
 NormCDF[94] = 1.555;
 NormCDF[95] = 1.645;
 NormCDF[96] = 1.751;
 NormCDF[97] = 1.881;
 NormCDF[98] = 2.054;
 NormCDF[99] = 2.326;
 NormCDF[100] = 3.090;
 return(Null);
}
 
 
// plot goes here ... I think
 
 
 
// NormalRandomizedNumber.afl
//
function NormalRandomNumber()
{
 Index = int(100* rand()) + 1;
 return(NormCDF[index]);
}
// plot goes here ... I think
__._,_.___

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




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___