well...
there is a bug in the code...
for(j=limit; j>=0; j--)
{
//---
double dayopp=iOpen(symbol,1440,j);
double h4cls1=iClose(symbol,240,j+1);
double m15cl1=iClose(symbol,15,j+1);
double cc0=close[j];
you apply the same J index to different time frames!!!
for example, J=10, so you get the D1 open value there is 10 days ago, the H4 value there is 11* 4 (44h) ago and the 11 * 15 (2h45) ago
so finally you compare values not occurring at the same time...
you should use the iBarShift function to get the correct index for each timeframe.
well...
there is a bug in the code...
for(j=limit; j>=0; j--)
{
//---
double dayopp=iOpen(symbol,1440,j);
double h4cls1=iClose(symbol,240,j+1);
double m15cl1=iClose(symbol,15,j+1);
double cc0=close[j];
you apply the same J index to different time frames!!!
for example, J=10, so you get the D1 open value there is 10 days ago, the H4 value there is 11* 4 (44h) ago and the 11 * 15 (2h45) ago
so finally you compare values not occurring at the same time...
you should use the iBarShift function to get the correct index for each timeframe.
Well...
Thank you, my friend Willgart.
That's not a bug, and it is my intention, as you describe it.
And indeed, my indicator not made a mistake in calculating the degrees in the chart.
But, I will try to use the code as you suggest, and then we will see the result.
Regards.
Thank you.
Thank you.
(270 degree) plus(+) ((price_close minus (-) bottom is window price min)) / (top is window price max) minus (-) bottom (window price min)) * (180 degree))
in the sphere degrees, the lowest degree is 270, and the top was 90 degrees, the distance from 90 degrees to 270 degrees down is 180 degrees.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Forex Indicator Price Degrees with Trend Alerts:
This indicator will write value degrees of the lastest position of price at the current timeframes, and when position and condition of trend status was changed, the indicator will give an alerts.
Author: 3rjfx