Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

use data within indicator A within indicator B

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

    use data within indicator A within indicator B

    I have a customer indicator A that processes Bid and Ask data. Indicator A draws on the price chart using SharpDX calls within onrender

    I want to use the same data, but plot a summary of it in a sub-panel. I think the easiest way to do this would be to create a separate indicator B

    The processing of the Bid and Ask data is CPU intensive, so I do not want to just include Indicator A within Indicator B - I think both RAM and CPU will go through the roof.

    Is there a way to package up the data of interest in Indicator A and make it available to Indicator B. Maybe there is some type of super global that could be utilized

    #2
    Hello tulanch,

    Thank you for your post.

    Calling an indicator or adding it's internal code to your additional indicator will still result in the indicator running it's logic. You can use intialize an indicator to ensure only one instance is called rather than a new instance on each bar. For an example, refer to the SampleMaCrossover under File > New > NinjaScript Editor > Strategy and the SMAs that are used within.

    For example:
    Code:
    private MyIndicator InitMyIndicator;

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    81 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    46 views
    0 likes
    Last Post PaulMohn  
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    169 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    101 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    175 views
    2 likes
    Last Post CaptainJack  
    Working...
    X