Download MetaTrader 5
To add comments, please log in or register
Are you used to trading from your smartphone? Mobile version of MetaTrader 5 will suit you best!
Automated-Trading
Admin
97392
Automated-Trading 2014.07.10 10:59 

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

willgart
844
willgart 2014.07.10 22:47  

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.

Roberto Jacobs
45950
Roberto Jacobs 2014.07.11 12:48  
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.

IRWAN173
5
IRWAN173 2017.02.10 18:54  
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.
Roberto Jacobs
45950
Roberto Jacobs 2017.02.15 07:07  
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.
/
To add comments, please log in or register