Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi-Instrument indicator/strategy question

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

    Multi-Instrument indicator/strategy question

    I created a custom indicator that calls a certain instrument for calculations- so I guess it's a multi-instrument or a 2 instrument indicator (BIP0 and BIP1). I want to create a multi-instrument strategy as well (BIP0 and BIP1) that calls this custom indicator for buy/sell action. Is this possible with Ninjatrader? I'm not sure how this would work or what the actual sequence would be. In the main strategy, for each BIP, I would like to call this custom indicator. So is it BIP0 (strategy) => BIP0 (indicator) => BIP1 (indicator) => BIP1 (strategy) => BIP0 (indicator) => BIP1 (indicator) => BIP0 (strategy) and so on?
    Last edited by ciro1963; 01-11-2019, 03:50 PM.

    #2
    Hello ciro1963,

    Thank you for the question.

    Yes, this is possible in NinjaTrader. A host (strategy) can call a script (indicator) which has other series as well.

    To answer your question it would be best to see an example of specifically what happens with your current script's configuration. This would be a very good use case for Print statements to see specifically what the output is. https://ninjatrader.com/support/help...lightsub=print

    What I would suggest doing to answer this question would be to create a new strategy and indicator which only have 1 print in OnBarUpdate:

    Code:
    Print("Strategy: " + BarsInProgress + " " + CurrentBar);
    
    or for the indicator: 
    
    Print("Indicator: " + BarsInProgress + " " + CurrentBar);
    Then just call the indicator in the same way that you are now from the dummy strategy and run it on the same chart/config that you are asking about. Using these prints will specifically highlight the order of operations happening. You could see how the platform processes each script for each of the added series, 0 being the primary and 1 being the secondary BarsInprogress.

    I look forward to being of further assistance.

    Comment


      #3
      I will try that. Thank you Jesse.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      149 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      84 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      129 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      125 views
      1 like
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      102 views
      0 likes
      Last Post CarlTrading  
      Working...
      X