Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

using second instrument

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

    using second instrument

    Hello

    If I have two instruments, can I do the following:

    When onbarupdate comes for the first instrument I use getcurrentbid to get value of the second instrument at that time, in such case I avoid any synchronization issues. I need this only for real time (no historical testing is needed, I have another approach for this).

    Are there any issues if I store this value from getcurrentbid to a custom dataserie object and use it to build indicator?

    Thank you.

    #2
    Sergey, this would give you the last known bid update then of the second instrument - for the custom dataseries be sure to keep in mind it's per default synched to the primary series.

    If the second instrument is using another timeframe, you wish to use this technique to provide a data series object inline with it - http://www.ninjatrader.com/support/f...ead.php?t=3572

    The spread indicators shared kindly here by kdoren can also be a good starting point for your custom works, as a syncronization method would be included as welll - http://www.ninjatrader.com/support/f...=spread&desc=1

    Comment


      #3
      Thank you Bertrand

      Be aware that spread indicator has a "bug", it works for some pairs but does not work for others, for example, if you choose $eurusd (or E7) and ES on daily bars from kinetick you will find out that ES bar comes one day earlier (just enough to make your rich during backtesting), but it works on two currency pairs and some other combinations.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      43 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      20 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      29 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      46 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      38 views
      0 likes
      Last Post CarlTrading  
      Working...
      X