NinjaTrader Support Forum  

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 08-01-2012, 07:33 PM   #1
benrock
Member
 
Join Date: Mar 2012
Posts: 63
Thanks: 0
Thanked 15 times in 1 post
Default strat help

how can i get the wizard to trigger after a green or red candle ? thats not my strategy but ita a key part .

i tried open0 < close 0 and it some what worked but it it did red candles too which i dont want , thanks guys
benrock is offline  
Reply With Quote
Old 08-01-2012, 08:56 PM   #2
NinjaTrader_Matthew
NinjaTrader Customer Service
 
NinjaTrader_Matthew's Avatar
 
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,860
Thanks: 163
Thanked 580 times in 571 posts
Default

Hello,

Checking Open[0] < Close[0] would give you a green bar and Open[0] > Close[0] would give you a red.

If additional orders are being placed, I'd suggest simplifying your strategy to determine why those orders are being placed. For example do you have an exit condition set somewhere?

I'm attaching a very simple strategy which you can use an example of one way to debug what you're seeing.
Attached Images
File Type: png redgreen.PNG (76.8 KB, 5 views)
Attached Files
File Type: zip RedGreen.zip (2.2 KB, 1 views)
NinjaTrader_Matthew is offline  
Reply With Quote
Old 08-01-2012, 09:16 PM   #3
benrock
Member
 
Join Date: Mar 2012
Posts: 63
Thanks: 0
Thanked 15 times in 1 post
Default

yea thats what i did but this is what i get , why does it skip these bars in between ?
Attached Images
File Type: png ntstrat.PNG (40.4 KB, 7 views)
benrock is offline  
Reply With Quote
Old 08-01-2012, 09:45 PM   #4
NinjaTrader_Matthew
NinjaTrader Customer Service
 
NinjaTrader_Matthew's Avatar
 
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,860
Thanks: 163
Thanked 580 times in 571 posts
Default

Orders may be ignored under certain conditions.

Before you get into submitting orders, I'd suggest drawing objects or text under your conditions to visual your conditions and ensure your logic is working as expected.
NinjaTrader_Matthew is offline  
Reply With Quote
Old 08-03-2012, 05:13 PM   #5
benrock
Member
 
Join Date: Mar 2012
Posts: 63
Thanks: 0
Thanked 15 times in 1 post
Default

not sure what that means matt ,
benrock is offline  
Reply With Quote
Old 08-03-2012, 07:27 PM   #6
Radical
Senior Member
 
Join Date: Sep 2008
Posts: 543
Thanks: 80
Thanked 187 times in 131 posts
Default

Quote:
Originally Posted by benrock View Post
not sure what that means matt ,
http://www.ninjatrader.com/support/h...d_approach.htm

Scroll down to "Internal Order Handling Rules that Reduce Unwanted Positions"
Radical is offline  
Reply With Quote
The following user says thank you to Radical 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
Strat performance and Strat Analyzer historical data different? joesandyego Strategy Development 7 06-15-2012 02:01 PM
new strat help benrock Strategy Development 5 05-18-2012 09:23 AM
Strat Help cre8it8 Strategy Development 2 07-07-2010 03:21 PM
RVI in strat dsraider Strategy Development 14 02-25-2010 01:52 PM
strat persists ATI user Version 7 Beta General Questions & Bug Reports 16 12-16-2009 10:15 AM


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