The problem is that my code does not work with the error message 'TDU Buy/Sell Momentum' tried to load additional data. All data must first be loaded by the host NinjaScript in its configuration state. Attempted to load ZN 06-23 Globex: 1 Tick
even though I have in my code
Could you please help me ?
I dont know what means "Globex: 1 Tick"
I specify that I am in "Simulated data feed"
Thank you for all your advice
Can you help answer these questions from other members on futures io?
Thank you for this answer.
The problem is that it is a commercial indicator and that put on the chart it works very well without using AddDataSeries()... and that anyway, I do not have access to its code...
Thank you for this answer.
The problem is that it is a commercial indicator and that put on the chart it works very well without using AddDataSeries()... and that anyway, I do not have access to its code...
I suggest you first try with a less "exotic" bar type. Try something like regular minute or day bars. Let that be loaded by your sending indicator.
In OnBarUpdate(), try calling the commercial indicator by sending it NOT the primary dataseries on the chart, but rather the added DataSeries.
For example, if I were to call the SMA indicator but ask it to process the day bars, i'd try something like:
double MyValue = SMA(BarsArray[1], 50)[0];
Your commercial indicator is most probably based on the generic Indicator class, and as such it should support TWO different ways of being called: either with the primary bar series on the chart, or one of the additional DataSeries.
In the SMA case, let's say you want to take a 15-bar SMA. You either do:
SMA(15) // which calls SMA and sends it the primary data series on the chart, i.e. BarsArray[0]
or
SMA(BarsArray[1], 15) // which asks the SMA indicator to work with the first additional data series
And if you had two additional DataSeries, you would do:
SMA(BarsArray[2], 15)
So just to expriment, try loading a more conventional DataSeries first, then call your commercial indicator by sending to it the BarsArray[1]
Also remember to put in some condition in OnBarUpdate to have the indicator react to only the DataSeries you want to target. For example:
if (BarsInProgress != 1) return; //this would ignore incoming ticks related to the additional DataSeries (i.e. BarsArray[1]) and only process bars related to the primary series.
Thank you for your answer but I tried before with bars in Minutes but I have the same problem and I do not see how to apply this way of calling the indicator to this particular indicator.
The only error in my code (probably due to a bad copy/paste) is the Id of the type of Bar which is 12345 and not 14
Thank you for this answer.
The problem is that it is a commercial indicator and that put on the chart it works very well without using AddDataSeries()... and that anyway, I do not have access to its code...
This is what I think.
The ninZaRenko is a custom bar type and its documentation says its ID is 12345.
When you run the indicator, open your Output window to see the ID of your custom indicator. Se if it is indeed 12345.
If the ID is indeed 12345, maybe you can troubleshoot by trying out a regular NT8 built-in renko bar type and apply to your current code. If it doesnt work, then it is a systematic problem that you need to address. If it works, then it has to do with the ninZaRenko. You may need to contact the developer. There is a free and paid version. If it is the paid version, I am sure they will answer you.
Thank you for all your help
My Id is correct as you can see on the attached image (an adaptation of the barsidentifier indicator because I don't know how/where to find the "output" display)
As for the rest, everything seems to be correct too, so I really don't understand...
Thank you for all your help
My Id is correct as you can see on the attached image (an adaptation of the barsidentifier indicator because I don't know how/where to find the "output" display)
As for the rest, everything seems to be correct too, so I really don't understand...
Then have you tried the regular Renko bar type?
I see that you also have UniRenko.
Maybe you can replace all NinZaRenko with Renko and see if your receiving indicator can read from the hosting indicator. Then repeat with replacing UniRenko.
Thank you for your answer.
My problem is that whatever the type of bar chosen I always have the same error at execution
So I thought about it and I'm not sure if the problem comes from this line
with the type of bar but I don't know how to change it properly here because I can't find an example.
But this line is the basic configuration of the indicator which works perfectly when added to a chart, whatever the chart type is...
Thank you for your answer.
My problem is that whatever the type of bar chosen I always have the same error at execution
So I thought about it and I'm not sure if the problem comes from this line
with the type of bar but I don't know how to change it properly here because I can't find an example.
But this line is the basic configuration of the indicator which works perfectly when added to a chart, whatever the chart type is...
Both the vendor of the indicator and NT8 have already answered your question. You should first try to successfully load the 15 second chart before loading other bar types. I suggest you ask the vendor directly for a template.