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:

    https://ninjatrader.com/support/help..._a_ninjasc.htm

    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Impeesa, Today, 03:17 AM
    0 responses
    6 views
    0 likes
    Last Post Impeesa
    by Impeesa
     
    Started by Impeesa, Today, 12:53 AM
    0 responses
    14 views
    0 likes
    Last Post Impeesa
    by Impeesa
     
    Started by Gaterz, Yesterday, 06:52 PM
    1 response
    13 views
    0 likes
    Last Post NinjaTrader_Marco  
    Started by dmelleady, Yesterday, 10:18 PM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_ChrisSch  
    Started by arangocj, Yesterday, 09:46 PM
    1 response
    16 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X