Job finished
Specification
I need a custom ATR indicator for MT4.
It will make the same volatility calculations as of a standard ATR,but with the key difference that it will have the option for a specific time frame to be chosen and then it will take this time frame candle values only and make the calculations for the last x periods.
For example,I'm choosing 16:30 - 19:30 as a time frame;then the bars only for this specified time frame are taken into account and depending of the specified ATR period and the periodicity set in MT4 (1m,5m,15m...etc) the indicator will calculate x days back and draw the according graphic on each time frame(in our example 16:30-19:30)
Continuing with the above example,say I want to see the volatility for 30 days period based on 5min candles.Then I'll set the periodicity in the price chart to M5 and the indicator will have the following input parameters:
1.start_hour (set to 16)
2.start_minute (set to 30)
3.end_hour (set to 19)
4.end_minute (set to 30)
5.ATR_period (set to 1080)
Thus,the ATR_period input parameter will allow me to enter the number of the bars I need to represent a 30 day period.When on M5 price chart,there are 12 bars per hour*3(our time frame in this example)=36.We need to see the volatility for 30 days so,36*30=1080 will be the number to be entered in"ATR period"
Or,as a similar scenario,but on a 1 minute graphic,I'll be entering the number 5400 in the ATR_period input parameter and the indicator will calculate the same time frame volatility(giving I've set the start/end parameters to 16:30 - 19:30 again) for the same number of days (30) but this time based on 1min. candles and draw the according graphic.
the graph itself will represent the calculations and therefore will be drawn on each time frame;following the above example it will start at 16:30 and end in 19:30 on each and every of the last 30 days.
The above is only an example.I need the indicator to work on every periodicity (1m,5m,15m...etc) and have the full history available in MT4 to make calculations(not only for 30 days if that was unclear).
After finishing,the custom ATR will need to be incorporated(connected to) into another custom indicator I already have. It has an input parameter "ATR multiplier" and I'll need this new custom ATR to be selected when the parameter is set to "true".