Slider - MetaTrader 4 Script | Forex Indicator Download - MT4/MT5 Resources - MetaTrader 5 Resources



Quickly and easily adjust the period (and other values) of a technical indicator by using up to 4 visual "sliders" in the chart window - without manually changing the values in the input window or even taking your eyes off the indicator.
Each slider consists of up to 50 individual boxes along the horizontal line of the chart window. Each box has an associated value. There is a circular "mark" or "token" that can be placed in any box to select that value. The selected values are then applied to the parameters of the selected indicator in a separate window and the indicator is updated automatically. This indicator uses MT4 chart objects and does not use DLL.
External variables allow you to choose the number of sliders to display (up to 4), the values at which each slider starts and ends, the value increment between each subsequent box (up to 50 boxes per slider), the description and color associated with each slider, the number of bars to count in the indicator and whether to display the X and Y coordinates of the first marker. Slider values can include decimals and/or negative numbers.
Chart objects appear as labels and therefore will stick to the window. The object position is set by X and Y coordinates. The default settings for these coordinates are described in the code and can be easily adjusted (requiring recompiling).
The default indicator is Stochastic. If you want to use a different indicator, enter the relevant code in lines 448-451 and just replace one of the parameters with the relevant slider array.
If you want to use the indicator displayed in the chart window, change line 34 to "#property Indicator_chart_window".
The slider value only updates once per tick. If you want to use this feature when there are no quote changes (such as weekends), then you will need to update the chart in another way. One way is to simply press Alt+C+R. Another way is to use a separate script that will automatically publish "fake ticks" as described here: http://forum.mql4.com/35406/page2#373533 .

Author: clerin6 (aka mimp)
Attachment download
📎 Sliders.mq4 (22.66 KB)
Source: MQL5 #10875
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •