Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Plotting Linear Regression Trendline

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Plotting Linear Regression Trendline

    Hello, I am seeking some way to do a simple linear regression ​across X number of bars. I do not want a moving linear regression as is the case with the Lin Reg indicator. I want to be able to specify a timeframe and have NT draw a linear regression for that period and extend it forward on the chart. Is this capability possible? It is easy enough to do on a spreadsheet like Excel or Google Sheets, so my guess is someone has already developed it and I am just missing it. The image below is a linear regression off of price over 60 bars and is an example of what I'm looking for. Thanks for any help you can provide.


    Click image for larger version

Name:	dataurl514059.png
Views:	133
Size:	66.8 KB
ID:	1223692

    #2
    Hello Avs29,

    Thank you for your post.

    It's possible that an indicator similar to what you are looking for is publicly available on our NinjaTrader Ecosystem website. For example, there is a slope indicator that lets you enable/disable detrending using linear regression:You may also use the search bar to look for other indicators that might achieve what you are looking for. The User App Share is the portion of the NinjaTrader Ecosystem that contains free scripts shared by the community: https://ninjatraderecosystem.com/user-app-share/

    Please let me know if I can be of further assistance.

    The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
    Emily C.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by FrazMann, Today, 11:21 AM
    2 responses
    6 views
    0 likes
    Last Post NinjaTrader_ChristopherJ  
    Started by rjbtrade1, 11-30-2023, 04:38 PM
    2 responses
    80 views
    0 likes
    Last Post DavidHP
    by DavidHP
     
    Started by Spiderbird, Today, 12:15 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_ChristopherJ  
    Started by lorem, Yesterday, 09:18 AM
    5 responses
    18 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by cmtjoancolmenero, Yesterday, 03:58 PM
    12 responses
    42 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X