# Pine Script inputs for optimization: min, max and step Slug: pine-script-inputs-for-optimization-min-max-and-step. Canonical: https://tradingtune.com/blog/pine-script-inputs-for-optimization-min-max-and-step ## Summary Use Pine Script integer inputs to set valid bounds, then define a separate range and step for an optimization run. ## Key facts - An integer input exposes a whole-number value that a strategy can use in its calculations. - Pine input bounds limit valid values, while the optimization range selects values to test. - The Pine input step controls the widget arrows, not the optimizer's search spacing. - A useful test record includes the script version, input ranges and backtest conditions. ## Outline - How does an integer input fit into an optimization test? (#how-does-an-integer-input-fit-into-an-optimization-test) - What do the input declaration and its arguments mean? (#what-do-the-input-declaration-and-its-arguments-mean) - Is the Pine step the same as the search step? (#is-the-pine-step-the-same-as-the-search-step) - How do script bounds differ from the range of a run? (#how-do-script-bounds-differ-from-the-range-of-a-run) - Does changing the input actually change the strategy? (#does-changing-the-input-actually-change-the-strategy) - What type and qualifier checks prevent confusing inputs? (#what-type-and-qualifier-checks-prevent-confusing-inputs) - What does a manual parameter sweep involve? (#what-does-a-manual-parameter-sweep-involve) - How can a reader check the result without overreading it? (#how-can-a-reader-check-the-result-without-overreading-it) - Sources (#sources)