Thanks!
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
Indicator Instance
Collapse
X
-
Indicator Instance
Hello guys, I have a question about creating an indicator instance from another indicator. I already know that if I create multiple instances of indicator B within indicator A with the same parameters, Ninjatrader will only create one instance of indicator B to save memory. But, if say, I create an instance of B from both indicator A and C with identical parameters, will the same thing happen?
Thanks!Tags: None
-
Are you saying you want to have an indicator A and indicator A creates an instance of indicator C which then creates an instance of Indicator B? You can certainly do this if that is the question.
This thread might be of help as well: http://www.ninjatrader.com/support/f...ad.php?t=56301
Additionally this example: http://www.ninjatrader.com/support/f...ead.php?t=4991LanceNinjaTrader Customer Service
-
My question is that if I create an instance of B in indicator A and create another instance of B in indicator C, and the arguments of both B instances are the same, then will Ninjatrader create only one instance of B for both A and C or will it create two instances of B for A and C separately? What I m thinking is that I wanna create, say, ten indicators(x1...x10) and all of them need to reference an indicator Y. In this case, will Ninja creates only one instance of Y for x1...x10 to share or will it creates 10 separate instances( which use 10 times the memory space or computing power) for each x1...x10? Note that I am saying that the arguments to call Y in x1...x10 are identical. So theoretically only one instance of Y is needed. However, I don't how Ninja deal with this situation in real-time
Comment
-
Hello,
Thank you for clarifying.
In this case each script would have it's own instance even if they had the same inputs.
If indicator Y called indicator Z ten times with the same settings it would only have once instance of Z
If indicator X called indicator Z twenty times with the same settings it would only have one instance of Z
There would be a total of two instances of Z
Let me know if I can be of further assistance.LanceNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by proptradingshop, 03-21-2024, 09:50 AM
|
5 responses
26 views
0 likes
|
Last Post Today, 05:17 AM | ||
Started by MaupinFinche, Today, 05:08 AM
|
0 responses
2 views
0 likes
|
Last Post
by MaupinFinche
Today, 05:08 AM
|
||
Started by Enkidu, Yesterday, 06:40 AM
|
9 responses
35 views
0 likes
|
Last Post
by Enkidu
Yesterday, 01:11 PM
|
||
Started by Mestor, 03-10-2023, 01:50 AM
|
12 responses
307 views
0 likes
|
Last Post
by z.franck
Today, 04:29 AM
|
||
Started by AgriTrdr, 07-16-2023, 12:54 PM
|
32 responses
268 views
0 likes
|
Last Post
by f.saeidi
Yesterday, 06:49 AM
|
Comment