rSqueeze for strategy - NinjaTrader Programming | futures io social day trading
futures io futures trading


rSqueeze for strategy
Updated: Views / Replies:7,649 / 15
Created: by dsraider Attachments:2

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you dont need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 2  
 
Thread Tools Search this Thread
 

rSqueeze for strategy

  #11 (permalink)
Elite Member
Chicago, IL
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: AGN/Rithmic
Favorite Futures: CL
 
Posts: 22 since Apr 2010
Thanks: 14 given, 1 received

Revisiting RSqueeze in a strategy

I was lucky enough to not even HAVE "using TradingStudies.NinjaScript.Utility;", so I've been able to incorporate my RSqueeze into a strat, but my problem has to do with secondary timeframes.

My normal way of doing things is thusly:

I instantiate a second timeframe indicator. I accomplish this with this line:
Add(PeriodType.Tick,768);
And then I decide to add the Stochastics from that 768-tick chart with this line:
Stochastics my768Stoch = Stochastics(BarsArray[1], 7, 14, 3);
And when I refer to it in the code below, I use "my768Stoch.K[0]". (Note that the number 1 in the BarsArray refers to the second timeframe. If I had a third timeframe and wanted the Stochastics from that chart, this would be a 2.) Works great.

Thing is, I can't seem to accomplish this same thing with the RSqueeze.

If I try this or any possible derivation thereof:
RSqueeze mySqueeze = RSqueeze(BarsArray[1], SqueezeStyle.CounterTrend);
I get this:
'RSqueeze' is a 'namespace' but is used like a 'type'
I have tried every possible combination I can think of, including using the right-click wizard thingy (all I can do with that is Insert Condition anyway), and nothing compiled. I have been able to successfully use the RSqueeze indicator and its values throughout the strategy, but only for the current timeframe (the timeframe on which the strat is run). I'd really like to be able to incorporate the RSqueeze from a secondary timeframe. Any geniuses out there who can give me a hint?

Reply With Quote
 
  #12 (permalink)
Elite Member
Florida
 
Futures Experience: Intermediate
Platform: NT7
Favorite Futures: CL, NQ, NG
 
Posts: 456 since Jun 2009
Thanks: 1,359 given, 383 received

Definitely not a genius here but try this after looking in the RSqueeze indicator to see what result/value you want.
I could be wrong but I think the reason Stochastic works is it's a built-in.

 
Code

myRSqueezeValue = RSqueeze(Close,SqueezeStyle.BBSqueeze).MyValue[0];
(btw - not tested)

There are several plots in the RSqueeze, I only picked MyValue in case that's one you want.

Kirk

Reply With Quote
The following user says Thank You to zeller4 for this post:
 
  #13 (permalink)
Elite Member
Chicago, IL
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: AGN/Rithmic
Favorite Futures: CL
 
Posts: 22 since Apr 2010
Thanks: 14 given, 1 received


Thanks for the input, Kirk. I'll give it a shot...

Reply With Quote
 
  #14 (permalink)
Elite Member
Chicago, IL
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: AGN/Rithmic
Favorite Futures: CL
 
Posts: 22 since Apr 2010
Thanks: 14 given, 1 received

Actually, that's good for the current chart....but what I'm trying to do is reference the RSqueeze on another timeframe/chart.

Once I add the second timeframe:
Add(PeriodType.Tick,768);
I can instantiate a variable that references it by using BarsArray[1] :
DerivativeOscillator myDO2 = DerivativeOscillator(BarsArray[1], 14, 5, 3, 9);
But I can't get the RSqueeze syntax to compile. It *should* be something like this:
RSqueeze myRSqueeze = RSqueeze(BarsArray[1], (SqueezeStyle.CounterTrend));
or
RSqueeze mySqueeze = RSqueeze(BarsArray[1], RSqueeze(CounterTrend));
or something like it...

Either way, I get this as an error message:
'RSqueeze' is a 'namespace' but is used like a 'type'
And that refers to the RSqueeze in green in the examples above. That part of the syntax (at least!) needs to be something else, and I just can't come up with it.


Last edited by hawks67; July 27th, 2010 at 12:16 PM.
Reply With Quote
 
  #15 (permalink)
Elite Member
Rio de Janeiro
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire, IB
Favorite Futures: Equity & Futures
 
prisonbreaker82's Avatar
 
Posts: 312 since Jun 2010
Thanks: 57 given, 141 received


dsraider View Post
Yep, that was it. Deleting that declaration, which I guess I didn't even need, made Dave much less of a dull boy. For anyone interested in using it in a strat, here's the code:

Uptrend:
&& RSqueeze(SqueezeStyle.BBSqueeze).PMomentumUp[0] > 0
&& RSqueeze(SqueezeStyle.BBSqueeze).PMomentumUp[0] != Close[1]

Downtrend:
&& RSqueeze(SqueezeStyle.BBSqueeze).NMomentumDown[0] < 0
&& RSqueeze(SqueezeStyle.BBSqueeze).NMomentumDown[0] != Close[1]

Squeeze On (blue dots):
&& RSqueeze(SqueezeStyle.BBSqueeze).SqueezeOn[0] == 0

Mike, thanks a lot for your offer to help.

Dave

Hi Dave,

I am very interested in using the Rsqueeze as a strategy. I am not a good programmer.. Can you please send the strategy you have?

Thanks in advance!

Isak

Reply With Quote
 
  #16 (permalink)
Elite Member
Toronto
 
Futures Experience: Beginner
Platform: Ninja Trader
Broker/Data: AMP FUTURES/ZENFIRE
Favorite Futures: YM
 
Raj1's Avatar
 
Posts: 167 since Jul 2009
Thanks: 252 given, 56 received


dsraider View Post
Yep, that was it. Deleting that declaration, which I guess I didn't even need, made Dave much less of a dull boy. For anyone interested in using it in a strat, here's the code:

Uptrend:
&& RSqueeze(SqueezeStyle.BBSqueeze).PMomentumUp[0] > 0
&& RSqueeze(SqueezeStyle.BBSqueeze).PMomentumUp[0] != Close[1]

Downtrend:
&& RSqueeze(SqueezeStyle.BBSqueeze).NMomentumDown[0] < 0
&& RSqueeze(SqueezeStyle.BBSqueeze).NMomentumDown[0] != Close[1]

Squeeze On (blue dots):
&& RSqueeze(SqueezeStyle.BBSqueeze).SqueezeOn[0] == 0

Mike, thanks a lot for your offer to help.

Dave

@dsraider:
I am trying to get the alerts from Rsqueeze indicaror thro' my Ninja Market Analyser but in vain.
Can you help me to modify this code to use it in my Ninja Market analyser so as to give the Long, Squeeze and Short signals, when value is set @1,0 and -1 respectively.
Appreciate your help.
Raj1

Reply With Quote

Reply



futures io > > > > > rSqueeze for strategy

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Utility To Transpose Optimized Strategy Values From Excel Output to Actual Strategy mercuryfx NinjaTrader 5 April 7th, 2012 04:59 PM
Ninjatrader7 ATM Strategy combine with Strategy Wizard Ninja Script schuster21 NinjaTrader Programming 4 July 4th, 2011 05:39 PM
RSqueeze Strategy for stocks? prisonbreaker82 Elite Automated Trading 1 August 6th, 2010 11:02 PM
Ninja Strategy multi-timeframe issue/Strategy to indicator nw123 NinjaTrader Programming 2 December 20th, 2009 07:24 PM


All times are GMT -4. The time now is 06:42 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-13 in 0.12 seconds with 20 queries on phoenix via your IP 54.90.92.204