Go Back   NinjaTrader Support Forum > NinjaScript File Sharing > NinjaScript File Sharing Discussion

NinjaScript File Sharing Discussion Discussion for shared NinjaScript files.

NinjaTrader
Reply
 
Thread Tools Display Modes
Old 04-20-2009, 12:35 PM   #1
scjohn
Senior Member
 
Join Date: Dec 2004
Location: , ,
Posts: 239
Thanks: 0
Thanked 22 times in 11 posts
Default Polynomial Regression Channel

This a port from MQL4 to NinjaTrader. This was requested in a post in the Indicator Development forum.

A very limited description can be found at http://codebase.mql4.com/4332 .
Attached Files
File Type: zip PolynomialRegressionChannel.zip (2.9 KB, 925 views)
scjohn is offline  
Reply With Quote
The following 3 users say thank you to scjohn for this post:
Old 04-20-2009, 12:48 PM   #2
RJay
Vendor
 
Join Date: May 2008
Location: Hartford, CT. USA
Posts: 720
Thanks: 59
Thanked 54 times in 44 posts
Default

scjohn,

I think it is a very nice indicator.

I'm looking at it on the 4 tick range chart. I like what I see.

Thank you for doing this,

RJay
RJay is offline  
Reply With Quote
The following user says thank you to RJay for this post:
Old 04-21-2009, 08:05 AM   #3
Mauro60
Member
 
Join Date: Jan 2007
Location: Turin, , Italy
Posts: 51
Thanks: 0
Thanked 2 times in 2 posts
Default

Excellent work, but as you can see from the image into metatrader indicator works otherwise, the channel always works in a harmonious
Attached Images
File Type: gif polynomial.png (28.9 KB, 632 views)
Mauro60 is offline  
Reply With Quote
The following user says thank you to Mauro60 for this post:
Old 04-21-2009, 08:31 AM   #4
Ninja B
Member
 
Join Date: Apr 2008
Posts: 99
Thanks: 0
Thanked 0 times in 0 posts
Default

Thank you scjohn for translating and sharing this indicator.


Quote:
Originally Posted by Mauro60 View Post
Excellent work, but as you can see from the image into metatrader indicator works otherwise, the channel always works in a harmonious

^^^ What 2 indicators are you using in the screen shot you posted?
Ninja B is offline  
Reply With Quote
Old 04-21-2009, 08:35 AM   #5
Mauro60
Member
 
Join Date: Jan 2007
Location: Turin, , Italy
Posts: 51
Thanks: 0
Thanked 2 times in 2 posts
Default

it is the same indicator but on metatrader
Mauro60 is offline  
Reply With Quote
Old 04-21-2009, 08:40 AM   #6
Ninja B
Member
 
Join Date: Apr 2008
Posts: 99
Thanks: 0
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by Mauro60 View Post
it is the same indicator but on metatrader
Oh I see. Thank you
Ninja B is offline  
Reply With Quote
Old 04-21-2009, 12:56 PM   #7
Mauro60
Member
 
Join Date: Jan 2007
Location: Turin, , Italy
Posts: 51
Thanks: 0
Thanked 2 times in 2 posts
Default

Sorry scjohn, I'm watching the indicator of ninja, I see that it is practically equal to that of metatrader except that on metatrader accepts inputs up to 6 not 3.I am testing EA of this indicator at 3 operations 3 earnings, if it works this way every day ...
Mauro60 is offline  
Reply With Quote
Old 04-21-2009, 01:09 PM   #8
eDanny
Vendor
 
eDanny's Avatar
 
Join Date: Jul 2008
Location: East Rochester, NY
Posts: 1,249
Thanks: 15
Thanked 172 times in 141 posts
Default

Quote:
Originally Posted by Mauro60 View Post
Sorry scjohn, I'm watching the indicator of ninja, I see that it is practically equal to that of metatrader except that on metatrader accepts inputs up to 6 not 3.I am testing EA of this indicator at 3 operations 3 earnings, if it works this way every day ...
Looks to me like Degree can only go to 3 for the 3 kinds of regression used.
eDanny is offline  
Reply With Quote
Old 04-21-2009, 01:27 PM   #9
Mauro60
Member
 
Join Date: Jan 2007
Location: Turin, , Italy
Posts: 51
Thanks: 0
Thanked 2 times in 2 posts
Default

Quote:
Originally Posted by eDanny View Post
Looks to me like Degree can only go to 3 for the 3 kinds of regression used.
Hi eDanny,see image,line yellow degree=3,line green degree = 6.
Attached Images
File Type: gif polynomial 3_6.png (29.9 KB, 454 views)
Mauro60 is offline  
Reply With Quote
Old 04-21-2009, 01:44 PM   #10
eDanny
Vendor
 
eDanny's Avatar
 
Join Date: Jul 2008
Location: East Rochester, NY
Posts: 1,249
Thanks: 15
Thanked 172 times in 141 posts
Default

Ok I see that but the site only indicated 3 powers of regression. I guess it would be nice to go to 6.
Last edited by eDanny; 04-21-2009 at 03:51 PM.
eDanny is offline  
Reply With Quote
Old 04-21-2009, 02:04 PM   #11
scjohn
Senior Member
 
Join Date: Dec 2004
Location: , ,
Posts: 239
Thanks: 0
Thanked 22 times in 11 posts
Default

You can go up to 4. Anything over 4 and you will get ".... Index was outside the bounds of the array."
scjohn is offline  
Reply With Quote
Old 04-21-2009, 06:07 PM   #12
Ninja B
Member
 
Join Date: Apr 2008
Posts: 99
Thanks: 0
Thanked 0 times in 0 posts
Default

has anyone tried to use the Poly channel in a strategy yet. the plots are not displaying correctly when used in a strategy. and there no errors shown in the log.
Ninja B is offline  
Reply With Quote
Old 04-22-2009, 01:07 AM   #13
Mauro60
Member
 
Join Date: Jan 2007
Location: Turin, , Italy
Posts: 51
Thanks: 0
Thanked 2 times in 2 posts
Default

This is the EA of the polynomial in Metatrader language, the image are the four operations yesterday afternoon (I think I have had much luck!)
Time frame 1 minute
Attached Images
File Type: gif polynomial_EA.png (21.8 KB, 516 views)
Attached Files
File Type: zip e-Regr.zip (2.4 KB, 217 views)
Mauro60 is offline  
Reply With Quote
Old 04-22-2009, 02:42 AM   #14
ctrlbrk
Senior Member
 
Join Date: Oct 2008
Location: Dallas, TX
Posts: 676
Thanks: 0
Thanked 3 times in 3 posts
Default

It is useful. I've not examined the version posted here, but a while back I had a programmer do this conversion for me.

Here is a current 6 range chart along with some other indicators I have adapted myself (which I will be posting on my blog)...



Mike
ctrlbrk is offline  
Reply With Quote
Old 04-22-2009, 04:48 AM   #15
max-td
Senior Member
 
Join Date: Feb 2008
Posts: 177
Thanks: 0
Thanked 0 times in 0 posts
Default

Thank you for this scjohn !
i watched it this morning live and realized that it repaints its plottet values always a bit backwards - is this the nature of this channel ?

max-td
max-td is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a Regression Channel mrlogik Indicator Development 14 10-05-2014 11:49 PM
Polynomial Regression Channel safetrading Indicator Development 4 03-06-2009 12:48 AM
Regression Channel rtj4201 Platform Technical Support 2 02-17-2009 05:17 AM
Linear Regression Channel pivot44 Platform Technical Support 3 09-24-2008 10:46 AM
Regression Channel TazManII General Development 4 05-31-2008 09:38 PM


All times are GMT -6. The time now is 06:36 AM.

Futures, foreign currency and options trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones financial security or lifestyle. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results. View Full Risk Disclosure.

CFTC Rules 4.41 - Hypothetical or Simulated performance results have certain limitations, unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

This website is hosted and operated by NinjaTrader, LLC (“NT”), a software development company which owns and supports all proprietary technology relating to and including the NinjaTrader trading platform. NT is an affiliated company to NinjaTrader Brokerage (“NTB”), which is a NFA registered introducing broker (NFA #0339976) providing brokerage services to traders of futures and foreign exchange products. This website is intended for educational and informational purposes only and should not be viewed as a solicitation or recommendation of any product, service or trading strategy. No offer or solicitation to buy or sell securities, securities derivative or futures products of any kind, or any type of trading or investment advice, recommendation or strategy, is made, given, or in any manner endorsed by any NT affiliate and the information made available on this Web site is not an offer or solicitation of any kind. Specific questions related to a brokerage account should be sent to your broker directly. The content and opinions expressed on this website are those of the authors and do not necessarily reflect the official policy or position of NT or any of its affiliates. 

Vendors along with their websites, products and services, collectively referred to as (“Vendor Content”), are independent persons or companies that are in no manner affiliated with NT or any if its affiliates. NT or any of its affiliates are not responsible for, do not approve, recommend or endorse any Vendor Content referenced on this website and it’s your sole responsibility to evaluate Vendor Content. Please be aware that any performance information provided by a vendor should be considered hypothetical and must contain the disclosures required by NFA Rule 2-29(c). If you are interested in learning more about, or investigating the quality of, any such Vendor Content you must contact the vendor, provider or seller of such Vendor Content. No person employed by, or associated with, NT or any of its affiliates is authorized to provide any information about any such Vendor Content.