Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Get Data from an specific intrument into the calculation

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

    Get Data from an specific intrument into the calculation

    Hi, is it possible that I can add a condition from a different instrument ?

    As example :

    When 200 EMA and 50 EMA in XAUUSD Cross = Go Long Trade in EUR/USD (or current instrument where strategy is activated)

    #2
    Yes, you can. See for instance: https://ninjatrader.com/support/help...ghlightsub=add
    Bruce DeVault
    QuantKey Trading Vendor Services
    NinjaTrader Ecosystem Vendor - QuantKey

    Comment


      #3
      Hello Uregon,

      Thanks for your post.

      As QuantKey_Bruce stated, yes this would be possible to accomplish.

      Add() would be used to add a secondary data series, such as XAUUSD to your script and access values from that added series. See the help guide documentation below for more information.

      Add(): https://ninjatrader.com/support/help....html?add3.htm

      To access EMA values from the added series, you could use something like EMA(BarsArray[1], 200)[0] and EMA(BarsArray[1], 50)[0] where BarsArray[1] is referencing the first added data series in the script for EMA calculations.

      Review this help guide page to gain a good understanding of working with multi-series NinjaScripts and accessing values from added data series: https://ninjatrader.com/support/help...nstruments.htm

      EMA: https://ninjatrader.com/support/help...onential_e.htm
      <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      553 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      324 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      100 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      543 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      546 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X