Lavoro terminato
Specifiche
Hi, this is hopefully the first step of a greater project.
The main idea of this new indicator is that, for any given period of time (or number of candles), the indicator draws two lines :
-One line between current price and highest price in that period, so that all the prices are below that line.
-Another line between current price and lowest price in that period, so that all the prices are above that line.
Thus, the two lines are the two tangents so that all the prices are between those two lines.
Please see the attached draft for further understanding, in this example for the blue line, the line isn't between the current price and the highest price, but between the current price and the price so that the angle with the current price vertical (x value in degree) is the lowest.
For this analysis to take place, it's up to you to find the best technical solution.*
*What I've found on my side is that we can use trigonometry : Let's give for each candle 1 unit value, and for each pip 1 unit value. Let's say the price we want to analyse is 50 candles away from current price and 20 pips higher. So we have the two sides of a perpendicular triangle between horizontal current price and price of candle 50. Opposite value is 20, adjacent value is 50. So tangent value is opposite/adjacent or 20/50 = 0.4. With arctan we can deduce the angle with horizontal is 22° And then we can have x value = 90-22= 69°. If you find another solution as long as it respects the main idea above no problem.
It should be possible to change the time period (or number of candles) in the indicator parameters. But the indicator should work on any chart you want to attach on it.
The development of the project in next step looks toward a multitimeframe analysis in order to make a weighted average of x and y in a multimeframe scale.
The collaboration is completed once the indicator works close to expected behavior and the code is delivered.