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:516 / 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 90,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

Reply
 
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

Hi,

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

Reply



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)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

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


All times are GMT -4. The time now is 03:27 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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 2017-12-18 in 0.09 seconds with 19 queries on phoenix via your IP 54.163.209.109