Download MetaTrader 5

Modified Center of Gravity

To add comments, please log in or register
Rhyane
17
Rhyane  

Hello to all,

I am looking to modify the center of gravity so that it shows degrees for the no-curve parameter. If there are any gifted programmers around willing to do this for free and post it, that would be great.

'the parameter 'm' is the degree of the poly, i.e.

-- m=1 is linear regression (straight line), i.e. operates the same as MT4's built-in linear regression facility

-- m=2 is a second degree ('quadratic'), hence there is only one turning point (bend in the curve)

-- m=3 is a third degree ('cubic'), hence there are two turning points

-- m=4 is a fourth degree ('quartic'), hence there are three turning points

and so on.

I'm not sure if it is possible to get a degree out of a curved parameter so the linear regression (straight line) slope/angle is what needs to be used.

The value scale would be from -90degrees, a complete vertical line below a 0 degree median to 90degrees above a 0 degree median. I would prefer if the value showed 2 decimal points ie. -34.85degrees. So depending on the angle of the slope, a value would be calculated and shown in the top left of the screen. It would follow the Center of Gravity.

It would be much appreciated if anyone is willing to take this on. Thanks for your time.

Kas1

Files:
whroeder1
16347
whroeder1  
Kas1:
Hello to all,I am looking to modify the center of gravity so that it shows degrees for the no-curve parameter. Kas1

Angle is a measurement of X vs Y. But on a chart you have Price/Time, TWO different units, angle has no meaning. In addition just change the scale of either, the perceived angle will change.

Slope on the other hand is fine. You get pips/bar.

#define base 2

double I0 = Icustom(..., 0),

I1 = Icustom(...., base),

slope = (I0-I1)/base;

To add comments, please log in or register