Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Sharing Indicators with Custom Indicator

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

    Strategy Sharing Indicators with Custom Indicator

    Goal: Create an custom indicator that can access and use multi-timeframe(MTF) close prices and indicators from the main Strategy to plot in a panel. I don't want to code the logic twice, once in Strategy and again in the Radar indicator. I would prefer to avoid creating the 3 indicators and MTF dataseries in the Strategy and custom indicator.

    I have a Strategy that uses 3 standard indicators and price for 3 time frames. I created an 4th custom indicator called "Radar" that I want to plot (in a panel) a visual of certain states (downtrend, uptrend, sideways, buy signals, etc) from the Strategy. The Strategy uses the 3 indicators to determine these states and signals. I've coded the Strategy to give the 4th Radar indicator access to the 3 indicators. The Strategy creates/instantiates the 4th Radar indicator after the 3 standard indicators to ensure the first 3 process first and have updated values for the 4th Radar indicator to use.

    By the time the 4th custom Radar indicator OnBarUpdate() gets called the other 3 indicators and closes[] will be done processing and available to the Radar indicator OnBarUpdate(). Will this sharing Strategy Indicators with another indicator work with the event sequence in NinjaTrader? If not, can you recommend another way to achieve this type of sharing?

    Thanks!

    #2
    Hello Sorcerysoft,

    Thank you for your post.

    I apologize for the delay in replying - we had a technical issue with our forum and it was offline for a couple days.

    You would need to create the 4th indicator, adding the series and standard indicators and calculate the states (downtrend, uptrend, sideways, buy signals, etc), then you would need to add the series in the strategy and instantiate the 4th indicator. This would be because the system allows for indicators to be instantiated within a strategy but not the other way around.

    Alternatively you could look into plotting directly from the strategy. Here's an example of how you can plot from the strategy:



    Please let us know if we may be of further assistance to you.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    648 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    369 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    108 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    572 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    573 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X