Pine Script Indicator Adjustment

Job ID: 40104026

Budget: ₹1,500 – ₹12,500 INR

I already have a fully-working TradingView indicator written in Pine Script v5, but I need its calculation logic to become more flexible. The core formulas stay the same; what changes is how the script handles user inputs. In short, I want to expose a few parameters that are currently hard-coded so I can fine-tune them from the settings panel instead of editing the code every time.

You’ll receive the current .pine file plus a short note describing which constants should be turned into inputs and the default values I’d like to keep. Your task is to refactor the existing logic to read those values from `input()` declarations, make sure the calculations still line up with the original results when defaults are used, and update any dependent variables or plots accordingly.

Please deliver the revised script, clearly commented where changes were made, so I can paste it straight into TradingView and confirm everything compiles without warnings.
Related categories: Algorithm Metatrader Scripting Pine Script