I have altogether a totally different question. It's about the DivergenceInputSeries Indicator and my question is how do I use this indicator in the strategy builder/strategy script? From the action logic, how do I know when the divergence between price and another indicator has occurred? Thanks for your response.
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
DivergenceInputSeries Indicator
Collapse
X
-
DivergenceInputSeries Indicator
Hello NinjaTrader_ChrisL,
I have altogether a totally different question. It's about the DivergenceInputSeries Indicator and my question is how do I use this indicator in the strategy builder/strategy script? From the action logic, how do I know when the divergence between price and another indicator has occurred? Thanks for your response.Last edited by Nyman; 02-23-2022, 02:04 PM.Tags: None
-
Hi Nyman, thanks for writing in.
We discussed the use of DirvergenceInputSeries in the builder, I made a version that is useable in the strategy builder here:
Hello please i try use the indicator Divergence Input Series in Strategy Builder, I modify the indicator with plots, for choose in the builder, but when i try compilated the strategy have errors. } else if (State == State.Configure) { } else if (State == State.DataLoaded) { dinput1 = dinput(Close, 5, 1, 1, 1, true, false,
Please let me know if you have any questions about this material.Chris L.NinjaTrader Customer Service
- Likes 1
-
Hi Nyman, thanks for the follow up.
Could you post some screen shots of your condition builder to show what you have so far? You can also use Print() in the builder to print out the values that you are getting from the DivergenceInputSeriesBuilder. This will help to build conditions once you see the data being processed by the strategy.
Kind regards,
-ChrisLChris L.NinjaTrader Customer Service
Comment
-
Hello Chris,
I'm trying to find a divergence of Price and an indicator for example the CCI. I'm inputting the CCI with a period of 14 to the DivergenceInputSeriesBuilder indicator and when I try to activate it, it won't get activated. I can't print anything when the strategy won't get activated at all. The strategy was built in strategy builder. In your example provided, which data series is the inputted one?
Comment
-
Hi Hyman, thanks for the follow up.
A good test to start out is to use Print in a set with no conditions so it prints data on every bar. Heres a print of DivergenceInputSeries>CCI
The DivergenceInput indicator has a SignalUp and SignalDn plot that produces either 1 or 0. If you get a 1 on the plot it means there is a divergence, this is how it will be used in the builder:
Kind regards,
-ChrisLChris L.NinjaTrader Customer Service
Comment
-
Hi Chris, thank you for your help. I fixed my strategy and it's working fine. I had to use the ninja script to create the strategy rather than the strategy builder. In the DivvergenceInputSeriesBuilder indicator, where State ==State.Configure, what is the use of AddDataSeries(BarsPeriodType.Minute, 5)? Do I need this statement in this indicator for my strategies?
Comment
-
Hi Nyman, I apologize, but I did forget that we need to add this data series to our strategy in order to use the Divergence indicator.
AddDataSeries(BarsPeriodType.Minute, 1);
You do not need to unlock the script for this. Add the same series within the Additional Data screen in the builder and it should work after that.
Best regards,
-ChrisL
Chris L.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Yasharandom, Today, 07:45 AM
|
0 responses
3 views
0 likes
|
Last Post
by Yasharandom
Today, 07:45 AM
|
||
Started by llanqui, Yesterday, 09:59 AM
|
4 responses
23 views
0 likes
|
Last Post
by llanqui
Today, 07:22 AM
|
||
Started by smartromain, 03-13-2024, 01:42 AM
|
5 responses
94 views
0 likes
|
Last Post
by AndreiBig
Today, 06:08 AM
|
||
Started by Noerclou, Today, 04:55 AM
|
0 responses
5 views
0 likes
|
Last Post
by Noerclou
Today, 04:55 AM
|
||
Started by ThoriSten, Today, 03:56 AM
|
0 responses
6 views
0 likes
|
Last Post
by ThoriSten
Today, 03:56 AM
|
Comment