MTF Different Instruments Same time but handling missing bars - NinjaTrader | futures io social day trading
futures io futures trading

MTF Different Instruments Same time but handling missing bars
Updated: Views / Replies:565 / 0
Created: by leinster Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 100,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Thread Tools Search this Thread

MTF Different Instruments Same time but handling missing bars

  #1 (permalink)
Elite Member
Brussels / Dublin
Futures Experience: Intermediate
Platform: ninjatrader
Favorite Futures: Stdev + 2
Posts: 467 since Jun 2010
Thanks: 842 given, 592 received

MTF Different Instruments Same time but handling missing bars


Using Closes[1][0] && Closes[0][0] aswell as Times[0][0] && Times[1][0].

I have two instruments (which are similiar but on different markets).

Example: 1 = Euronext Milling Wheat Futures (Traded in europe) and 2 = Wheat (Traded on GLOBEX).

In this example i want to compare the price of european milling wheat versus wheat in the US. So i have put together an indicator to do this however i am facing a pretty common issue which im sure other's have seen.

Timeframe is 1 minute for both as i dont need to be blatantly high frequency.

But when i compare the bar's they do not always overlap on the right days / times reason being there are obviously holidays in states that are not in EU. My own PC runs eastern time so at least Times compares just eastern time.

I took a look at the correlation indicator on the forum and seen the following embedded into the onbarupdate and was thinking this might suffice if i take this code hack it and just wrap it at the start of my code and place a try whenever the timestamp's actually lineup. :

if( CurrentBars[0]<window || CurrentBars[1] < window ||(Closes[0].Count < window) || (Closes[1].Count < window) ) return;
double[] signalA = new double[window];
double[] signalB = new double[window];
int count = window;
for (int index = 0; index < count; index++)
if (null != Closes[0][index] && null != Closes[1][index]) {
double currentAClose = Closes[0][index];
signalA[index] = currentAClose;
double currentBClose = Closes[1][index];
signalB[index] = currentBClose;
} else {
Print("Corr - Missing bar, disregarding");

Is there a better way to do this that im not thinking of as id like the code to be as succinct as possible?

Reply With Quote


futures io > > > > MTF Different Instruments Same time but handling missing bars

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

July Journal Challenge - $500 in Amazon Gift Cards!


AXESS Trader: Powerful Cloud Based Trading Platform w/GFF Brokers

Jul 17

TBA: FuturesTrader71 w/Morad Askar

Elite only

Similar Threads
Thread Thread Starter Forum Replies Last Post
Coding Multi Time Frame (MTF) Indicators with NinjaTrader Fat Tails NinjaTrader 418 January 20th, 2018 12:05 PM
Multiple Time Frames (MTF) in trading decisions? Big Mike Traders Hideout 6 March 15th, 2013 07:21 PM
Better Volume bars missing drw112 NinjaTrader 2 February 9th, 2012 01:55 PM
Download mutiple instruments for the same day at one time. LastShadowRider NinjaTrader 7 August 15th, 2011 08:04 PM
Using EasyLanguage to buy two instruments at the same time Big Mike EasyLanguage Programming 4 March 14th, 2010 09:23 AM

All times are GMT -4. The time now is 04:18 PM. (this page content is cached, log in for real-time version)

Copyright © 2018 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432,
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2018-07-16 in 0.08 seconds with 14 queries on phoenix