How to use the Bid Ask Diff keyword (example) — Tradetron Community
← Community

How to use the Bid Ask Diff keyword (example)

Keyword help 1,111 views

gikhan

how to use Bid Ask Diff
please give 1 example

Tradetron Team Tradetron team

Bid Ask Diff returns the gap between the best ask and the best bid of the selected instrument. Use it as a simple liquidity filter, so the strategy only trades when the spread is tight.

Example: only enter if the spread is 1 rupee or less:

Bid Ask Diff(<option instrument>) <= Number(1)

AND it with your normal entry condition.

Things to know:

  • It returns a value only when the bid/ask changed on the last tick; otherwise it returns 0. So pair it with another check rather than relying on it alone.
  • Bid/ask keywords are not supported in backtests. Test it in Live Offline.

:sparkles: Answer written with AI from Tradetron docs (Oct 2026). Original replies are kept above. Spot something wrong? Reply below.