NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM 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 03-25-2012, 10:09 PM   #1
onnb1
Member
 
Join Date: Sep 2011
Posts: 79
Thanks: 40
Thanked 2 times in 2 posts
Default Strategy with plot that has N/A values as signal

hi - not sure if this is the right forum group so apologies in advance if this is the wrong place.

I have developed an indicator with Ninja Script that produces produces two plots - LongSignal and ShortSignal. When these plots have a non N/A value, I have a visual mark on the chart for entries.

Now, I want to use these plots to create an automated strategy. So, basically, whenever the plot is not N/A, I'd like to enter a position.

My questions are:

1. In terms of the relationship between Indicators and Strategies, is this the right approach? I mean, using the plot values in an indicator to generate trade signals in a strategy.

2. Can I create a strategy that has a constraint based on N/A values in the dataseries with the Strategy wizard or is that only possible by coding the strategy with Ninja Script.

thanks in advance for any help you may offer
Onn
onnb1 is offline  
Reply With Quote
Old 03-26-2012, 06:43 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

Hi Onn, why would you attempt to access the N/A plots? Because the multipart coloring approach from 6.5 times is used in the signal indicator?

The easier way would be updating the script to NT7's PlotColor approach and then you would only deal with comparisons involving one plot - http://www.ninjatrader.com/support/h...plotcolors.htm
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 03-27-2012, 02:10 AM   #3
onnb1
Member
 
Join Date: Sep 2011
Posts: 79
Thanks: 40
Thanked 2 times in 2 posts
Default

Quote:
Originally Posted by NinjaTrader_Bertrand View Post
Hi Onn, why would you attempt to access the N/A plots? Because the multipart coloring approach from 6.5 times is used in the signal indicator?

The easier way would be updating the script to NT7's PlotColor approach and then you would only deal with comparisons involving one plot - http://www.ninjatrader.com/support/h...plotcolors.htm

Hi and thanks for the response. Perhaps I did not explain myself good enough. I have an indicator. That indicator has logic in it that produces trading signals. I plot these signals on the chart. So for this plot, I have indexes in which the value is not set and indexes where the value is set. Where it is set, it is set to the price at which the signal is displayed on the chart - right?

Now, I want to overlay trading based on these signals. This plot line is "exposed" from the indicator. So I can effectively create a condition that when the value is set, enter a trade. Going back to my original post and questions: 1. Is this the right approach and 2. In the strategy wizard, when I select the plot as my condition, is there a way to create a condition that says: if the plot value is set (i.e., not N/A).

I hope that this is more clear now.

Onn
onnb1 is offline  
Reply With Quote
Old 03-27-2012, 02:14 AM   #4
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

You can unfortunately not check for an N/A plot in the wizard Onn, hence my suggestion to change the indicator logic to make it more easily workable in a custom strategy.

Yes, you can generally use the indicator plots to create trading signals, their values are exposed and accessible.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 06-14-2012, 06:59 PM   #5
51friend
Junior Member
 
Join Date: May 2010
Posts: 28
Thanks: 0
Thanked 0 times in 0 posts
Default

Yes, You can use the plot values in an indicator to generate trade signals in a strategy.
In strategy you can evaluate plot value by ContainsValue(barsAgo). If ContainsValue(barsAgo) return false, the plot value is N/A.

Cheers!

Quote:
Originally Posted by onnb1 View Post
hi - not sure if this is the right forum group so apologies in advance if this is the wrong place.

I have developed an indicator with Ninja Script that produces produces two plots - LongSignal and ShortSignal. When these plots have a non N/A value, I have a visual mark on the chart for entries.

Now, I want to use these plots to create an automated strategy. So, basically, whenever the plot is not N/A, I'd like to enter a position.

My questions are:

1. In terms of the relationship between Indicators and Strategies, is this the right approach? I mean, using the plot values in an indicator to generate trade signals in a strategy.

2. Can I create a strategy that has a constraint based on N/A values in the dataseries with the Strategy wizard or is that only possible by coding the strategy with Ninja Script.

thanks in advance for any help you may offer
Onn
51friend 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
Transfer Plot Values I_Quant Indicator Development 19 02-28-2012 02:13 PM
Limiting plot values stocktraderbmp Indicator Development 3 02-15-2012 07:51 AM
How can I access plot values TiggerTrader General Programming 9 09-27-2011 10:28 AM
Past Plot() values Zeos6 General Programming 9 06-11-2011 09:21 PM
Can indicators return values other than Plot values? higler General Programming 2 04-29-2008 05:17 AM


All times are GMT -6. The time now is 05:54 PM.