Displacement (position) in the array of the smallest value for the specified number of bars, starting from the specified reference point
Bar.lowest(prices:Array, count:int=array.length, start:int)
Parameters
Name |
Type |
Действие |
Значение по умолчанию |
prices |
Array |
Array of prices |
— |
count |
int |
The number of bars (in the direction from the current bar in the direction of increasing the index), among which the search should be performed |
array.length |
start |
int |
Shift of the bar in the array of the smallest value for the specified number of bars, starting from the specified reference point |
— |
Example
export class Main extends Indicator {
constructor() {
super();
}
onInit() {
}
async onUpdate() {
const priceType = 0,
{Time, Open} = await Bar.load([Bar.Mode.Time, Bar.Mode.Open], priceType);
let period = 12, shift = 46;
// Find the smallest value of the Open array in the range from Open [46] to Open [46 + 12-1] (12 array elements)
let LowestIndex = Bar.lowest(Open, period, shift)
let MinOfArrayPart = Open[LowestIndex];
this.print('Lowest bar is at ' + LowestIndex + " and it's value is " +MinOfArrayPart);
}
}