![]() |
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
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Sep 2011
Posts: 79
Thanks: 40
Thanked 2 times in 2 posts
|
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 |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
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
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 | |
|
Member
Join Date: Sep 2011
Posts: 79
Thanks: 40
Thanked 2 times in 2 posts
|
Quote:
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 |
|
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
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.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#5 | |
|
Junior Member
Join Date: May 2010
Posts: 28
Thanks: 0
Thanked 0 times in 0 posts
|
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:
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |