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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | /*_________________________________________________________________________________________ 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 (); |