Any thoughts or suggestions will be much appreciated.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Output window display repeats
Collapse
X
-
Output window display repeats
I deleted 'clearoutputwindow' statements from my indicator and strategy. Then I deleted all print statements from the strategy [ie] so that only the indicator sends messages to the output window instead of both the indicator and the strategy sending print messages. The output window is now well behaved and makes sense.........except that the output goes from start date to end date as expected but then inexplicably repeats the output?
Any thoughts or suggestions will be much appreciated.Tags: None
-
So there's only one series that the indicator script printing would work with, you don't Add() another market / series in it's Initialize() method?
If you only run the strategy and not apply the indicator manually again - you would only see one set of prints, correct?
If so I would expect that outcome, since you call the indicator in the strategy, the prints will show up double.
Comment
-
The only 'adds' are [both in the initialize region]:
for the strategy
Add(joeXXOindicator(1)); in the strategy region
and for the indicator
Add(new Plot(Color.FromKnownColor(KnownColor.Red), PlotStyle.Line, "PlotXXO"));
I don't fully understand what you are trying to tell me in your 2nd and 3rd sentences?
Comment
-
The following works [ie] the output window behaves.
For the strategy, I left untouched the ‘Add(joeXXOindicator(1));’ because when I removed it the line did not plot.
For the indicator, I deleted the ‘Add(new Plot(Color.FromKnownColor(KnownColor.Red), PlotStyle.Line, "PlotXXO"));’
and the line color is now orange [defaults to that I guess].
I would like to make the line color red instead of orange but so far have not been able to do so. I cannot do it in the indicator as I was doing it because it messes up the output window. Please tell me how to formulate the instruction to do so in the strategy.
The following is the initialize region of the strategy:
protected override void Initialize()
{
ClearOutputWindow();
CalculateOnBarClose = false; //false forces last day display [of indicators?]
Add(joeXXOindicator(1));
joeXXOindicator(1).Plots[0].Pen.Width = 3;
ExitOnClose=false;//do not go flat at bar close [ie] want to remain in position
Print(" ");
Print("//////////////// INITIALIZE STRATEGY /////////////////////");
Print(" ");
}Last edited by joemiller; 07-24-2013, 07:19 AM.
Comment
-
Everything in the output window now works almost 100% as expected for day bars.
However I don’t understand the following:
At the beginning of every run, debug trace messages show that the following sequence of events occurs:
INITIALIZE INDICATOR
INITIALIZE STRATEGY
INITIALIZE INDICATOR
INITIALIZE INDICATOR
INITIALIZE INDICATOR
INITIALIZE STRATEGY
Should all those initializations be occurring?
Basically the output window for non-day bars work well enough, but with a little more complicated mystery than that for the day bars described above.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
72 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
43 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
25 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
28 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
59 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment