NexusFi: Find Your Edge


Home Menu

 





Slope of an indicator, frustrating =/


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Zeos6 with 7 posts (2 thanks)
    2. looks_two Fat Tails with 5 posts (14 thanks)
    3. looks_3 gonzofist with 5 posts (1 thanks)
    4. looks_4 DavidBodhi with 5 posts (1 thanks)
      Best Posters
    1. looks_one Fat Tails with 2.8 thanks per post
    2. looks_two NJAMC with 1.3 thanks per post
    3. looks_3 Big Mike with 1 thanks per post
    4. looks_4 otterway with 1 thanks per post
    1. trending_up 24,841 views
    2. thumb_up 35 thanks given
    3. group 12 followers
    1. forum 47 posts
    2. attach_file 7 attachments




 
Search this Thread

Slope of an indicator, frustrating =/

  #41 (permalink)
 
DavidBodhi's Avatar
 DavidBodhi 
Milwaukee, WI, USA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: Equities
Posts: 209 since Oct 2014
Thanks Given: 23
Thanks Received: 207


Fat Tails View Post
Your approach will not work. The problem here is that the angle that you have to use will depend on the chart type select and on the instrument selected. So you have to find out the appropriate angle for each instrument and timeframe. With this restriction portfolio backtesting becomes impossible, as each instrument will needs it own angle.

What you need to do is to normalize the steepness. This means you need to move away from all geometrical concepts and trigonometric functions and understand that slope is just a visual proxy for momentum. Go back to momentum or rise over run, and calculate the average momentum over a period of N bars. In a second step you need to put that average momentum in relation to volatility. Ticksize is no good proxy for volatility, but the average true range certainly is.

All you need to do is to divide the average momentum by the average true range. When momentum is high compared to intra-bar volatility, this is a steep move. When it is low compared to intra-bar volatility, it is a weak move.

All technical traders who have come up with geometrical concepts have basically failed. That includes that square of nine stuff as well as the Polarized Fractal Efficiency (what a fancy name for a piece of misapplied geometry). Just look for the average momentum (as William Blau did for his indicators) and compare to volatilitily, and you have a sound concept that you can use across all instruments and timeframes and that is fit for portfolio backtesting as well.

I think I understand your comment about volatility and momentum, now. A 'chop' indicator.

There are limits to my ambitions and that's past mine. I'll be pretty happy if I can just do a decent job of plotting the virtual angle of a linear regression channel.

Follow me on Twitter Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Better Renko Gaps
The Elite Circle
MC PL editor upgrade
MultiCharts
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
18 thanks
  #42 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


DavidBodhi View Post
I think I understand your comment about volatility and momentum, now. A 'chop' indicator.

There are limits to my ambitions and that's past mine. I'll be pretty happy if I can just do a decent job of plotting the virtual angle of a linear regression channel.

Dividing an averaged momentum by the average true range is mathematically easier than calculating an angle.

In case that the average true range holds the value zero, you would need to set the value to zero directly to avoid division by zero.

Reply With Quote
  #43 (permalink)
 
DavidHP's Avatar
 DavidHP 
Isla Mujeres, MX
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Ninjatrader / Optimus Futures / AmpFutures
Trading: ES / 6E / 6B / CL
Frequency: Every few days
Duration: Minutes
Posts: 1,611 since Aug 2009
Thanks Given: 11,341
Thanks Received: 2,744



Fat Tails View Post
Dividing an averaged momentum by the average true range is mathematically easier than calculating an angle.

In case that the average true range holds the value zero, you would need to set the value to zero directly to avoid division by zero.

Hasn't this already been done?

I don't remember where, but seems as if I have seen this logic in an indicator.

Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Follow me on Twitter Reply With Quote
  #44 (permalink)
 
trendwaves's Avatar
 trendwaves 
Florida
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader 8
Trading: ES, NQ, CL
Posts: 703 since Dec 2012
Thanks Given: 2,898
Thanks Received: 2,525


Be Patient and Trade Smart
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #45 (permalink)
 
trendwaves's Avatar
 trendwaves 
Florida
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader 8
Trading: ES, NQ, CL
Posts: 703 since Dec 2012
Thanks Given: 2,898
Thanks Received: 2,525

I put together a quick indicator (literally 1 line of code) I named "Relative Momentum" for a lack of a better term off the top of my head, but it simply plots Momentum / ATR.

I added a rough "chop zone" (+-2) around the zero line. Above the chop zone indicates trending up, and below trending down.


Be Patient and Trade Smart
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #46 (permalink)
 
DavidBodhi's Avatar
 DavidBodhi 
Milwaukee, WI, USA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: Equities
Posts: 209 since Oct 2014
Thanks Given: 23
Thanks Received: 207


Fat Tails View Post
Dividing an averaged momentum by the average true range is mathematically easier than calculating an angle.

LOL

In that, sir, you are utterly correct.

I'll make a plot of that and see what it tells me.

Follow me on Twitter Reply With Quote
  #47 (permalink)
 Davydh 
Hastings, New Zealand
 
Experience: Intermediate
Platform: Ninjatrader
Trading: Futures
Posts: 3 since Aug 2022
Thanks Given: 2
Thanks Received: 0

Can I ask if the RelativeMomentum indicator is available anywhere?


trendwaves View Post
I put together a quick indicator (literally 1 line of code) I named "Relative Momentum" for a lack of a better term off the top of my head, but it simply plots Momentum / ATR.

I added a rough "chop zone" (+-2) around the zero line. Above the chop zone indicates trending up, and below trending down.



Reply With Quote
  #48 (permalink)
 
DavidBodhi's Avatar
 DavidBodhi 
Milwaukee, WI, USA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: Equities
Posts: 209 since Oct 2014
Thanks Given: 23
Thanks Received: 207


gonzofist View Post
I am just starting to learn ninjascript (unsuccessfully), I wonder if someone could help.

I am trying to make an indicator that will return the slope value of a EMA or ADX or whatever I define and only the slope value.

I will be using it in Market Analyzer and every slope indicator I have tried to use ends up just pulling in the price in analyzer table.

I did manage to get "SlopeSimple" to pull in just the slope, but it wasn't normalized across different tick sizes, so I had very different numbers depending on the instrument.

I haven't quite figured out the structure of a indicator script, so pasting full code would be super super awesome .



Hello, gonzofist.

Have you tried SlopeAngleV1 at ?

It will plot the angle of the slope measured over X number of bars and can be applied to other indicators, as well as price. The plotted line is fully accessible to external strategies and indicators, including the Market Analyzer.

It treats each tick as a vertical unit and each bar as a horizontal unit when calculating slope, so should be normalized for whatever you use it on. Also, it outputs values in degrees rather than radians or other more arcane measurements.

Follow me on Twitter Reply With Quote




Last Updated on April 10, 2023


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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
no new posts