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!
See more
See less

Partner 728x90

Collapse

cache of indicator public properties

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    cache of indicator public properties

    I'm creating an indicator with 3 public properties, Call this Indicator A.

    I'm wondering if I call this indicator from inside a different indicator or strategy script (call this Indicator B), and I want to get each of the 3 public properties, does that mean the indicator is loaded in memory in a separate instance, or is the property value served from cache?

    example:
    Chart 1 - inst:CL, Interval 5 minutes.
    Indicator B loaded on chart, Ind B gets 3 property values from Indicator A.
    It seems Ind A would only have 1 instance in memory.

    Chart 2 - inst:CL, Interval 60 minutes.
    Indicator B loaded on chart, Ind B gets 3 property values from Indicator A.
    It seems Ind A would now have 2 instances in memory, bcuz this chart is using a different interval...

    Market Analyzer - inst: CL, column added for Indicator A, using Interval 5 minutes

    Q1:
    Does this MA object use the cache value of the indicator, since it is the same time interval as Chart 1?

    Q2:
    What would happen if Chart 1 interval was changed,but the market Analyzer column was kept at Interval of 5 minutes?

    Q3:
    If I duplicate this setup for 4 individual instruments, does the indicator memory usage increment?

    Q4:
    Is there a way to monitor how much memory is being used and send an email alert so strategies are not at risk if computer is unattended?

    Thank you

    #2
    Hello balltrader,

    The indicator would be loaded in a separate instance. Each indicator is its own separate instance.

    An indicator applied to the market analyzer would be separate from the instance applied to a chart, thus cache values would not be used.

    If you were to apply the same indicator to 100 charts of the same time frames, you should expect memory usage to be greater than 1 instance applied to 1 chart.

    There would be no supported means of monitoring memory usage from within NinjaTrader, and sending emails, however it may be possible. I do not have any samples which demonstrate how this could be done however I’m sure ample resources exist online for doing this outside NinjaTrader.

    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      that makes sense that each indicator would be loaded in it's own instance.

      i can use sysinternals process explorer to monitor cpu and memory usage of Ninja Trader, as I add additional indicators and charts, to get an estimate of how each instance adds to the stack.

      Click image for larger version

Name:	ntprocexplr7132.PNG
Views:	1
Size:	48.0 KB
ID:	886317

      and i found a sample powershell script to monitor computer cpu and memory usage and send email alerts to a mobile phone txt address, so I should be able to proceed from there.

      Comment


        #4
        Hello balltrader,

        Thanks for sharing!

        Please let us know if you need further assistance.
        Alan P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by love2code2trade, Yesterday, 01:45 PM
        4 responses
        28 views
        0 likes
        Last Post love2code2trade  
        Started by funk10101, Today, 09:43 PM
        0 responses
        7 views
        0 likes
        Last Post funk10101  
        Started by pkefal, 04-11-2024, 07:39 AM
        11 responses
        37 views
        0 likes
        Last Post jeronymite  
        Started by bill2023, Yesterday, 08:51 AM
        8 responses
        45 views
        0 likes
        Last Post bill2023  
        Started by yertle, Today, 08:38 AM
        6 responses
        26 views
        0 likes
        Last Post ryjoga
        by ryjoga
         
        Working...
        X