NexusFi: Find Your Edge


Home Menu

 





Converting csv to work in NT


Discussion in NinjaTrader

Updated
    1. trending_up 1,257 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?
Memorandum Watch: How the 60-Day MOU Framework Makes May …
Prediction Markets & Event Contracts
Ninjatrader users - good CONNECTIONs post and article fr …
NinjaTrader
The 50/50 Paradox: Peace and Invasion Each at 20% -- Ira …
Prediction Markets & Event Contracts
I Have a Thing Called Iran -- Trump Stays in DC as Airsp …
Prediction Markets & Event Contracts
Iran Lebanon Problem Kills Switzerland Talks, Brent at $ …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
16 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 thanks
CME Expands 24/7 Trading to WTI Crude Oil and Gold -- We …
1 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,855

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