As a last resort you could for example always contact a certified NinjaScript consultant to convert the code needed professionally for you -
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Modify indicator to Add Color and Sound
Collapse
X
-
Stan, sorry for the frustrations experienced, there's for sure a learning curve in NinjaScript and C# involved, however please keep in mind you're then working with a 'real' programming language and reap the benefits of very flexibility and performance later on in your trading career.
As a last resort you could for example always contact a certified NinjaScript consultant to convert the code needed professionally for you -
-
Bertrand, My problem is the understanding of "Value and Values" and how they are represented and interpreted. It would help if you can highlight in the code what is the difference between the two interpretation of Value and Values. I read the Ninja documentation and it was not so helpful.
For Example: I have these dataseries defined in the code.
if (CurrentBar < 2)
{
fastAbsEma.Set(0);
fastEma.Set(0);
slowAbsEma.Set(0);
slowEma.Set(0);
Value.Set(0);
myCustomDataSeries.Set(0);
tsiDataSeries.Set(0);
}
else
{
....calculation statements
.
myCustomDataSeries.Set(fastAbsEma[0] == 0 ? 0 : 100 * fastEma[0] / fastAbsEma[0]);
Value.Set(fastAbsEma[0] == 0 ? 0 : 100 * fastEma[0] / fastAbsEma[0]);
if condition
{
Plot0.Set(Value[0]);
}
if condition
{
Plot1.Set(Value[1]);
}
How do I reference each of the calculated values. What confuses me is the use of "Value.Set" in the calculation and "Value[0] and Value[1] on the Plot statement. I am thinking [0] refers to the current bar and [1] refers to the last bar. I am missing something here and how to reference what elements.. Maybe You can help and that will clarify. Thanks!!
Stan.
Comment
-
Hi Stan01,
They both refer to the same thing, plots on a chart.
Value - The first plot. If you need to access multiple plots, this is done with Values, and the bracket afterward tells NinjaTrader which plot you're refering to.
Value is the same as Values[0], the first indexed plot. The index is then increased for each plot you add. Values[1] is the second plot, Values[2] is the third, and so on.
It's not essential to understand all this as the framework needed to construct multi-plot indicators can be created through the wizard.
Adding plots in the wizard creates the necessary public properties so that you don't have to set values directly. You then set the values for your plots using English language descriptions (Plot0, Plot1, etc). You don't have to remember which plot series index goes to what.Ryan M.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
599 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
344 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
558 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
557 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment