fill(array:Array)
| Name | Type | Действие | Значение по умолчанию |
|---|---|---|---|
| array | Array | 數字數組 | — |
export class Main extends Indicator {
constructor() {
super();
this.buffers = {
bufferMain : this.addBuffer(),
};
}
onInit() {
this.buffers.bufferMain.setColor(Color.Red);
}
async onUpdate() {
const priceType = 0,
{bufferMain} = this.buffers,
{Close} = await Bar.load([Bar.Mode.Close], priceType);
// 用數組值填充 bufferMain Close
bufferMain.fill(Close);
}
}