What you can try is when you are adding the strategy, in the strategy selection window, just right click and select "Save default" and set a default with a default period interval for that strategy. Any time you add the strategy, it will default to that.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Multi Series - Same periodicity
Collapse
X
-
Jean-Marc-Molina,
What you can try is when you are adding the strategy, in the strategy selection window, just right click and select "Save default" and set a default with a default period interval for that strategy. Any time you add the strategy, it will default to that.Josh P.NinjaTrader Customer Service
-
Josh: I could not get this to happen on V7B7.Originally posted by NinjaTrader_Josh View PostKBJ,
On my end in B6 and B7 on step 6, the Data Series window does not close and tells you you cannot have two of the same series right then and there.
Please install B7 and make sure you delete any chart templates and chart series templates you may have and try again. Thank you.
Comment
-
Originally posted by NinjaTrader_Josh View PostJean-Marc-Molina,
What you can try is when you are adding the strategy, in the strategy selection window, just right click and select "Save default" and set a default with a default period interval for that strategy. Any time you add the strategy, it will default to that.
Thank you Josh.
Comment
-
Yes, you might try and do that, but as far as I can tell, in the odd case where you've never set a default and your strategy adds a 1 min series, it'll never compile properly to give you the strategy window to set the default to fix the problem. You have to set your 1 min in the strategy to something else like 3, compile, set the def to whatever it is, go back, set to 1 in the strat, and recompile.Originally posted by NinjaTrader_Josh View PostJean-Marc-Molina,
What you can try is when you are adding the strategy, in the strategy selection window, just right click and select "Save default" and set a default with a default period interval for that strategy. Any time you add the strategy, it will default to that.
To be honest, the whole execute every 'initialize' every time you recompile throws up all sorts of things which can be a hassle. Especially if your initializes do a lot like mine. It would be nice if you could switch it off so that the only one executed is the last one in the window, or default.
Comment
-
Oh, yeah, I guessed that. It would be nice if there was some way around this though, like supplying a flag to initialize to tell you whether it's internal exec, or 'proper' exec. I guess the internal exec is only to get the strategy parameter window up. It would also be very useful if it didn't execute any intialize on compile. After all, compile is compile, not run ;-)Originally posted by NinjaTrader_Josh View Postdave1992,
Not possible. Initialize() is triggered multiple times for internal reasons.
Comment
-
Well, yeah, if you're compiling regularly you're almost certain to have the strategy analyzer open...Originally posted by NinjaTrader_Josh View PostCompile doesn't trigger any Initialize() methods by itself. You likely have the script up and running somewhere and it got reloaded or some UI that triggered it open.
Comment
-
dave1992: Sounds like a request that I made a couple of weeks ago for a supported interface to be able to tell the difference between the various calls that get made to the Initialize method: http://www.ninjatrader-support2.com/...3&postcount=11Originally posted by dave1992 View PostIt would be nice if there was some way around this though, like supplying a flag to initialize to tell you whether it's internal exec, or 'proper' exec. I guess the internal exec is only to get the strategy parameter window up. It would also be very useful if it didn't execute any intialize on compile. After all, compile is compile, not run ;-)
Comment
-
Thanks, I replied on that thread. It would indeed be very useful.Originally posted by KBJ View Postdave1992: Sounds like a request that I made a couple of weeks ago for a supported interface to be able to tell the difference between the various calls that get made to the Initialize method: http://www.ninjatrader-support2.com/...3&postcount=11
Comment
-
Hi,
The attached indicator draws an arrow at a specified time based on the secondary series.
the chart is set at 2 minute timeframe and a secondary series of one minute is added by the indicator.
now the arrow position is not consistent. see attached pics for more. am I missing something?
any help would be appreciated.
regards
Comment
-
same here... Initialize triggers even if the indicator is not used anywhere.. I have an indicator which open WPF form on its Initialize and this window pops every time I open the Indicators window on a chartOriginally posted by KBJ View Postdave1992: Sounds like a request that I made a couple of weeks ago for a supported interface to be able to tell the difference between the various calls that get made to the Initialize method
(NOTE: it pops up even if my indicator is not used and the chart is completely new and has no indicators and there is no other charts nor strategies and there is no other workspaces open).
Comment
-
Multi Series - Same periodicity
Removing the option to add multiple series with the same periodicity has very series effect on old and new strategy code.Originally posted by NinjaTrader_Josh View Post,
What was possible before was bugged. If you were able to do it, it had serious adverse effects under the hood. You will not be able to have multiples of the same series. If you wish to analyze 15min, just have 15min as the primary and not have it in the Add() method.
We would recommend user education on how to use your script instead of trying to force bars objects. Forcing bars objects in the manner you were doing is inefficient with resources.
See this use case:
Strategy trade the main time frame but has 2 additional filters usually higher time frames (e.g. Higher time frame SMA slope higher), now the 2 filters time frames are configured by the user using parameters.
If the code need to handle the case that the user (or optimizer) will pick the same time frame for one or two of the additional time frame this become ugly.
It need to figure which additional series to add and which was already added and then in the strategy code in need to reference the correct series in the correct BIP which is now dynamic.
In addition it may pop some problems in execution as execution are now moved from one BIP to another on order of event may changed, I am not sure what effect it may cause in some extreme cases.
It generate so much unnecessary code which is hard to test as it is unique cases where the parameters hit certain values, this is heavy and unnecessary burden on the strategy programmer.
Now I am not sure what is the problem you are facing with duplicate series but if this is resources then this is not a good reason, 1) code should be first correct and then efficient 2) NT can use the same series and call OnBarUpdate() with the same series 3) If the strategy programmer care for the extra efficiency he can add this additional code and avoid the duplication, NT should not force that.
Hope it is clear if not let me know, I have more use cases to explain the problem.
Muly
Last edited by Final; 02-01-2010, 04:33 AM.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
629 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
364 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
105 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
564 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
568 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment