NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > Application Technical Support > Market Analyzer

Market Analyzer Support for the NinjaTrader Market Analyzer.

Reply
 
Thread Tools Display Modes
Old 05-31-2012, 01:50 AM   #1
MLTDINO
Junior Member
 
Join Date: Jul 2010
Posts: 7
Thanks: 0
Thanked 0 times in 0 posts
Default Rsqueeze(BBSqueeze) indicator in the MA

morning all,

I am using the above indicator but am having a few problems getting the blue and red dots
to appear in the MA.

All I want it to is display a cell alert when the dot is red, and another when the dot is blue.

I think it is something to do with the the "Plot", where it has squeeze and squeeze on, and setting the cell conditions accordingly. I have played about with it but can't get the dots on the chart to correspond to the cell alerts in the MA.

I have attached a screen shot so you can see what I am on about.

thanks in advance,

David
Attached Images
File Type: jpg squeeze indicator.jpg (196.4 KB, 72 views)
MLTDINO is offline  
Reply With Quote
Old 05-31-2012, 02:17 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,377
Thanks: 252
Thanked 966 times in 949 posts
Default

David, we would unfortunately not know how the indicator you refer to would be created, but you cannot access the dots plotted on the chart directly in the MA. For this to work the indicator would need to expose a signal, so for example if this reads +1, you could go ahead and create a cell condition to flag a certain pattern was found. If the indicator would not offer this for access, it would need to be recoded to work as desired in your MA.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 07-30-2012, 02:07 PM   #3
PTE97
Junior Member
 
Join Date: May 2007
Posts: 22
Thanks: 1
Thanked 0 times in 0 posts
Default

Does anyone know of an example of the code that is described by Bertrand?
PTE97 is offline  
Reply With Quote
Old 07-30-2012, 02:23 PM   #4
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
Default

If needed you can contact one of our NinjaScript consultants to assist you with coding this.


NinjaScript Consultants:
http://www.ninjatrader.com/partners#...pt-Consultants
NinjaTrader_Brett is offline  
Reply With Quote
Old 08-15-2012, 04:19 PM   #5
Harry
Senior Member
 
Join Date: Oct 2007
Posts: 1,825
Thanks: 12
Thanked 80 times in 66 posts
Default

Quote:
Originally Posted by MLTDINO View Post
morning all,

I am using the above indicator but am having a few problems getting the blue and red dots
to appear in the MA.

All I want it to is display a cell alert when the dot is red, and another when the dot is blue.

I think it is something to do with the the "Plot", where it has squeeze and squeeze on, and setting the cell conditions accordingly. I have played about with it but can't get the dots on the chart to correspond to the cell alerts in the MA.

I have attached a screen shot so you can see what I am on about.

thanks in advance,

David
Hi David,

the RSqueeze was originally coded for NinjaTrader 6.5. The actual source is here

http://www.tradingstudies.com/Downloads/Squeeze.aspx

The indicator comes with a collection of squeezes,

BB Squeeze - a modified Bollinger Band squeeze
PBFSqueeze - a MACD type oscillator based on Gaussian filters
Countertrend - PBFSqueeze, which use a CCI for coloring the indicators bars

As far as I understand you only wish to use the BBSqueeze. Then you should not use the RSqueeze for the following reasons

-> The RSqueeze does not use genuine Keltner Channels but a modified Keltner version based on ATR, this modified version does not produce genuine squeeze dots
-> The RSqueeze does not properly serialize the parameters, so you cannot access them via a strategy or another indicator.
-> Only 10% of the code refers to the BBSqueeze, the remainder is needed for the two oscillators

The BBSqueeze that comes with the RSqueeze is not the squeeze that should be used. The ATR uses Wilder's smoothing with a smoothing constant of 1/N as opposed to 2/(n+1) which is used for an EMA. The fact that the ATR is used instead of the range means that the period used for the smoothing is not appropriate and makes the RSqueeze in my opinion unusable as tool for a Bollinger Squeeze.

If you want a genuine BBSqueeze, you would need to use the simple range instead of the average true range. The BBSqueeze is one of the simplest indicators to code for NinjaTrader. No need to use a tank, if a knife can do. The version I have coded is a simplified version, which only compares a multiple of the standard deviation to a multiple of the range, but does not take into account that classical Bollinger Bands calculate the SMA by using the close price, while the midband of the Keltner Channels is calculated from the typical price.

The chart below shows genuine Bollinger Band and Keltner Channels. If have used the NinjaTrader default indicators, which are correctly implemented. The "Squeeze" is on, when the Bollinger Bands are inside the Keltner Channels. Please compare the dots produced by the two indicators, and you will immediately understand that the RSqueeze produces different dots. Please use the indicator attached instead.

By the way, here is a little discussion on the RSqueeze .....

http://www.bigmiketrading.com/ninjat...eeze-work.html
Attached Images
File Type: jpg 6E 09-12 (15 Min) 15_08_2012.jpg (221.2 KB, 190 views)
Attached Files
File Type: zip Squeeze.zip (7.8 KB, 206 views)
Last edited by Harry; 08-16-2012 at 02:58 PM.
Harry is offline  
Reply With Quote
Old 08-16-2012, 08:23 AM   #6
PTE97
Junior Member
 
Join Date: May 2007
Posts: 22
Thanks: 1
Thanked 0 times in 0 posts
Default

Harry, thank you very much for the clarification on RSqueeze. I have downloaded your new Squeeze indicator and it plots fine.
In ref to MLTDINO’s question , I am able to get TrendStrength to print values in Market Analyzer, but not “SqueezeDots” i.e. is there a way for the Market Analyzer to indicate that a squeeze is on?
Thanks again.
PTE97 is offline  
Reply With Quote
Old 08-16-2012, 09:45 AM   #7
Harry
Senior Member
 
Join Date: Oct 2007
Posts: 1,825
Thanks: 12
Thanked 80 times in 66 posts
Default

Quote:
Originally Posted by PTE97 View Post
Harry, thank you very much for the clarification on RSqueeze. I have downloaded your new Squeeze indicator and it plots fine.
In ref to MLTDINO’s question , I am able to get TrendStrength to print values in Market Analyzer, but not “SqueezeDots” i.e. is there a way for the Market Analyzer to indicate that a squeeze is on?
Thanks again.
Here is an updated version of the Squeeze. I have added a BoolSeries squeezeOn, which carries the value "true", if the squeeze is on, and the value "false", when there is no squeeze. The BoolSeries can be accessed as anaSqueeze(....).SqueezeOn.
I have also modified the code to allow for a displacement of the indicator.

I have updated the indicator file in post #5.

Please let me know, whether this is what you needed.
Last edited by Harry; 08-16-2012 at 09:48 AM.
Harry is offline  
Reply With Quote
Old 08-16-2012, 12:04 PM   #8
PTE97
Junior Member
 
Join Date: May 2007
Posts: 22
Thanks: 1
Thanked 0 times in 0 posts
Default

Harry, thanks for the reply, my knowledge of C# is very limited. I am not clear on how BoolSeries true or false can be accessed to appear in Market Analyzer. i.e. do I have to add a statement somewhere ?
PTE97 is offline  
Reply With Quote
Old 08-16-2012, 03:00 PM   #9
Harry
Senior Member
 
Join Date: Oct 2007
Posts: 1,825
Thanks: 12
Thanked 80 times in 66 posts
Default

Quote:
Originally Posted by PTE97 View Post
Harry, thanks for the reply, my knowledge of C# is very limited. I am not clear on how BoolSeries true or false can be accessed to appear in Market Analyzer. i.e. do I have to add a statement somewhere ?
No, this was my problem. I thought that it would be possible to access an exposed BoolSeries with the Market Analyzer, but it seems that the Market Analyzer only accepts plots.

I have now set an arbitrary value to the Squeeze Dots. If the squeeze is on the dots will have the value = 0. If the value is > 0 this means no squeeze. In the market analyzer you would have to check the squeeze dots for equality with 0.

I have updated the indicator file in post #5. Please let me know, whether it works.
Harry is offline  
Reply With Quote
The following user says thank you to Harry for this post:
Old 08-17-2012, 07:07 AM   #10
PTE97
Junior Member
 
Join Date: May 2007
Posts: 22
Thanks: 1
Thanked 0 times in 0 posts
Default

Thanks Harry, that did it. Market Analyzer is reporting fine now =0,>0. Good luck in your trading, and thanks again for your patience and help.
PTE97 is offline  
Reply With Quote
Old 10-08-2012, 08:14 PM   #11
Crassius
Senior Member
 
Join Date: Nov 2008
Posts: 186
Thanks: 38
Thanked 32 times in 26 posts
Default

Quote:
Originally Posted by Harry View Post

If you want a genuine BBSqueeze, you would need to use the simple range instead of the average true range. The BBSqueeze is one of the simplest indicators to code for NinjaTrader. No need to use a tank, if a knife can do. The version I have coded is a simplified version, which only compares a multiple of the standard deviation to a multiple of the range, but does not take into account that classical Bollinger Bands calculate the SMA by using the close price, while the midband of the Keltner Channels is calculated from the typical price.

The chart below shows genuine Bollinger Band and Keltner Channels. If have used the NinjaTrader default indicators, which are correctly implemented. The "Squeeze" is on, when the Bollinger Bands are inside the Keltner Channels. Please compare the dots produced by the two indicators, and you will immediately understand that the RSqueeze produces different dots. Please use the indicator attached instead.
Thanks... I was looking to code an implementation because so many around are needlessly jazzed up with all sorts tweeks. The original is elegant.

This will serve as a good starting point.

Wish it was in the Shared file section so it would be easier to find.
Crassius 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
indicator in MA astrolobe Market Analyzer 1 08-16-2011 02:06 AM
MA cross indicator billr Indicator Development 5 07-03-2010 03:31 AM
RSqueeze and Strategy Wizard 123r34 Automated Trading 0 06-10-2009 01:25 PM
need help with bbsqueeze indicator iangohye Indicator Development 1 09-03-2008 08:36 AM
Indicator in MA and updates svrz Market Analyzer 11 05-30-2008 09:58 PM


All times are GMT -6. The time now is 12:41 PM.