![]() |
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Nov 2007
Posts: 388
Thanks: 0
Thanked 0 times in 0 posts
|
Hi,
I'm trying to write an indicator to figure certain "angles" of lines. I figure if I can draw a line from point "A" to point "B" I should be able to determine the angle (in degrees) from that...unfortunately math/trig isn't my strongpoint. I've got the following coded and it compiles just fine, but I'm not getting proper output...any input greatly appreciated. DrawLine("tag1", true, 1, SLOPEREG[1], 0, SLOPEREG[0], Color.LimeGreen, DashStyle.Dot, 2); CALC = ((SLOPEREG[0] - SLOPEREG[1]) / (CurrentBar - (CurrentBar - 1))); LANGLE = System.Math.Atan(CALC) * 180 / Math.PI; |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
I recall someone working on the same issue on this forum. Please try search for "angle"
Dierk
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Session times/bar calc | nicko9 | Market Analyzer | 5 | 05-25-2009 12:55 AM |
| Slppe/Angle of indicator | AO76 | Indicator Development | 6 | 07-09-2007 10:22 PM |
| Trade Angle Strategies Launches Real-time Trading Software on NinjaTrader Platform | NinjaTrader_Ray | News and Announcements | 0 | 06-20-2007 02:55 PM |
| Need help with a condition to check the angle of an MA | NinjaTrader_Ray | Strategy Development | 2 | 06-08-2007 02:00 PM |