⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 randomize().afl

📁 一个更精度的平滑涵数, 可用于股票交易系统.用于Amibroker 平台
💻 AFL
字号:
//------------------------------------------------------------------------------
//
//  Formula Name:    Randomize()
//  Author/Uploader: Antonio Marra 
//  E-mail:          ant.marra@virgilio.it
//  Date/Time Added: 2004-07-20 06:40:47
//  Origin:          
//  Keywords:        Random interval
//  Level:           basic
//  Flags:           showemail,function
//  Formula URL:     http://www.amibroker.com/library/formula.php?id=365
//  Details URL:     http://www.amibroker.com/library/detail.php?id=365
//
//------------------------------------------------------------------------------
//
//  This function will generate random numbers included in a given numeric
//  interval.
//
//------------------------------------------------------------------------------

/*_________________________________________________________________________________________ 

  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;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -