Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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
      Brandon H.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by JoMoon2024, Today, 06:56 AM
      0 responses
      6 views
      0 likes
      Last Post JoMoon2024  
      Started by Haiasi, 04-25-2024, 06:53 PM
      2 responses
      17 views
      0 likes
      Last Post Massinisa  
      Started by Creamers, Today, 05:32 AM
      0 responses
      5 views
      0 likes
      Last Post Creamers  
      Started by Segwin, 05-07-2018, 02:15 PM
      12 responses
      1,786 views
      0 likes
      Last Post Leafcutter  
      Started by poplagelu, Today, 05:00 AM
      0 responses
      3 views
      0 likes
      Last Post poplagelu  
      Working...
      X