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 poplagelu, Today, 05:00 AM
    0 responses
    3 views
    0 likes
    Last Post poplagelu  
    Started by fx.practic, 10-15-2013, 12:53 AM
    5 responses
    5,407 views
    0 likes
    Last Post Bidder
    by Bidder
     
    Started by Shai Samuel, 07-02-2022, 02:46 PM
    4 responses
    98 views
    0 likes
    Last Post Bidder
    by Bidder
     
    Started by DJ888, Yesterday, 10:57 PM
    0 responses
    8 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by MacDad, 02-25-2024, 11:48 PM
    7 responses
    160 views
    0 likes
    Last Post loganjarosz123  
    Working...
    X