SPREAD
The gap between ASK and BID, in pips. Most brokers quote fractions of a pip, so expect one decimal place, such as 1.4.
declare const SPREAD: number;A wide spread makes every trade start further from break-even. Many strategies skip entries when it is wide.
Example
Section titled “Example”function onIntervalClose() { if (SPREAD > 2) return; if (OPEN_POSITIONS_COUNT === 0 && rsi(14) < 30) { openPosition("BUY", { quantity: 1000, stopLossPips: 20 }); }}