NexusFi: Find Your Edge


Home Menu

 





SwingRay2 for strategy


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one EDGE with 12 posts (9 thanks)
    2. looks_two BankRobberNT with 12 posts (3 thanks)
    3. looks_3 Eubie with 10 posts (11 thanks)
    4. looks_4 DarrenH with 2 posts (3 thanks)
      Best Posters
    1. looks_one pam421 with 4 thanks per post
    2. looks_two DarrenH with 1.5 thanks per post
    3. looks_3 Eubie with 1.1 thanks per post
    4. looks_4 EDGE with 0.8 thanks per post
    1. trending_up 15,979 views
    2. thumb_up 34 thanks given
    3. group 18 followers
    1. forum 40 posts
    2. attach_file 8 attachments




 
Search this Thread

SwingRay2 for strategy

  #21 (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,442 since Jun 2009
Thanks Given: 33,215
Thanks Received: 101,603

Moderator Notice
Moderator Notice



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
Thanked by:

Can you help answer these questions
from other members on NexusFi?
PowerLanguage & EasyLanguage. How to get the platfor …
EasyLanguage Programming
Better Renko Gaps
The Elite Circle
Trade idea based off three indicators.
Traders Hideout
Exit Strategy
NinjaTrader
REcommedations for programming help
Sierra Chart
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
21 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #22 (permalink)
 Eubie 
Prague, Czech republic
 
Experience: Beginner
Platform: NinjaTrader/ZF
Trading: ES, TF
Posts: 135 since Jul 2010
Thanks Given: 278
Thanks Received: 84

Hello guys,

I would like to access the index of the last bar, on which a swing was broken. For example, lets talk about HighSwings. So, I add

 
Code
private int 		_LastHighSwingBreakBar 	= -1;
into variables, then set the value in the indicator when a swing is broken...

 
Code
				
/*	Set values shared by SwingRays2 with the rest of the world	*/
_LastHighSwingBreakBar 		= CurrentBar;
_LastHighSwingBreakValue	= tmpRay.Anchor1Y;
Print("_LastHighSwingBreakBar=" + _LastHighSwingBreakBar + " Time=" + Time[0] + " Price=" + _LastHighSwingBreakValue);

Lastly, in order to make it visible from outside the indicator, I add

 
Code
        
[Browsable(false)]	
[XmlIgnore()]		
public int LastHighSwingBreakBar
     {
         get { return _LastHighSwingBreakBar; }
     }
into Properties of the indicator. However, SwingRay2(...).LastHighSwingBreakBar has a value of -1, i.e. I cannot really access it. Any ideas on what I am doing wrong? When I load the indicator, Output window populates with messages like


Quoting 
_LastHighSwingBreakBar=14445 Time=4/27/2012 1:27:36 PM Price=104.78
_LastHighSwingBreakBar=14450 Time=4/27/2012 1:30:25 PM Price=104.83
_LastHighSwingBreakBar=14464 Time=4/27/2012 2:11:39 PM Price=104.9
_LastHighSwingBreakBar=14464 Time=4/27/2012 2:11:39 PM Price=104.92
_LastHighSwingBreakBar=14464 Time=4/27/2012 2:11:39 PM Price=104.92
_LastHighSwingBreakBar=14464 Time=4/27/2012 2:11:39 PM Price=104.92
_LastHighSwingBreakBar=14477 Time=4/27/2012 2:26:16 PM Price=104.98
_LastHighSwingBreakBar=14478 Time=4/27/2012 2:27:00 PM Price=104.99

so I know those _LastHighSwingBreakBar, _LastHighSwingBreakValue variables are being set correctly.

Many thanks, Daniel

Reply With Quote
  #23 (permalink)
 
EDGE's Avatar
 EDGE 
Saint Louis, Mo., USA
 
Experience: Advanced
Platform: NinjaTrader, Tradestation
Broker: Amp/CQG, Velocity/TT, Kinetick, TS
Trading: Anything That Moves..
Frequency: Daily
Duration: Minutes
Posts: 209 since Aug 2010
Thanks Given: 98
Thanks Received: 392



Eubie View Post
Hello guys,

I would like to access the index of the last bar, on which a swing was broken. For example, lets talk about HighSwings. So, I add

Lastly, in order to make it visible from outside the indicator, I add

 
Code
[Browsable(false)]	
[XmlIgnore()]		
public int LastHighSwingBreakBar
     {
         get { return _LastHighSwingBreakBar; }
     }

into Properties of the indicator. However, SwingRay2(...).LastHighSwingBreakBar has a value of -1, i.e. I cannot really access it. Any ideas on what I am doing wrong? When I load the indicator, Output window populates with messages like

so I know those _LastHighSwingBreakBar, _LastHighSwingBreakValue variables are being set correctly.

Many thanks, Daniel


@Eubie -- Try this:


 
Code
[Browsable(false)]	
[XmlIgnore()]
public int LastHighSwingBreakBar
     {
          get { Update(); return _LastHighSwingBreakBar;}
     }


.

Reply With Quote
  #24 (permalink)
 Eubie 
Prague, Czech republic
 
Experience: Beginner
Platform: NinjaTrader/ZF
Trading: ES, TF
Posts: 135 since Jul 2010
Thanks Given: 278
Thanks Received: 84

Hey EDGE,

unfortunately, the effect is zero:/

Reply With Quote
  #25 (permalink)
 
EDGE's Avatar
 EDGE 
Saint Louis, Mo., USA
 
Experience: Advanced
Platform: NinjaTrader, Tradestation
Broker: Amp/CQG, Velocity/TT, Kinetick, TS
Trading: Anything That Moves..
Frequency: Daily
Duration: Minutes
Posts: 209 since Aug 2010
Thanks Given: 98
Thanks Received: 392


Eubie View Post
Hey EDGE,

unfortunately, the effect is zero:/


hmmm.. which version of the indy are you using? Post it, and I'll take a look, but no promises if your not using the version I posted..


.

Reply With Quote
  #26 (permalink)
 Eubie 
Prague, Czech republic
 
Experience: Beginner
Platform: NinjaTrader/ZF
Trading: ES, TF
Posts: 135 since Jul 2010
Thanks Given: 278
Thanks Received: 84

Hello EDGE,

Im using my own version that I posted here twice. The version WITH the code of my recent posts added I attach to this message. The code is well documented. However, if U dont feel like reading it, I will totally understand.

Many thanks,
Daniel

Attached Files
Elite Membership required to download: SwingRays2Eubie.zip
Reply With Quote
  #27 (permalink)
 
EDGE's Avatar
 EDGE 
Saint Louis, Mo., USA
 
Experience: Advanced
Platform: NinjaTrader, Tradestation
Broker: Amp/CQG, Velocity/TT, Kinetick, TS
Trading: Anything That Moves..
Frequency: Daily
Duration: Minutes
Posts: 209 since Aug 2010
Thanks Given: 98
Thanks Received: 392


Eubie View Post
Hello EDGE,

Im using my own version that I posted here twice. The version WITH the code of my recent posts added I attach to this message. The code is well documented. However, if U dont feel like reading it, I will totally understand.

Many thanks,
Daniel


I looked and tried several things.. Not sure I understand why it doesn't work, But I too am at a loss..


.

Reply With Quote
Thanked by:
  #28 (permalink)
 BankRobberNT 
NYC
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Interactive Brokers
Trading: forex
Posts: 38 since Aug 2011

Eubie, Kudos to you for this nice indy.

Reply With Quote
  #29 (permalink)
 Eubie 
Prague, Czech republic
 
Experience: Beginner
Platform: NinjaTrader/ZF
Trading: ES, TF
Posts: 135 since Jul 2010
Thanks Given: 278
Thanks Received: 84


BankRobberNT View Post
Eubie, Kudos to you for this nice indy.

Its not mine, ryanb put it here first, I just fixed it What do u use it for? I use it mainly to spot whether there is resistance to a move once the market hits a previous swing. By resistance I mean lots of passive buys (support) or passive sells (resistance) in the gomVolumeLadder.

Reply With Quote
  #30 (permalink)
 supermht 
Naperville IL
 
Experience: Intermediate
Platform: ninjatrader
Broker: NT broker
Trading: NQ ES 6E GC CL
Posts: 962 since Feb 2010
Thanks Given: 1,189
Thanks Received: 661



Eubie View Post
Its not mine, ryanb put it here first, I just fixed it What do u use it for? I use it mainly to spot whether there is resistance to a move once the market hits a previous swing. By resistance I mean lots of passive buys (support) or passive sells (resistance) in the gomVolumeLadder.

hi, Eubie

what is the difference between your version and eswingrays? are they working same? thank you

Reply With Quote




Last Updated on February 1, 2022


© 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