NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 09-02-2011, 10:33 AM   #1
krakken
Junior Member
 
Join Date: Jul 2011
Posts: 19
Thanks: 0
Thanked 0 times in 0 posts
Default Swing Indicator into Strategy

Hi,
How can i use the standard Swing indicator in a strategy? I am trying to say if a dot is painted, do or don't do something. When I try to use True== it gives me a boolean error with that indicator in the strategy wizard.

Thanks.
krakken is offline  
Reply With Quote
Old 09-02-2011, 11:16 AM   #2
koganam
Senior Member
 
Join Date: Feb 2008
Location: Durham, North Carolina, USA
Posts: 3,214
Thanks: 24
Thanked 1,229 times in 1,000 posts
Send a message via Skype™ to koganam
Default

Quote:
Originally Posted by krakken View Post
Hi,
How can i use the standard Swing indicator in a strategy? I am trying to say if a dot is painted, do or don't do something. When I try to use True== it gives me a boolean error with that indicator in the strategy wizard.

Thanks.
You have to call the Swing() public methods as a first step, and use those results to populate the bool if you wish, or just use the public properties directly.

ref: http://www.ninjatrader.com/support/h...html?swing.htm
Last edited by koganam; 09-02-2011 at 02:03 PM. Reason: Corrected spelling
koganam is offline  
Reply With Quote
The following user says thank you to koganam for this post:
Old 09-02-2011, 11:47 AM   #3
krakken
Junior Member
 
Join Date: Jul 2011
Posts: 19
Thanks: 0
Thanked 0 times in 0 posts
Default

So no way to do this without opening up the code?
Not a coder here so if anyone can assist, it would be GREATLY appreciated!
krakken is offline  
Reply With Quote
Old 09-02-2011, 11:59 AM   #4
koganam
Senior Member
 
Join Date: Feb 2008
Location: Durham, North Carolina, USA
Posts: 3,214
Thanks: 24
Thanked 1,229 times in 1,000 posts
Send a message via Skype™ to koganam
Default

Quote:
Originally Posted by krakken View Post
So no way to do this without opening up the code?
Not a coder here so if anyone can assist, it would be GREATLY appreciated!
All the properties that are exposed and how to call them are in the link that I posted, so you definitely do not need to open up the code.

Be a bit more specific on what you want to do, and I may be able to post a few snippets. Unfortunately, " ... I am trying to say if a dot is painted, do or don't do something." says nothing actionable. What is the action that you seek to act on? The dot is but a visual artifice. Once the condition is met, do something with what?
koganam is offline  
Reply With Quote
Old 09-02-2011, 12:14 PM   #5
krakken
Junior Member
 
Join Date: Jul 2011
Posts: 19
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks for the assist.
I've noticed that the indicator basically places the swinghigh and swinglow dots to form a pseudo-channel. Occasionally, it only places the high OR the low (i.e. the channel opens up). In those instances I want to execute a trade.
krakken is offline  
Reply With Quote
Old 09-02-2011, 02:07 PM   #6
koganam
Senior Member
 
Join Date: Feb 2008
Location: Durham, North Carolina, USA
Posts: 3,214
Thanks: 24
Thanked 1,229 times in 1,000 posts
Send a message via Skype™ to koganam
Default

Quote:
Originally Posted by krakken View Post
Thanks for the assist.
I've noticed that the indicator basically places the swinghigh and swinglow dots to form a pseudo-channel. Occasionally, it only places the high OR the low (i.e. the channel opens up). In those instances I want to execute a trade.
At any time, the indicator can place only the swing high or swing low. So what condition do you seek to determine that the channel has opened up? That is the unfortunate thing about coding. You have to provide a very precise description of what you mean, otherwise, nothing is actionable.
koganam is offline  
Reply With Quote
The following user says thank you to koganam for this post:
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
Swing indicator Dervakon General Programming 3 05-03-2011 03:07 PM
Swing indicator Stephan123 Indicator Development 1 05-02-2011 09:41 AM
strategy that shows broken Swing high and Swing low? MoreYummy Strategy Development 1 06-06-2010 10:16 PM
Swing Indicator wcmaria Indicator Development 1 12-04-2008 10:48 AM
Howard Indicator and Pesavento Pattern Swing Indicator DORAIRAJ_S@HOTMAIL.COM Indicator Development 1 11-12-2007 12:28 AM


All times are GMT -6. The time now is 11:53 PM.