Ray Tool
Created at 16 May 2013, 14:33
Ray Tool
16 May 2013, 14:33
When using the ray tool, what is the formula you are using to calculate the angle?
Replies
cAlgo_Fanatic
22 May 2013, 15:05
No. (-deltaY, deltaX) are window coordinates. If you set the ray and then modify the chart scale alone the angle value will change.
@cAlgo_Fanatic
cAlgo_Fanatic
21 May 2013, 17:31
var angle = (int) (Math.Atan2(-deltaY, deltaX) * 180 / Math.PI);
It's calculated in pixels in current chart scale. If you want to do it in cAlgo API, it's impossible because we do not operate with pixels there.
@cAlgo_Fanatic