Ask
Syntax
Ask(): numberReturn Value
Description
Example
// Get current ask price
const currentAsk = this.api.Ask();
console.log(`Current ask price: ${currentAsk}`);
// Calculate spread in points
const spreadInPoints = (this.api.Ask() - this.api.Bid()) / this.api.Point();
console.log(`Current spread in points: ${spreadInPoints}`);
// Use in trading decisions
if (this.api.Ask() < resistanceLevel) {
// Price is below resistance
// Consider long position
}Last updated