NexusFi: Find Your Edge


Home Menu

 





Converting csv to work in NT


Discussion in NinjaTrader

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




 
Search this Thread

Converting csv to work in NT

  #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?
Strategy stop orders partially filled
EasyLanguage Programming
MC PL editor upgrade
MultiCharts
Better Renko Gaps
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Quantum physics & Trading dynamics
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
24 thanks
What is Markets Chat (markets.chat) real-time trading ro …
19 thanks
ApexTraderFunding.com experience and review
16 thanks
GFIs1 1 DAX trade per day journal
12 thanks
EG Indicators
11 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: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,863

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 Twitter Visit my NexusFi Trade Journal Reply With Quote




Last Updated on April 16, 2019


© 2024 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 - Privacy Policy - Downloads - Top
no new posts