NexusFi: Find Your Edge


Home Menu

 





Converting csv to work in NT


Discussion in NinjaTrader

Updated
    1. trending_up 1,252 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?
Kalshi Sets $4.13B All-Time Weekly Record as Polymarket …
Prediction Markets & Event Contracts
$4.5M Floods Russia Nuclear Contract in 24 Hours -- Krem …
Prediction Markets & Event Contracts
Post-Summit Market Verdict: ES -1%, NQ -1.5%, 10-Year Yi …
Traders Hideout
Irans Dual Probability: Guns Quiet at 99.95% While Forma …
Prediction Markets & Event Contracts
Victory Day Delivers: Russia-Ukraine Ceasefire Market Cl …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
8 thanks
Darmok and Jalad at Tanagra
3 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