input.float
The decimal counterpart of input.int, with the same nine arguments and const float in place of const int.
Its step carries the same restriction: positional only.
input.float(const float defval, const string title, const float minval, const float maxval, const float step, const string tooltip, const string inline, const string group, const bool confirm) → input float| Parameter | Type | Required | Description |
|---|---|---|---|
defval | const float | yes | The number the control starts at. Required. |
title | const string | no | The label shown beside the control. |
minval | const float | no | The lowest value accepted. May be na to mean unbounded. |
maxval | const float | no | The highest value accepted. May be na to mean unbounded. |
step | const float | no | The size of one increment. May be na to mean unstepped. Positional only, because step is reserved by the grammar. |
tooltip | const string | no | Help text for the control. |
inline | const string | no | A key that puts several controls on one row. |
group | const string | no | A heading the control sits under. |
confirm | const bool | no | Asks the reader to confirm the value. |
Returns input float — An input float.
indicator("Bounded level")
plot(input.float(100.0, "Level", 0.0, 100000.0, 0.5))See also inputs · input.bool · input.color · input.int
Part of the function index.
Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.