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 =/

  #21 (permalink)
 
cme4pif's Avatar
 cme4pif 
Near Vancouver BC CANADA
 
Experience: Intermediate
Platform: NinjaTrader -- IB
Trading: Futures
Posts: 32 since Mar 2011
Thanks Given: 28
Thanks Received: 58

FatTails is right, unless you calculate slope the way they do at Stockcharts.com Their slope is based on a liner regression channel, it is not based on scale and it does not change if you change the chart dimensions. I find it is a very useful indicator. Details can be found here:
Slope - ChartSchool - StockCharts.com

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Exit Strategy
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
How to apply profiles
Traders Hideout
MC PL editor upgrade
MultiCharts
NexusFi Journal Challenge - May 2024
Feedback and Announcements
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
48 thanks
Just another trading journal: PA, Wyckoff & Trends
34 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
  #22 (permalink)
 
NJAMC's Avatar
 NJAMC 
Atkinson, NH USA
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader 8/TensorFlow
Broker: NinjaTrader Brokerage
Trading: Futures, CL, ES, ZB
Posts: 1,970 since Dec 2010
Thanks Given: 3,037
Thanks Received: 2,395

Sorry,

Saw Slope and wanted to point to the Wiki:
Concept of Slope/Angle in indicators - Big Mike's Trading Forum

Nil per os
-NJAMC [Generic Programmer]

LOM WIKI: NT-Local-Order-Manager-LOM-Guide
Artificial Bee Colony Optimization
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #23 (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



cme4pif View Post
FatTails is right, unless you calculate slope the way they do at Stockcharts.com Their slope is based on a liner regression channel, it is not based on scale and it does not change if you change the chart dimensions. I find it is a very useful indicator. Details can be found here:
Slope - ChartSchool - StockCharts.com

Slope is just a visualization of momentum. With scalable software it is important to measure momentum or slope in a way that it is independant from the vertical or hoizontal chart compression.

n-period Momentum = Price change over n bars (close-to close)
rise-over-run = Price change over n bars divided by the number of bars (Momentum divided by the number of bars)
slope (according to chart school): Momentum is replaced by the linear regression line over n bars

Example: The chart attached shows the Momentum over 10 bars. the momentum oscillates between +3 and - 3 points. If you divide that by 10 - the number of bars - you get what Stock Charts calls rice over run. It is the same indicator, but now oscillating between + 0.3 and - 0.3. The LinRegSlope also oscillates between +0.3 and -0.3, but is a bit smoother, which is of course is the result of the regression (that is what regression lines are good for).

So you can simply use the LinRegSlope, which is identical with the slope suggested by ChartSchool. It is a NinjaTrader default indicator.



Reply With Quote
Thanked by:
  #24 (permalink)
 Zeos6 
Toronto, Ontario, Canada
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts, TradeStation, E-Signal
Broker: Amp Futures/CQG; TransAct Futures
Trading: Currency Futures, Commodities Futures, Bonds, Stocks, Indices
Posts: 16 since Jan 2011
Thanks Given: 0
Thanks Received: 1

Actually, it is possible to do the slope calculation the way you want. You just need to convert to actual distances in inches and take the ratio. The distances can be obtained from the screen resolution via a Graphics object.

Reply With Quote
  #25 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,446 since Jun 2009
Thanks Given: 33,217
Thanks Received: 101,610


Zeos6 View Post
Actually, it is possible to do the slope calculation the way you want. You just need to convert to actual distances in inches and take the ratio. The distances can be obtained from the screen resolution via a Graphics object.

You have missed the point.

A dynamically scaling chart determines its maximum height by the range of price shown within the region of the window. Measuring slope in this way is pointless, because it will change bar by bar.

See here:


This has been discussed at great length a hundred times.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #26 (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


Zeos6 View Post
Actually, it is possible to do the slope calculation the way you want. You just need to convert to actual distances in inches and take the ratio. The distances can be obtained from the screen resolution via a Graphics object.

@Zeos6: That is a fallacy. May I cite the mathematician and great trader William Eckhardt from a paper which he had written as a response to the publication of an inconsistent indicator, the "Polarized Fractal Efficiency".

"RIGHT ANGLE INCLINATIONS
The fallacy concerning the sizes of angles in a bar chart or price graph arises from ignoring price/time heterogeneity. As an example, consider the claim that a major downtrend and the subsequent uptrend tend to be at right angles to each other. In Figure 1, the first chart conforms to the right-angle rule; in Figure 2, the uptrend falls short of the right-angle projection; in Figure 3, the uptrend exceeds the projection. The problem: These are all charts of the same price series (December 1989 gold, July 17, 1989, to December 1, 1989), but only the vertical price scale is different. This technique is likely to give the user varying results depending on the chart service he or she uses.

RELATIVE INCLINATION
Relative inclination fares no better. Here, the rule is that in the first two legs of a bull move, the angular inclination above the horizontal axis of the second leg is twice that of the first leg. Initially, this may appear to be a coherent prediction of the behavior of the second leg given that of the first, but what if the first leg climbs at more than 45 degrees? The rule predicts that the second leg will incline at more than 90 degrees — that is, it has to backtrack in time. And whatever the angular inclination of the first leg on the original chart, there exists a rescaling of the price axis in which this first leg climbs at more than 45 degrees. Thus, this rule is incoherent. It cannot stand up to the c-test.

Note that these geometric angle lines should not be confused with classical chart trendlines, which are defined as incidence properties — connecting points on a chart — and not in terms of angles. In Figures 1, 2 and 3, the downtrend line crosses the price series at the same price and on the same day.

A price chart is an attempt to model relevant aspects of price change. Price change is not linear displacement, whether vertical, horizontal or oblique. Nonetheless, price change can be represented as vertical displacement and time elapsed as horizontal displacement. Such a model, however, invariably supports relationships that does not correspond to anything in the original process.

The angular inclination of a trend on a price chart is a visually striking feature of this representation. Such angles have no intrinsic meaning for the price series, but this is one of the many factors (along with our facility for pattern recognition and wishful thinking) that contributes to our interpreting more from price charts than rigorous testing reveals is there."


This was written prior to the advent of PCs. For more information please read the article "The C-Test" by William Eckhardt published by "Stocks & Commodities", which can be downloaded from the archive of http://traders.com/.

Attached Thumbnails
Click image for larger version

Name:	Figure 1.png
Views:	352
Size:	188.1 KB
ID:	89088   Click image for larger version

Name:	Figure 2.png
Views:	326
Size:	219.6 KB
ID:	89089   Click image for larger version

Name:	Figure 3.png
Views:	335
Size:	229.7 KB
ID:	89090  
Reply With Quote
Thanked by:
  #27 (permalink)
 Zeos6 
Toronto, Ontario, Canada
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts, TradeStation, E-Signal
Broker: Amp Futures/CQG; TransAct Futures
Trading: Currency Futures, Commodities Futures, Bonds, Stocks, Indices
Posts: 16 since Jan 2011
Thanks Given: 0
Thanks Received: 1

I was not commenting on whether or not the use of angles as an indicator in a chart is valid. I was merely stating that a valid slope can be calculated, even if a chart is dynamic. Whether that is useful or not is debatable,and I do not wish to get into that debate.

Reply With Quote
  #28 (permalink)
 BradB 
Warren, MI
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus/ZenFire
Trading: CL
Posts: 1 since Feb 2010
Thanks Given: 0
Thanks Received: 0

Actually, using the "WDS" type on MASlopeBoxMulti avoids using the Y axis and can be helpful in short term situations on a single chart.

Back to the original question, does anyone know how to save the "degrees" info for comparison to prior bars?

Thanks.

Reply With Quote
  #29 (permalink)
 Zeos6 
Toronto, Ontario, Canada
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts, TradeStation, E-Signal
Broker: Amp Futures/CQG; TransAct Futures
Trading: Currency Futures, Commodities Futures, Bonds, Stocks, Indices
Posts: 16 since Jan 2011
Thanks Given: 0
Thanks Received: 1

I am not sure what you are asking here. You can always save the info in a variable, in the Variables section of the code but I don't think tis is what you are after. Please clarify what it is you are after.

Reply With Quote
  #30 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,446 since Jun 2009
Thanks Given: 33,217
Thanks Received: 101,610


@Zeos6, totally off-topic but couldn't help myself when I saw your name. Instantly reminded me of the good ol Zeos computers... a name I had not heard in a very long time.



Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:




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