NexusFi: Find Your Edge


Home Menu

 





Converting csv to work in NT


Discussion in NinjaTrader

Updated
    1. trending_up 1,189 views
    2. thumb_up 4 thanks given
    3. group 2 followers
    1. forum 1 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
TITrader123
Tallinn + Estonia
 
Posts: 3 since Apr 2019
Thanks Given: 2
Thanks Received: 0

Anybody have an idea how to convert csv tick to work in NT8?

Thanks
TI


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
After $87M Settles NO: Irans Nuclear Redline Sets Up the …
Prediction Markets & Event Contracts
Topstep Slashes XFA Payout Caps by Up to 60% -- Flagship …
Funded Trading Evaluation Firms
Warsh Confirmed 54-45 on PPI Day -- 97% Say He Holds in …
Prediction Markets & Event Contracts
SEC Advisory Committee Backs Tokenized Securities Exempt …
Traders Hideout
CME Raises Energy Futures Margins After Iran-War Volatil …
Commodities
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
7 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #2 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 2,947 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,860

you can create a small stand alone program that reads and parses the CSV file
and then calls the functions from the NinjaTrader.client library

something along the lines of this :

 
Code
else if (string.Compare(line.Substring(0, 1), "H") == 0)
                        {
                            // Console.WriteLine(line);
                            // handle the line
                            IqFeedData record = Parser.ParseLineHisto(line);

                            if (record.Instrument.Contains(symbol))
                            {
                                // yes it is a quote update for the symbol
                                if (record.Bid < 0.9M * record.Trade || record.Ask > 1.1M * record.Trade)
                                {

                                }
                                else
                                {
                                    //BOalgo.Update(record);
                                    double bid = (double)record.Bid;
                                    if (bid != 0 && bid != oldbid)
                                    {
                                        String TimeStamp = record.Date + record.Time.Substring(0, 2) + record.Time.Substring(3, 2) + record.Time.Substring(6, 2);
                                        // Convert TimeStamp oto EU timezone
                                        TimeStamp = convertNYtoCET(TimeStamp);
                                        int retw = NTClient.BidPlayback("AEXT ##-##", bid, record.BidSize, TimeStamp);
                                        oldbid = bid;
                                    }
                                    double ask = (double)record.Ask;
                                    if (ask != 0 && ask != oldask)
                                    {
                                        String TimeStamp = record.Date + record.Time.Substring(0, 2) + record.Time.Substring(3, 2) + record.Time.Substring(6, 2);
                                        // Convert TimeStamp oto EU timezone
                                        TimeStamp = convertNYtoCET(TimeStamp);
                                        int retw = NTClient.AskPlayback("AEXT ##-##", ask, record.AskSize, TimeStamp);
                                        oldask = ask;
                                    }
                                    double trade = (double)record.Trade;
                                    if (trade > cutoff)
                                    {
                                        String TimeStamp = record.Date + record.Time.Substring(0, 2) + record.Time.Substring(3, 2) + record.Time.Substring(6, 2);
                                        // Convert TimeStamp oto EU timezone
                                        TimeStamp = convertNYtoCET(TimeStamp);
                                        int retw = NTClient.LastPlayback("AEXT ##-##", trade, record.TradeSize, TimeStamp);
                                        if (oldtrade != trade)
                                        {
                                            //System.Threading.Thread.Sleep(1);
                                            oldtrade = trade;
                                        }

                                    }

                                }
                                int a = 1;
                                System.Threading.Thread.Sleep(1);

                            }


Follow me on X Visit my NexusFi Trade Journal Reply With Quote




Last Updated on April 16, 2019


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts