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.
    BertrandNinjaTrader Customer Service

    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.
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by fx.practic, 10-15-2013, 12:53 AM
            5 responses
            5,403 views
            0 likes
            Last Post Bidder
            by Bidder
             
            Started by Shai Samuel, 07-02-2022, 02:46 PM
            4 responses
            95 views
            0 likes
            Last Post Bidder
            by Bidder
             
            Started by DJ888, Yesterday, 10:57 PM
            0 responses
            7 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by MacDad, 02-25-2024, 11:48 PM
            7 responses
            159 views
            0 likes
            Last Post loganjarosz123  
            Started by Belfortbucks, Yesterday, 09:29 PM
            0 responses
            8 views
            0 likes
            Last Post Belfortbucks  
            Working...
            X