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 zstheorist, Today, 07:52 PM
    0 responses
    3 views
    0 likes
    Last Post zstheorist  
    Started by pmachiraju, 11-01-2023, 04:46 AM
    8 responses
    149 views
    0 likes
    Last Post rehmans
    by rehmans
     
    Started by mattbsea, Today, 05:44 PM
    0 responses
    5 views
    0 likes
    Last Post mattbsea  
    Started by RideMe, 04-07-2024, 04:54 PM
    6 responses
    33 views
    0 likes
    Last Post RideMe
    by RideMe
     
    Started by tkaboris, Today, 05:13 PM
    0 responses
    5 views
    0 likes
    Last Post tkaboris  
    Working...
    X