• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Forex last ask bid

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

    Forex last ask bid

    Forex; last = bid

    therefore, if I needed to actually differentiate between last and bid. How can I do that? B/c in reality the trade is actually executed at either ask or bid. I’m trying to see if the last trade was at ask or bid. And as of right now, b/c last = bid, 99.99% of the trades are appearing to be at bid. Is there a way to differentiate between last and bid?

    or is this a data issue? Aka, if I import actual last, bid, ask forex data, will NT refrain itself for making the last=bid assumption? Do you know of a data provider for spot forex that has the actual ask, bid and last?

    the data I am getting is tick from oanda. I printed the last, ask and bid as separate data series and I noticed the length of the last data series is smaller than the ask and bid. So I think the actual trades for last are there but ninja trader is not able to get them b/c the time stamps do not match up with the bid and ask data series so ninjatrader is just going by the ask and bid time series and their appropriate time stamps and then doing the last=bid assumption.. this is my hunch. Would appreciate your insight on how I can get the actual last trade and the bid and ask at that time.
    Last edited by staycool3_a; 10-26-2018, 10:05 PM.

    #2
    Hello staycool3_a,

    Thank you for your note.

    If I understand correctly and you only imported the tick data, you would not be able to differentiate whether the trade was taken at the bid or ask. You would need to import the bid and ask series as well for the comparison.

    You could see a list of data providers for historical tick data at the following link,
    https://ninjatrader.com/support/help...y_provider.htm

    If you imported both bid/ask data and still seeing this issue, please let us know.



    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_AlanP View Post
      Hello staycool3_a,

      Thank you for your note.

      If I understand correctly and you only imported the tick data, you would not be able to differentiate whether the trade was taken at the bid or ask. You would need to import the bid and ask series as well for the comparison.

      You could see a list of data providers for historical tick data at the following link,
      https://ninjatrader.com/support/help...y_provider.htm

      If you imported both bid/ask data and still seeing this issue, please let us know.


      i downloaded tick.last, tick.ask, tick.bid data using NT default data downloader. the data was downloaded using oanda connection. I also checked to see if FXCM data would have different results, but the same happend:

      99% of the bid = last.

      sample data for USDJPY: date;bid;ask;last

      10/22/2018 12:00:00 AM;112.617;112.619;112.617
      10/22/2018 12:00:01 AM;112.617;112.618;112.617
      10/22/2018 12:00:01 AM;112.617;112.619;112.617
      10/22/2018 12:00:05 AM;112.62;112.622;112.62
      10/22/2018 12:00:05 AM;112.62;112.622;112.62
      10/22/2018 12:00:07 AM;112.62;112.622;112.62
      10/22/2018 12:00:08 AM;112.621;112.622;112.621
      10/22/2018 12:00:10 AM;112.621;112.624;112.621
      10/22/2018 12:00:11 AM;112.621;112.623;112.621
      10/22/2018 12:00:12 AM;112.621;112.623;112.621
      10/22/2018 12:00:13 AM;112.621;112.623;112.621
      10/22/2018 12:00:14 AM;112.621;112.623;112.621
      10/22/2018 12:00:17 AM;112.621;112.623;112.621
      10/22/2018 12:00:17 AM;112.621;112.624;112.621
      10/22/2018 12:00:18 AM;112.621;112.623;112.621
      10/22/2018 12:00:18 AM;112.621;112.624;112.621
      10/22/2018 12:00:19 AM;112.621;112.623;112.621
      10/22/2018 12:00:21 AM;112.621;112.624;112.621
      10/22/2018 12:00:21 AM;112.621;112.623;112.621
      10/22/2018 12:00:36 AM;112.621;112.623;112.621
      10/22/2018 12:00:36 AM;112.622;112.624;112.622
      10/22/2018 12:00:37 AM;112.621;112.624;112.621
      10/22/2018 12:00:38 AM;112.622;112.624;112.622
      10/22/2018 12:00:39 AM;112.622;112.623;112.622

      is there a reason why all the bids = last? at any given time, there is a bid and then the "last" trade in times and sales. i'd imagine the last trade should be bouncing between ask and bid b/c fx orders are only executed at ask/bid by the brokers. can you pls test the above and confirm you're seeing the same prints? I'm printing using:


      Calculate = Calculate.OnEachTick;

      AddDataSeries("USDJPY", Data.BarsPeriodType.Tick, 1,Data.MarketDataType.Ask); //
      AddDataSeries("USDJPY", Data.BarsPeriodType.Tick, 1,Data.MarketDataType.Bid); //
      AddDataSeries("USDJPY", Data.BarsPeriodType.Tick, 1,Data.MarketDataType.Last); //

      double ask =Closes[1][0];
      double bid =Closes[2][0];
      double last =Closes[3][0];
      sw = File.AppendText(path); // Open the path for writing
      sw.WriteLine(Time[0] + ";" + last + ";" + ask + ";" + bid); // Append a new line to the file

      I'm running the above "strategy" in strategy analyzer 1 tick ask as the primary data series.

      ----------------------

      https://ninjatrader.com/support/foru...tick-data-only

      above thread the OP apparently had suggested making bid=last and it looks like everything in NT is following this methodology. looks like even a basic quote window in NT is automatically making bid=last. See screenshot 1. please note: pull up basic entry for any forex pair in NT and you will see bid=last, in fact, bid and last change simultaneously and are always bid=last

      however, my broker and most brokers are giving a bid and an ask and the last trade that it's being executed. see screenshot 2.

      why is NT defaulting last to bid?
      ———-

      all i I am trying to do at this moment is to be able to identify if the last trade for forex was at bid or ask. But bc NT is automatically just defaulting last to Bid... 99% of all trades are hitting bid. I don’t think that is correct. I’m able to do this for future instruments just fine but for forex I cannot. And also, I don’t think, ““technically forex doesn’t have last so we are defaulting last to bid”” is correct statement as mentioned in the other thread. Forex does have last. All brokers have a last that is different than ask and bid. It’s the last trade....
      Attached Files
      Last edited by staycool3_a; 10-28-2018, 09:49 PM.

      Comment


        #4
        Hello staycool3_a,

        Thank you for your response.

        The global Forex market is what is referred to as an "OTC" (Over the Counter) market. Unlike the options, futures or listed equity markets, there is no central reporting facility for OTC markets, including Forex. Hence there is no official "tape". The Last Traded Price for Forex depends entirely upon where you look.

        The Last Price request is made to the Bid Price and the same for historical data when it comes to Forex.

        The thread you linked is specific to Tick Replay and not Forex. The thread refers to the idea that the Last Tick is used for Tick Replay to pull and build Bid and Ask events.

        There is no official Last Price when it comes to Forex.

        Please let me know if you have any questions.
        Patrick H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Gav_G, Today, 02:12 PM
        3 responses
        8 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by Gav_G, Today, 01:41 PM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by kweiss, Today, 01:21 PM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by cutzpr, Today, 08:44 AM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by Burak, Yesterday, 10:40 PM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Working...
        X