Custom Volatility Calculator with Range Lines
- Indicators
- Version: 2.0
- Activations: 7
Calculates average price volatility for any custom time period and displays range lines (eg. opening ranges) that remain fixed after changing timeframe. Trade opening range breakouts and reversals and set achievable TPs within expected volatility.
Up to five custom time periods allowed per day, each with their own vertical start lines, horizontal range lines, and average volatility calculations. Customize the visual lines by colour and line width, and give custom names to each time period + set time alerts for the vertical lines (defaults = the opening times of the major trading sessions at GMT+2 server time). Show or hide the on-chart text display for the average volatility calculations.
This handy indicator offers three very useful tools for day trading:
1. Calculates the average volatility or expected price movement of any custom time period starting at any time and finishing at any time of day. This allows you to set realistic and achievable TP targets for your trades based upon expected price movement from the opening time of the trade or from the start of trading sessions etc. Results in points are displayed as text on chart (can be hidden). Expected volatility is recalculated when you change timeframes, so you can quickly see different volatility ranges by cycling through different timeframes in MT4 (e.g. 5 min / 15 min / 30 min / 1 hour etc...). Results in points defined as per the MT4 Crosshair tool (last digit of your broker's price quote for each symbol).
2. Draws Range High and Range Low lines for each custom time period and extends the horizontal lines until end of day (e.g. opening 5 / 15 / 60 minute session ranges). Range lines remain fixed after initial drawing, regardless of changing timeframes. You can switch range lines on/off and choose to draw only until end of day or fully extend across the chart.
3. Draws vertical lines at the start of each custom time period (up to five per day) and displays them historically over the number of days in the History used for the average volatility calculations. Useful for analysing historical price action at the same times each day. Vertical lines also have alerts. If Range Lines are switched on they will also be displayed in a matching colour throughout the History.
HOW TO USE
Set your custom time periods using the following method:
1. Specify a start time for up to five custom time periods and name each one
a. Inputs = START TIME + CUSTOM LINE NAME
2. Specify a number of bars on the chart timeframe that corresponds to your required time period (e.g. 20 bars on M1 = 20 minutes / 3 bars on M30 = 90 minutes / 2 bars on H1 = 2 hours etc.). The number of bars is counted from the start time for each custom period.
a. Input = TIMEFRAME BARS
3. Specify the number of History days for the average volatility calculations and the historical display of lines (e.g. 10 = the average price movement during the custom time period over the last 10 days)
a. Input = HISTORY (DAYS)
INPUT SETTINGS
History (Days) = 10 default. The number of days used for the average volatility calculations and for the historical display of vertical start lines and horizontal range lines (if enabled)
Timeframe Bars = 1 default. The number of bars on the chart timeframe to specify the duration of each custom time period. Using default 1 allows you to quickly see multiple volatility calculations just by changing timeframes in MT4 (volatility calculation results are updated on chart for each timeframe). Timeframe bars are counted from the Start Time of each custom period.
Example: If START TIME = 09.30 and TIMEFRAME BARS on M30 chart = 2, then the average volatility calculation and the Range High/Low lines will be displayed for the time period from 09.30 to 10.30. Refine your custom periods using different timeframes and number of timeframe bars (e.g. 20 Timeframe Bars on M1 = 20 minutes / 3 Timeframe Bars on M30 = 90 minutes etc.).
Display Text Colour = select from colour palette to choose the text color for on-chart display of the average volatility calculations
Display Text Size = 10 default. Change the font size of the text display
Pin Text to Corner = select from dropdown list to choose which corner to anchor the text
Move X Axis = shift text horizontally from the corner
Move Y Axis = shift text vertically from the corner
Hide Text = false default. True = hide average volatility results
Draw Range Lines = True default. Draw or Hide horizontal Range High and Range Low lines. Range lines are fixed after first draw, so use the correct timeframe and number of timeframe bars to define your range before changing timeframes (e.g. 1 Timeframe bar on M15 = 15 minute range). Then you can drop down to M1 / M5 to monitor for FVG breakouts or failure-to-displace reversals etc.).
Draw Ranges Until Day End = True default. True = stop drawing range lines at the end of each day. False = display horizontal lines across the entire chart
Show Custom Period 1 = True/False. Enable or disable each of the 5 custom periods available each day
Start Time = XX:XX Specify the server start time for each custom period (and for alerts if enabled)
Custom Line Name = Type your own custom name for each time period. The custom name will be displayed on chart for the volatility calculations and in the alerts text.
Line 1 Colour = select from colour palette to choose a different colour for each vertical line and matching horizontal range lines
Line Size = 3 default. Choose your preferred line thickness
Repeat for Custom Periods 2 – 5. Use different colours and custom names for each time period.
Pop Up Alerts = True/False. Alerts apply to each active custom period and are sent when the vertical start line is drawn. Alert text includes the Start Time, Custom Line Name, and the average volatility calculation for the custom time period (up to and including yesterday) according to your current settings. This allows you to know the expected price movement of the custom period without looking at the charts, and can also be used as a trading alert for your strategies (e.g. start trading / check the chart etc.)
Sound Alerts = True/False
Sound File = select file
Email Alerts = True/False
MT4 Push Notifications = True/False (alerts to your mobile Metatrader app).
