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 Hwop38, 05-04-2026, 07:02 PM
    0 responses
    135 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    290 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    238 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    331 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    171 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X