Current

Current values of constants and variables

Description

Used in the method onUpdate class Indicator
or onTick class TradingBot to get the current values of constants and variables

Example

export class Main extends Indicator {
     constructor() {
         super();
     }

     onInit() {
     }

     async onUpdate() {
         this.print('Current.Ask=' + Current.Ask);
         this.print('Current.Bid=' + Current.Bid);
         this.print('Current.Digits=' + Current.Digits);
         this.print('Current.Point=' + Current.Point);
         this.print('Current.Symbol=' + Current.Symbol);
         this.print('Current.Time=' + Current.Time);
         this.print('Current.TimeFrame=' + Current.TimeFrame);
     }
}

Elements

const
Ask The latest known seller's price (ask price) for the current symbol.
Bid The latest known buyer's price (offer price, bid price) of the current symbol
Digits Number of digits after decimal point for the current symbol prices.
Point The current symbol point value in the quote currency.
ScriptId The current script id
Symbol Symbol
Time The latest known time
TimeFrame Current TimeFrame