As a last resort you could for example always contact a certified NinjaScript consultant to convert the code needed professionally for you -
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
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 -
BertrandNinjaTrader Customer Service
-
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 zstheorist, Today, 07:52 PM
|
0 responses
6 views
0 likes
|
Last Post
by zstheorist
Today, 07:52 PM
|
||
Started by pmachiraju, 11-01-2023, 04:46 AM
|
8 responses
150 views
0 likes
|
Last Post
by rehmans
Today, 06:44 PM
|
||
Started by mattbsea, Today, 05:44 PM
|
0 responses
6 views
0 likes
|
Last Post
by mattbsea
Today, 05:44 PM
|
||
Started by RideMe, 04-07-2024, 04:54 PM
|
6 responses
33 views
0 likes
|
Last Post
by RideMe
Today, 05:31 PM
|
||
Started by tkaboris, Today, 05:13 PM
|
0 responses
6 views
0 likes
|
Last Post
by tkaboris
Today, 05:13 PM
|
Comment