The yellow error lines were what I was referring to. Unfortunately I have not reviewed your code indepth, but I did notice several calls of ChartControl in your indicator. Improper use of this object could be the source of the error. Ultimately you would have to debug it to see what actually does cause those errors though.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Can't pass BoolSeries variables in Indicator to Strategy
Collapse
X
-
tjendra,
The yellow error lines were what I was referring to. Unfortunately I have not reviewed your code indepth, but I did notice several calls of ChartControl in your indicator. Improper use of this object could be the source of the error. Ultimately you would have to debug it to see what actually does cause those errors though.Josh P.NinjaTrader Customer Service
-
Same Problem
I am attempting to write a strategy that incorporates a single indicator. I have modified the indicator to create and expose a boolseries. I used SampleBoolSeries files for examples.
I have read this thread and have remove references in the indicator to CalculateOnBarClose = true. Still I do not get the correct results when attempting to reference the boolseries. Like the other post, I have print statements throughout and the indicator appears to be setting the series correctly but when I use it in the strategy I get incorrect data.
I am using an 11 range chart. The strategy add the modified indicator in code e,g. Add(). I have pretty much stripped this thing down. Not sure what else to do. I notice in this thread that support mentioned a known bug. What exactly is the bug and are there any further suggestions?
Comment
-
Put the Updates() in and now I am getting results but the opposite, e.g. true from indi and false in strat. This leads me to think of a coding error, cut and paste, etc but the code is too simple. I have looked at it over and over. See output window results from my debug code...
In Strat 1956.25
ADXVMA Short Signal Here
ADXVMA LongIndi False
ADXVMA ShortIndi True
In Strat Short Indi False
In Strat Long Indi True
True False 3/29/2010 5:17:40 PM
In Strat 1958.5
ADXVMA Short Signal Here
ADXVMA LongIndi False
ADXVMA ShortIndi True
In Strat Short Indi False
In Strat Long Indi True
True False 3/29/2010 5:17:40 PM
ADXVMA Long Signal Here
ADXVMA LongIndi True
ADXVMA ShortIndi False
In Strat 1960.25
In Strat Short Indi True
In Strat Long Indi False
False True 3/29/2010 5:23:51 PM
I have attached the files if you have time to review. I have tried everything and read all I could find. ThanksAttached Files
Comment
-
reverse results?!
netjms, If I understood correctly your issue and I am looking at your code you are getting reverse results because when you call the LongIndi method from your strategy you are returning shortIndi see below. I hope this helps.
Kind regards,
atata
[Browsable(false)]
[XmlIgnore()]
public BoolSeries LongIndi
{
get { Update(); return shortIndi; } // Allows our public BearIndication BoolSeries to access and expose our interal bearIndication BoolSeries
}
[Browsable(false)]
[XmlIgnore()]
public BoolSeries ShortIndi
{
get { Update(); return longIndi; } // Allows our public BullIndication BoolSeries to access and expose our interal bullIndication BoolSeries
}
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
647 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
369 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
108 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
572 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
573 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment