NinjaTrader 7 Indicators  True Slope Indicator V1
Username or Email
Password
Forgot
New User Signup (free)
Browse
Register
Downloads / Indicators
Trading Webinars
Articles
Upgrade to Elite
Unanswered Posts
My Posts
Return to Homepage
Today's Posts
Trading Reviews and Vendors
Futures Brokers Reviews
Traders Hideout (general)
Platforms and Indicators
Trading Journals
Elite Trading Journals
Psychology and Money Management
OffTopic
The Elite Circle
Trading Articles
Main Trading Articles Index
Article Categories
Help, Tutorials, HowTo's
Traders and Trading Methods
Platforms, Tools and Indicators
Terms (Glossary)
Article Tools
List New Articles
List Recent Article Changes
Random Article
Most Popular Articles
Category Groupings
Wanted Articles
Most Linked to from Forum
Go to Page...
Quotes
by TradingView
futures io
>
Downloads
>
NinjaTrader
>
NinjaTrader 7 Indicators
>
True Slope Indicator V1
Categories
Show
Search
Help
Search
title and description
keywords
Advanced Search
Winning nominations
What's Hot
What's New
New Ratings
Some Random Entries
Home Category
Up a Level
NinjaTrader 7 Indicators
Indicators in this section are compatible with NinjaTrader 7
Filter
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
0
1
2
3
4
5
6
7
8
9
Entries
1680
DavidBodhi
Login to Download
True Slope Indicator V1
THERE IS A NEW VERSION OF THIS INDICATOR. FIND IT AT:
Download: True Slope Indicator V5
After explicitly and laboriously adding various moving average types, linear regression, etc. to subsequent versions of my slope angle indicator, I finally realized that, in the indicator code, Input[0] refers to whatever price or indicator data series …
At various times, I have wanted an indicator that showed the slope of a line between two price points on a chart. I looked here on the forum for one and found a number of people discussing it, generally attempting to measure the slope of a line they'd drawn on the chart, and realizing that, if the chart is resized in any way, the slope is changed, blowing its usability.
I finally looked at the question independent of the chart. Treating the problem as that of measuring the leftmost angle of a right triangle, with the hypotenuse formed by the price at the starting point and the price at the end point and the right angle at the lower right, I finally found a usage for the trigonometry classes I'd had.
If you know the length of two sides of a right triangle, you can calculate the angles using the inversions of the sine, cosine and tangent functions, the arcsin, the arccos and the arctangent.
Taking the difference in price between the starting bar and the ending bar, converted to ticks, as the height of the side opposite the angle and the number of bars as the length of the side parallel to the bottom of the chart, the leftmost angle can be calculated and it will stay the same regardless how the chart is resized. This gives the 'real' angle, or slope, of a line drawn from the price on the starting bar to a price on the ending bar. Fortunately, the C# programming language contains the arctan function, Atan(), so it was possible to build the math without my brain exploding.
I wrote a NinjaTrader indicator that allows you to choose whether to start on Open, Close, High, Median or Low, to choose whether to end on Open, Close, High, Median or Low and the period, or number of bars, you want to measure. I have uploaded the .cs file, zipped. Just import it, as usual. All the math is contained within the indicator.
No line is drawn on the chart (since it calculates for every bar, you'd potentially have a bazillion confusing lines). Instead a new panel is created with the angle at each bar plotted, between +90 and 90, which would be the angle if you measured price change on one bar.
The usability of this indicator is not as immediately obvious as I expected it to be. However, you can see that, where the plot makes a kind of 'plateau' or trough, price is continuing steeply up or down. With a long period, areas that are usually called 'chop' can be seen, as the angle maintains a value closer to zero.
This is not a lagging indicator, regardless how long the period is. Price movement on the current bar is immediately reflected in the angle. Relatively short periods can be used, for example, in automated trading to help guard against sudden unfavorable price spikes, an intraday nemesis.
I have not tested moving averages of the angle, but those may also be useful, though will add a lag, of course.
(11/25/15) I have found myself using a Linear Regression Channel of the angle indicator and comparing to an LRC of price.)
I may also make an indicator that averages hightohigh, lowtolow, mediantomedian and hightolow angles in an attempt to emulate what the human brain does when we look at a chart. We see all this detailed activity, but the brain sort of fuzzes the image allowing us to immediately see, price going up, price going down, price going nowhere. Seeing the forest, rather than the trees.
If it seems to do the trick, I will post that, as well.
(11/25/15) After further exploration, I realized that the Linear Regression Channel indicator that comes with NinjaTrader does this already, and better than I could.
I hope those of you looking for an angle/slope indicator will find this of some use.
(Doublechecked math. It is correct and you can use it with confidence. Understand that the 2 period minimum actually goes BACK 2 bars, so this version minimally measures 3 bars, including bar 0. 11/19/15)
Category
NinjaTrader 7 Indicators
Details:
True Slope Indicator V1
Category:
NinjaTrader 7 Indicators
November 15th, 2015
Size: 2.53 KB
Downloaded: 317 times
View Download Details
March 25th, 2016 08:02 PM
JoyNinjaTrader
Hi David,
Thanks this could be useful indicator.
However, after installing I am not able to find it in the indicator's list!
Yes, it is installing properly, but it is not visible in the indicator list
or in the list of indicators in the “Edit NinjaScript” panel
… what am I doing wrong…
please advise. Thanks
November 16th, 2015 06:49 AM
tcwairoa
Wow, this is awesome work, thank you.
November 16th, 2015 06:37 AM
stef
Thanks !
Category
The Elite Circle
NinjaTrader
 NinjaTrader 8 Indicators and More
 NinjaTrader 6.5 Indicators
 NinjaTrader 7 Indicators
 NinjaTrader 6.5 Strategies
 NinjaTrader 7 Strategies
 NinjaTrader 6.5 Templates
 NinjaTrader 7 Templates
 NinjaTrader 6.5 Miscellaneous
 NinjaTrader 7 Miscellaneous
MetaTrader
 MetaTrader 4 Indicators
 MetaTrader 5 Indicators
TradeStation
MultiCharts
ThinkOrSwim
Sierra Chart
FXCM Strategy Trader
Matlab Functions
Educational
Free Section
True Edge Awards / Best Products
Trading Webinars Howto's
Trading Reviews & Products
Futures Broker Reviews
NinjaTrader Brokerage (Broker)
NinjaTrader Indicators to Download
Kinetick (Data Feed Provider)
IQFeed (Data Feed Provider)
Bookmap (Trading Software)
NinjaTrader (Trading Platform)
Topstep (Prop Trading)
SharkIndicators (Trading Software)
Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 8339432 (Panama and Intl), +1 8883123001 (USA and Canada),
info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us

Contact Us

Site Rules, Acceptable Use, and Terms and Conditions

Privacy Policy

Downloads

Top