getFirstBarIndexOfDay() |
Top Previous Next |
getFirstBarIndexOfDay( date [, symbol] )
Returns the bar index to the first bar for the date specified.
Parameters
Usage
function main() { var nBarIndex; var nTime; var nPrice; ... ...
//get the rawtime value for the current bar nTime = getValue( "rawtime", 0 );
if ( nTime != null ) {
//get the bar index to the first bar of the date in nTime nBarIndex = getFirstBarIndexOfDay( nTime ); //grab the closing price from that bar nPrice = close( nBarIndex );
}
}
|