{
// When our indicator gives us a bull signal we enter long. Notice that we are accessing the
// public BoolSeries we made in the indicator.
if (SampleBoolSeries().BullIndication[0]) EnterLong();
// When our indicator gives us a bear signal we enter short
if (SampleBoolSeries().BearIndication[0]) EnterShort();
************************************************** ******************
The above script is from your NT8 SampleBoolSeries indicator file.
It references a public <bool>Series variable from SampleBoolSeries Strategy.
Question: if I change the SampleBoolSeries Strategy script to add user-settable "Properties",
Then what is the syntax to access a Stategy's BearIndication and BullIndication variables.
for example:
if (SampleBoolSeries().BearIndication[0]) <== this would be the script's syntax when the Indicator
DOES NOT have any user-settable properties
if (SampleBoolSeries(7,true).BearIndication[0]) <== the script's syntax when the Indicator
DOES HAVE user-settable properties
I UNDERSTAND that the user-settable variables must
appear in the script in the same order that they
appear in the Properties prompts.
WHAT I DO NOT UNDERSTAND IS THIS: When my script shows "(7,true)"
does that mean that the ONLY time the correct BearIndication "Value" will be read from the indicator
is when the user-settable <property> variables are like this ===> SampleBoolSeries(7,true).BearIndication[0]
WHAT HAPPENS IF THE USER sets the user-settable INDICATOR indicator variables in the <PROPERTIES> to 9 and false.
Must I add a line to my INDICATOR script file for each instance of the variables for when I WANT TO USE the INDICATOR'S
shared variable. Like this ==>
if ( (SampleBoolSeries(7,true).BearIndication[0]) || (SampleBoolSeries(9,false).BearIndication[0]) )
{
do something here..
}
DoesNinjaTrader8 provide a different INDICATOR-script-syntax that does not require that I provide multiple lines, of code, that
contain the actual values for each variable passed in the "Call" from the STRATEGY to the INDICATOR?
Comment