The smallest tradable quantity of the symbol, such as 0.0001 for a coin or 1 for a share.
syminfo.mincontract is a simple float: the smallest size you can order in the symbol's own units. It is 1 for whole shares or futures contracts and a fraction for crypto and some CFDs.
Use it to round a computed order size down so the broker accepts it.
Type
simple float
Remarks
- Round down, not to the nearest: rounding up can exceed the risk you sized for.
- On Sidechair: not supported yet; a script that reads
syminfo.mincontractstops with the error "syminfo.mincontract" isn't supported yet.
Example
//@version=6
strategy("Sized entry", overlay = true)
risk = strategy.equity * 0.01
raw = risk / math.max(close - low, syminfo.mintick)
qty = math.floor(raw / syminfo.mincontract) * syminfo.mincontract
if ta.crossover(close, ta.sma(close, 20)) and qty > 0
strategy.entry("Long", strategy.long, qty)See also
Not on Sidechair yet