Stock Portfolio Organizer
The ultimate porfolio management solution.
Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Randomize function for Amibroker (AFL)
Copy & Paste Friendly
Back
/*_________________________________________________________________________________________
SYNTAX:
Randomize(a,b)
PURPOSE:
This function will generate random numbers included in a given numeric interval.
HOW TO USE:
Copy this file in your include directory or append it to another file that You
use as "functions database".
"a" is the lowest value, "b" is the highest value.
EXAMPLE:
1. if you want to generate random between 1 e 100 (with decimal values):
RandomNumber = Randomize(1,100);
2. if you want to generate random between 1 e 100 (with only integer values):
RandomNumber = int( Randomize(1,100) ) ;
________________________________________________________________________________________
*/
function Randomize(a,b)
{
result = Random()*(b-a)+a;
return result;
}
_SECTION_END();
//Plot( mtRandomA(), "Sinus", ParamColor( "Color Sinus", colorCycle ), ParamStyle("Style") );
Plot( Randomize(1,100), "Sinus", ParamColor( "Color Sinus", colorCycle ), ParamStyle("Style") );
_SECTION_END();