Import quotes from Metatrader to NinjaTrader - NinjaTrader Programming | futures io social day trading
futures io futures trading


Import quotes from Metatrader to NinjaTrader
Updated: Views / Replies:2,245 / 3
Created: by ntr123 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
 

Import quotes from Metatrader to NinjaTrader

  #1 (permalink)
Trading Apprentice
Russia
 
Futures Experience: Advanced
Platform: NinjaTrader
Favorite Futures: forex
 
Posts: 3 since Dec 2010
Thanks: 2 given, 1 received

Import quotes from Metatrader to NinjaTrader

There is a performance problem, then converting large intraday MetaTrader CSV file to NinjaTrader txt file format.
So, I wrote a small console program, that solve it.
May be it will be useful.

In Attachment
EXE_Mt4ToNt7QuotesConverter.zip - Compiled program
SOURCE_Mt4ToNt7QuotesConverter.zip - Solution for Visual Studio 2010

Usage: 1st argument - path to csv file from MetaTrader
2nd argument - path to txt file for NinjaTrader
Example: Mt4ToNt7QuotesConverter.exe EURUSD1.csv $EURUSD_MT.txt


Sorry for my English


Last edited by LukeGeniol; December 15th, 2010 at 03:52 PM. Reason: exe files are not allowed
Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Italy (IT)
 
Futures Experience: Advanced
Platform: ATAS, R|Trader, NT8
Broker/Data: Rithmic
Favorite Futures: CL, Brent, GC, TF
 
LukeGeniol's Avatar
 
Posts: 1,501 since Apr 2010
Thanks: 408 given, 974 received


I'm sorry, but your zip folders contain a lot of exe files, this could be malicious, so I removed them.

Take your Pips, go out and Live.
Luke.
Reply With Quote
 
  #4 (permalink)
Trading Apprentice
Russia
 
Futures Experience: Advanced
Platform: NinjaTrader
Favorite Futures: forex
 
Posts: 3 since Dec 2010
Thanks: 2 given, 1 received

Ok, there is a code:


 
Code
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace Mt4ToNt7QuotesConverter
{
    class Mt4ToNt7QuotesConverter
    {
        static void Main(string[] args)
        {
            string PathMT;
            string PathNT;
            string LineMT;
            string LineNt;
            int ProcessedLines = 0;

            // Test if input arguments
            if (args.Length != 2)
            {
                Console.WriteLine("Please enter arguments");
                Console.WriteLine("Usage: 1st argument - path to csv file from MetaTrader");
                Console.WriteLine("       2nd argument - path to txt file for NinjaTrader");
                Console.WriteLine(@"Example: Mt4ToNt7QuotesConverter.exe c:\temp\EURUSD1.csv c:\temp\$EURUSD_MT.txt");
                Console.ReadLine();
                return;
            }

            PathMT = args[0];
            PathNT = args[1];
            
            try
            {
                // Create an instance of StreamReader to read from a file.
                // The using statement also closes the StreamReader.
                using (StreamReader sr = new StreamReader(PathMT)) 
                {
                    // Create an instance of StreamWriter to write a file.
                    // The using statement also closes the StreamWriter.
                    using (StreamWriter sw = new StreamWriter(PathNT))
                    {
                        // Read lines from the file until the end of the file is reached.
                        while ((LineMT = sr.ReadLine()) != null)
                        {
                            ProcessedLines += 1;
                            LineNt = LineMT.Substring(0, 4) + LineMT.Substring(5, 2) + LineMT.Substring(8, 2)
                                        + " " + LineMT.Substring(11, 2) + LineMT.Substring(14, 2) + "00" + ";"
                                        + LineMT.Substring(17);
                            //Write to file
                            sw.WriteLine(LineNt);
                            if (ProcessedLines % 1000 == 0)
                            {
                                Console.WriteLine("Processed: " + ProcessedLines.ToString() + " lines");
                            }
                        }
                    }
                }
            }
            catch (Exception e) 
            {
                // Let the user know what went wrong.
                Console.WriteLine("Error:");
                Console.WriteLine(e.Message);
            }
            Console.WriteLine("Written: " + ProcessedLines.ToString() + " lines");
            Console.WriteLine("Finished!");
            Console.ReadLine();
        }
    }
}

Reply With Quote
The following user says Thank You to ntr123 for this post:

Reply



futures io > > > > > Import quotes from Metatrader to NinjaTrader

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ninjatrader vs. Metatrader for Backtesting and Realtime Analysis FX janson Platforms and Indicators 4 January 31st, 2012 12:32 PM
MetaTrader 4 charleyfarley MetaTrader 29 July 24th, 2011 09:45 AM
NinjaTrader Market Analyzer converted to MetaTrader c12345 MetaQuotes MetaTrader MQL Programming 1 October 12th, 2010 09:07 AM
Import NinjaTrader template? joed NinjaTrader 2 July 29th, 2010 03:01 AM
How-to import indicators in NinjaTrader ZTR Help, Tutorials, and How-Tos 2 July 21st, 2010 02:06 PM


All times are GMT -4. The time now is 10:25 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-12 in 0.08 seconds with 19 queries on phoenix via your IP 54.90.92.204