Indicators: Forex Indicator Price Degrees with Trend Alerts

 

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.

 Forex Indicator Price Degrees with Trend Alerts

Author: 3rjfx

 

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.

 
willgart:

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.

 
I was very impressed with this indicator.

There is one thing I want to ask, in terms of calculating the degree of the graph.
How calculation basis, whether this indicator will automatically measure the degree of TOP or BOTTOM a wave of price to the price of the current operation?

Thank you.
 
IRWAN173:
I was very impressed with this indicator.

There is one thing I want to ask, in terms of calculating the degree of the graph.
How calculation basis, whether this indicator will automatically measure the degree of TOP or BOTTOM a wave of price to the price of the current operation?

Thank you.
basic calculation formula is:

(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.
 
Hello Roberto, i got difficulties to check the rounded color and arrow color. Might be because of my age :-) . It will more helpfull if we get text information or dashboard for all timeframe, indeed i get text information when notification occur. I mean text information on chart, because the notification is so sensitive. By the way, thank you for this useful indicator. I like so much this classic mathematical indicator.
Reason: