
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
1) You must not have tested the script I posted.
2) The angle is being used in a geometric sense, not in an engineering sense. The data types used to create the chart are not relevent to the math subsequently applied to that chart.
3) Because the charts are different charts constructed using different algorithms so of course they are different.
Angulo=MathArctan((Close[0]-Close[Periodo])/Pipactual/Periodo*unit)*57.29577951;
57.29577951= 180/3.1415
unit will be the measure in pips that you think the "distance" between one candle the other is!!!-
you see what i am saying?---time can not be measure in pips, but you can try....I did it and it serves my purpose.
this is getting very subjective!!!---visually in my chart for 1M, I gave it unit=5 (pips) = 1Min.
I found this discussion very enlightening, actually, so thanks for that.
Whilst it may not be strictly "mathematically sound" and either position could be correct, my purpose for needing this snippet of code is to simply create a way to measure the slope degree of a line starting at 0 degrees (much like a standard protractor), with the mid point of the line being the centre of gravity (e.g. a 30-period trend line has a mid point of 15 periods).
I will then use this to gauge the direction and basically the acceleration/decelleration of a trend. i.e. is the trend getting steeper (breakout) or flattening (people losing interest/taking profits), much like an altimeter in an aircraft. I basically only want to know how much a line is pivoting from it's horizon line in degrees, therefore, are we going up or down.
Whilst I agree that different timeframes may show different gradients based on two fixed points in time and that the scale of the chart affects the gradient when using fixed points that move when switching timeframes and zooming in/out, thouh this becomes irrelevant when using a line more as a free-standing altimeter/ROC/ROD type of arrangement to attribute flatness/steepness of a gradient against volume and directionality of trend.
If a line is horizontal, the market is trading side-ways. If it's going from bottom left to top right it's trending up and top left to bottom right, it's downtrending.
Anything that's between 0 and 45 degrees (y=0 degrees) is a steep trend up. 46 to 90 is a gentle trend up, 91 and 135 gentle downtrend, and 136 to 180 degrees the trend is steep decline.
I'm sure most people that went through the GFC or have ridden a big short down whilst in a long position would have liked to have known their "altitude"...
The mathematics is actually perfect as a filter for use with other indicators to simply gauge the "direction" of the market. Used with Bollinger Bands it can be a great way of assisting with finding the bottoms and tops of trends, especially when used with volume. i.e. the trend is coming to an end when the volume has dropped and the gradient line is reaching horizontal, much like a see-saw.
The way I see it is that if you can simply pick the direction of the market with reliability every day (on any timeframe), you will be a successful trader, all the fancy coloured indicators aside.