I'm trying to convert this indicator to run on TradingView:
https://www.mql5.com/en/market/produ...20#description
The calculation seems straightforward but I'm getting really absurd numbers from this calculation. The steps for calculation are clearly shown on the image attached.
Here's what I do to find the correct sin value of the angle "a":
https://www.mql5.com/en/market/produ...20#description
The calculation seems straightforward but I'm getting really absurd numbers from this calculation. The steps for calculation are clearly shown on the image attached.
Here's what I do to find the correct sin value of the angle "a":
- Find the close of the bar that the latest fractal appears on
- Find the close of the latest bar (3rd bar from the fractal in the picture)
- Subtract close of the fractal bar from the close of the latest bar, this gives us the value "b"
- The latest bar is 3 bars away from the fractal bar, this gives us the value "h"
- To find the value "c", do a basic hypotenuse calculation thus c = SQRT(h^2 + b^2)
- SinFractal = 100 * (b / c)
This should do the trick but I'm getting very small numbers and the graph I draw on TradingView is hugely different from what I see on MetaTrader.
Any ideas about what I'm doing wrong here?