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 Segwin, 05-07-2018, 02:15 PM
    10 responses
    1,767 views
    0 likes
    Last Post Leafcutter  
    Started by Rapine Heihei, 04-23-2024, 07:51 PM
    2 responses
    30 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by Shansen, 08-30-2019, 10:18 PM
    24 responses
    943 views
    0 likes
    Last Post spwizard  
    Started by Max238, Today, 01:28 AM
    0 responses
    9 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by rocketman7, Today, 01:00 AM
    0 responses
    7 views
    0 likes
    Last Post rocketman7  
    Working...
    X