Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ticks from bid/ask

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Ticks from bid/ask

    Hello,

    I have data file that holds bid and ask prices in such format:

    Symbol,Time,Bid,Ask
    CUR/ENCY,2011-10-02 17:01:05.000,0.96564,0.96586
    CUR/ENCY,2011-10-02 17:04:01.000,0.96576,0.96598
    CUR/ENCY,2011-10-02 17:04:01.000,0.96577,0.96601

    Time column always has ".000" as last 3 digits, that's NOT milliseconds that vary.

    I would like import these prices and have tick data for charts. After analyzing http://www.ninjatrader.com/support/helpGuides/nt7/importing.htm it seems to me that there is no direct way to achieve my objective. I can script any data converter, but what approach should be used here if that's at all possible?

    NT7 tick data file is yyyyMMdd HHmmss;price;volume

    I considered to split each bid and ask line from source data to two separate lines each containing only bid, or ask with volume 1 like this:

    yyyyMMdd HHmmss;bid;1
    yyyyMMdd HHmmss;ask;1

    But would it be realistic data?
    Last edited by andrius; 10-21-2011, 01:00 PM.

    #2
    Hi andrius, you could specifically create 2 files to import, bid and ask data that NT would store. Currency spot charts are normally driven on the bid in case there's no real last price.

    Comment


      #3
      Hi Bertrand,

      I just want to make sure I got it:
      1. I make two separate files, one for bid, next for ask, and use number 1 for volume column? Or should I skip that volume field completely - how to handle volume field?
      2. I need to import both bid and ask files? Or should I import bid only with "Data type" set to "Last"?

      Thank you.

      Comment


        #4
        Hi andrius,

        1.) Two files would be created as you outline here, correct.

        2.) Bid, ask and last price should all be imported.
        KyleNinjaTrader Customer Service

        Comment


          #5
          Kyle,

          I know import types are unsupported stuff, but does it make sense, or it breaks something:

          NextDataPoint() besides other things contains:
          -------------------------------------

          double _bid = Convert.ToDouble(lines[2]);
          double _ask = Convert.ToDouble(lines[3]);
          Open = _bid;
          High = Math.Max(_bid, _ask);
          Low = Math.Min(_bid, _ask);
          Close = _bid; // <--- does it brake something?
          Volume = Convert.ToInt64(1); .. <--- should we hack volume=1 for tick ?

          PeriodType = Data.PeriodType.Tick;

          Time = new DateTime (Convert.ToInt32(lines[1].Substring(0, 4)), .........
          //I extract Time there too.


          NextInstrument() contains:
          -------------------------------------

          Instrument = Data.ExternalAdapter.GetInstrument(lines[0]);

          Should we feed Instrument name as NT7 likes to display it, or Data.ExternalAdapter will catch foreign instrument and map it according to Instrument manager's mapping rules?

          Thank you.
          Andrius.
          Last edited by andrius; 10-21-2011, 03:11 PM.

          Comment


            #6
            Sorry andrius, venturing into this territory would be unfortunately completely unsupported by us, you're welcome to play with it of course. For your volume question though, I believe 1 would be correct for FX tick data.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            65 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            41 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            23 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            26 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            52 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X