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 argusthome, 03-08-2026, 10:06 AM
      0 responses
      93 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      48 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      31 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      34 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      70 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X