checkNumBars()

ICE Data Services -

checkNumBars()
Previous  Top  Next

Checks the number of bars loaded in a Chart or Watch List [or in the external symbol or interval data called by the efs] against the value set as the first parameter and returns the following message This formula requires a minimum of %nValue% bars to function correctly. Please adjust your Time Template as necessary if the number of bars loaded is less than the defined one.
 
Syntax
 
checkNumBars( nValue [, sym() | inv ()] )

Parameters

nValue
requested minimum number of bars
sym() or inv()
[Optional] function of sym() or inv() to determine symbol/interval source


Code Examples

function preMain()
{
   var fp = new FunctionParameter("gPeriod", FunctionParameter.INTEGER);
   fp.setName("ema");
   fp.setDefault(14);
}

function main(gPeriod)
{
   checkNumBars(gPeriod);
   return ema(gPeriod);
}