NexusFi: Find Your Edge


Home Menu

 





Regression Channel not plotting correctly


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 8 posts (24 thanks)
    2. looks_two watrader with 4 posts (0 thanks)
    3. looks_3 ShruggedAtlas with 4 posts (3 thanks)
    4. looks_4 Big Mike with 1 posts (2 thanks)
    1. trending_up 6,368 views
    2. thumb_up 29 thanks given
    3. group 1 followers
    1. forum 16 posts
    2. attach_file 9 attachments




 
Search this Thread

Regression Channel not plotting correctly

  #1 (permalink)
 
ShruggedAtlas's Avatar
 ShruggedAtlas 
Bloomington
 
Experience: Beginner
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Stocks
Posts: 191 since Apr 2011
Thanks Given: 78
Thanks Received: 75

I have two data streams. A 2 minute and a 10 minute. I have made some changes to which panel the price bars occupy. The fact that I have two data streams seems to be important here because I don't think I have trouble when I only have a single data stream to work with.

The problem: when trying to create a regression channel using data from either stream the channel plots vertically at the last bar of the chart. I have an example picture attached. I have the parameters window open so you can see how I have the indicator setup.

The thing works great on a single data stream but as soon as I introduce a second data stream I am no longer able to plot a new regression channel indicator.

Has anyone encountered this problem before?

Note: In the attached image, I have attempted to put the regression channel on panel #1 which is the 10 minute chart. Panel #2 is the primary data stream. I have tried to create this indicator using both data streams with the same results.

"I've missed more than 9,000 shots in my career. I've lost almost 300 games. 26 times, I've been trusted to take the game-winning shot and missed. I've failed over and over and over again in my life. And that is why I succeed."
- Michael Jordan, 5-Time NBA Most Valuable Player, 6-Time NBA Champion
Attached Thumbnails
Click image for larger version

Name:	REGRESSION PROBLEM PIC.JPG
Views:	260
Size:	152.3 KB
ID:	43258  
Visit my NexusFi Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
How to apply profiles
Traders Hideout
Exit Strategy
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
33 thanks
Tao te Trade: way of the WLD
24 thanks
My NQ Trading Journal
14 thanks
HumbleTraders next chapter
11 thanks
GFIs1 1 DAX trade per day journal
11 thanks
  #2 (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

I have just checked on my side. I think there is a problem linked to the code of the indicators.


anaRegressionChannel (my version):

If you look at the charts below, you will notice that one of the regression channel has leaped backwards on the 6E chart, while it is correctly shown on the FDAX chart. After some time all the lines disappeared.


RegressionChannel (Ninja default version):

On the 6E chart there is the vertical line, which you also noted.

The indicator has a bug, which prevents its use on MultiTimeSeries Charts. You will notice it from the error messages in your log. Somebody needs to recode it, I will have a look tomorrow.

Attached Thumbnails
Click image for larger version

Name:	Regression Channel FDAX.jpg
Views:	197
Size:	103.9 KB
ID:	43259   Click image for larger version

Name:	Regression Channel 6E.jpg
Views:	194
Size:	108.3 KB
ID:	43260  
Reply With Quote
  #3 (permalink)
 
ShruggedAtlas's Avatar
 ShruggedAtlas 
Bloomington
 
Experience: Beginner
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Stocks
Posts: 191 since Apr 2011
Thanks Given: 78
Thanks Received: 75


Yes I also noticed...but forgot to mention that it seemed to get 'worse' after a while. Odd symptom. It would work...then shift if I tried to put more than one on the chart and then would eventually fail altogether. I got that weird shifting symptom also but failed to mention it. thanks for bringing it up!

Also: I looked at my log and it shows no errors....hmmmm

"I've missed more than 9,000 shots in my career. I've lost almost 300 games. 26 times, I've been trusted to take the game-winning shot and missed. I've failed over and over and over again in my life. And that is why I succeed."
- Michael Jordan, 5-Time NBA Most Valuable Player, 6-Time NBA Champion
Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #4 (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


ShruggedAtlas View Post
Yes I also noticed...but forgot to mention that it seemed to get 'worse' after a while. Odd symptom. It would work...then shift if I tried to put more than one on the chart and then would eventually fail altogether. I got that weird shifting symptom also but failed to mention it. thanks for bringing it up!

Also: I looked at my log and it shows no errors....hmmmm


The indicator has a custom plot and was originally designed for single barseries charts. I am certain that one of the methods used in the custom plots has a problem with any of the new multi barseries features, such as non-equidistant spacing.

From the screenshots, it can be seen that the x-position of the plot is not correctly identified. It is either horizontally sihfted or compressed. That is a clear indication, where to look for the problem.

Reply With Quote
Thanked by:
  #5 (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

I have modified my version of the indicator, and it seems to work better. However, I have not thoroughly tested it under all circumstances, so I need some support for testing it.

The anaRegressionChannel has two differences with respect to the RegressionChannel indicator:

(1) It moves to the position of the last bar displayed, so if you scroll the chart horizontally you can see its past performance.

(2) The NinjaTrader with a period of 50 uses only 49 bars to calculate the channel, if set to "CalculateOnBarClose = true", my indicator uses 50 bars in both modes "true" and "false".

My first tests on multi-series charts were successful.


Chart and indicator attached.

Attached Thumbnails
Click image for larger version

Name:	FESX 09-11 (5 Min)  14_07_2011.jpg
Views:	253
Size:	81.0 KB
ID:	43298   Click image for larger version

Name:	FESX 09-11 (5 Min) _ FESX 09-11 (15 Min)  14_07_2011.jpg
Views:	247
Size:	115.7 KB
ID:	43301   Click image for larger version

Name:	FGBL 09-11 (5 Min) _ FGBL 09-11 (15 Min)  14_07_2011.jpg
Views:	232
Size:	114.4 KB
ID:	43302  
Attached Files
Elite Membership required to download: anaRegressionChannel.zip
Reply With Quote
  #6 (permalink)
 
ShruggedAtlas's Avatar
 ShruggedAtlas 
Bloomington
 
Experience: Beginner
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Stocks
Posts: 191 since Apr 2011
Thanks Given: 78
Thanks Received: 75


Fat Tails View Post
I have modified my version of the indicator, and it seems to work better. However, I have not thoroughly tested it under all circumstances, so I need some support for testing it.

The anaRegressionChannel has two differences with respect to the RegressionChannel indicator:

(1) It moves to the position of the last bar displayed, so if you scroll the chart horizontally you can see its past performance.

(2) The NinjaTrader with a period of 50 uses only 49 bars to calculate the channel, if set to "CalculateOnBarClose = true", my indicator uses 50 bars in both modes "true" and "false".

My first tests on multi-series charts were successful.


Chart and indicator attached.

Wow! Thanks a lot FT. I would have never been able to resolve that on my own. Really, thanks for checking into this and finding a initial fix and then sharing it with me. Very awesome of you!!

"I've missed more than 9,000 shots in my career. I've lost almost 300 games. 26 times, I've been trusted to take the game-winning shot and missed. I've failed over and over and over again in my life. And that is why I succeed."
- Michael Jordan, 5-Time NBA Most Valuable Player, 6-Time NBA Champion
Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #7 (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


ShruggedAtlas View Post
Wow! Thanks a lot FT. I would have never been able to resolve that on my own. Really, thanks for checking into this and finding a initial fix and then sharing it with me. Very awesome of you!!

Would like a few people to test, whether it works correctly. I will then update the Regression Channel indicator in the download section.

Reply With Quote
Thanked by:
  #8 (permalink)
 
ShruggedAtlas's Avatar
 ShruggedAtlas 
Bloomington
 
Experience: Beginner
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Stocks
Posts: 191 since Apr 2011
Thanks Given: 78
Thanks Received: 75

FT - here is your Regression Channel in action. I have two instances of the channel both active and, so far, correctly plotting on the second panel. The larger channel is based on 10 minute data which is not the primary stream and the smaller one is based on the 2 minute data which is the primary stream. You da man! whooohooooo!

"I've missed more than 9,000 shots in my career. I've lost almost 300 games. 26 times, I've been trusted to take the game-winning shot and missed. I've failed over and over and over again in my life. And that is why I succeed."
- Michael Jordan, 5-Time NBA Most Valuable Player, 6-Time NBA Champion
Attached Thumbnails
Click image for larger version

Name:	anaRegressionChannelTest.JPG
Views:	214
Size:	491.8 KB
ID:	43402  
Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #9 (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

I have updated the Regression Channel V2 in the download section of the forum.


The new version can be used on multi-timeseries charts and charts with non-equidistant bar spacing. It can be downloaded here:



Reply With Quote
  #10 (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,440 since Jun 2009
Thanks Given: 33,209
Thanks Received: 101,599


Notifications emailed.

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




Last Updated on July 27, 2011


© 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