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
    BertrandNinjaTrader Customer Service

    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 judysamnt7, 03-13-2023, 09:11 AM
      4 responses
      53 views
      0 likes
      Last Post DynamicTest  
      Started by ScottWalsh, Today, 06:52 PM
      4 responses
      33 views
      0 likes
      Last Post ScottWalsh  
      Started by olisav57, Today, 07:39 PM
      0 responses
      5 views
      0 likes
      Last Post olisav57  
      Started by trilliantrader, Today, 03:01 PM
      2 responses
      19 views
      0 likes
      Last Post helpwanted  
      Started by cre8able, Today, 07:24 PM
      0 responses
      6 views
      0 likes
      Last Post cre8able  
      Working...
      X