Auftrag beendet
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Spezifikation
The indicator will draw two lines in the same area (window) where the standard ATR's appear.
Line 1 will represent the ratio(quotient) between the results of two standard ATR indicators set to different time frames and periods.
Line 2 will be a straight line drawn at a predetermined value depending of the time frame settings chosen for line 1.The said value will either be hard coded into the code (I'll send a table with all values - a total of 28) or,if easier to implement I'll give the formula for calculation which is simple enough -
{sqrt (time frame 1/time frame 2 )}/10 000 ,where time frame 1 is the time frame set for ATR1 converted in minutes and time frame 2 is the time frame set for ATR2 converted also in minutes.The numerator(time frame 1) will always be a larger number than the denomerator(time frame 2) because we are only interested in these ratios,i.e days to hours,4 hours to 30 minutes,etc.
The input parameter variables will be:
1. ATR1 period
2. ATR1 Time frame : 1D, 4H, 1H, 30 min, 15 min, 5 min, 1 min
3. ATR2 period
4. ATR2 Time frame: 1D, 4H, 1H, 30 min, 15 min, 5 min, 1 min
So:
for line 1,the indicator will not take into account the current time frame in the chart in our MT,but will take the results of ATR1,divide it to the result of ATR 2 ,and will display the final result.
For line 2 it will draw the straight line,either by reading a pre-calculated for each combination of time frames for the two ATR's value,or will calculate it according the above mentioned formula - whichever is easier.
This indicator will be the basis.At a later stage we will ask for some minor changes for additional fee implemented to it , but first we'd like to see this one up and working.
P.S.
There is an error in the description regarding the calculations - the results of the two ATR's will first have to be converted to whole numbers rather than pips(multiplied by 10 000) and then the quotient results will be divided back by 10 000 for the results to have the same dimensions as the straight line.
Or,first the quotient will be calculated and then the result will be divided by 10 000.