In the documentation for the Slope method on this page:
http://ninjatrader.com/support/helpG...-us/?slope.htm
It says:
Method Return Value
This method returns a double value between 1 and -1 indicating the slope of a line.
However when debugging a strategy and I have printed the slope value using the following code:
Print(String.Format("GannHiLow: {0} Middle Bollinger: {1} Slope Fast: {2} Slope Slow: {3} Bar Index: {4}", _gannHiLoActivator.HiLo[1], _bollinger.Middle[1], Slope(_smaFast, 5, 0), Slope(_smaSlow, 20, 0), CurrentBar));
GannHiLow: 10754.15
Middle Bollinger: 10758.7142857143
Slope Fast: 2.24285714285725
Slope Slow: 1.13142857142857
Bar Index: 198
So you can see that the doco says the value retuend is between 1 and -1, yet I am getting values of 2.24285714285725 and 1.13142857142857, both of which are greater than 1.
So which is correct, the output of the Slope method or the documentation?
Regards,
Scott
Comment