Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

IB and GetAtmStrategyPositionAveragePrice()

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

    #16
    Correct, RB trades at .0001 per tick, however, IB tacks on the commission, apparently, adding .00005 to the entry price. This was Live.

    Comment


      #17
      Thanks for sending in these files.

      I can see your avg price was actually reported as avg price=2.73595523809524

      It was likely this large decimal value which prevented it from being displayed.

      Did you happen to check the Positions tab of the Control Center at this time? How as the avg price reported in TWS?

      If you make a trade on the Sim101 account, do you see the same or is it 0.0001 as expected?

      Please let us know if you see this again on the next live trade.
      MatthewNinjaTrader Product Management

      Comment


        #18
        I did not check the Positions tab, but TWS displayed the entry as 2.73595. Sim101 is fine and works perfectly. Can you think of a work around?

        Comment


          #19
          Next Trade:

          Placed short order @ 2.7752 with Avg Fill Price of: 2.77514476190476
          Positions Tab showed price of: 2.77514476190476
          Stop and Target orders were placed properly and Stop filled correctly with Target order cancelling.

          However, the Strategy failed to place the next trade. Will investigate code, but if an error occurred with ATMStrategyId, The Strategy would be unable to reset it to String.Empty and await new trigger.

          Comment


            #20
            Did you check TWS at this time?

            From your earlier report, 2.73595 is still larger than I'd expect. Are you averaging in or this a single execution?

            Have you spoke with IB as to why the avg price is not reporting as 0.0001?
            MatthewNinjaTrader Product Management

            Comment


              #21
              Next Trade Again - Short @ 2.77724476190476:

              Basically the same as the previous one, however, I attempted to Flatten the trade through the Strategy (this works perfectly in Sim101 and other futures such as CL).

              The activating code is in a Toolstrip button with code of:

              private void btnFlatten_Click(object sender, EventArgs e)
              {
              if(orderId.Length > 0)
              AtmStrategyCancelEntryOrder(orderId);
              AtmStrategyClose(atmStrategyId);
              // atmStrategyId = string.Empty;
              // orderId = string.Empty;
              btnFlatten.Enabled = true;
              flattened = true;
              }

              The Stop and Target orders were both cancelled, however, I got an error message saying "Cancel attempted when order is not in cancellable state. Order permid =2064036466 (161) affected order: Buy 1 Limit @ 2.7707 and the position remained on. I also notice that the Log Tab is showing I placed an order for RB 03-13, but got an execution on RB 02-13 (IB Trade Log shows trades in RB 03-13).

              Would you like my Log/Trace files?

              Comment


                #22
                These are single contract trades, both short. 2.7773 - 2.77724476190476 = .0000552381 AND .0000552381 * 42000 = 2.32, the commission for the sale. I suspect if I did a buy, the price returned would be higher by just that amount.

                Comment


                  #23
                  Yes, can you please send us log&trace
                  MatthewNinjaTrader Product Management

                  Comment


                    #24
                    I just got off chat with IB. The API is reporting from the "back end" and TWS truncates for display. It is left to the client to correct it on our end.

                    Comment


                      #25
                      NT_Matthew,
                      Any idea on a resolution time frame for this issue?
                      Tom

                      Comment


                        #26
                        I do not have an ETA on this at this time.
                        MatthewNinjaTrader Product Management

                        Comment


                          #27
                          Well that makes RB virtually untradeable. I can't even flatten a position at this point. All I can do is move stops and targets around. I can do better than this from the IB TWS.

                          Give me a break.

                          Comment


                            #28
                            Snaphook,

                            Can you test this again using RB||||1 as the symbol map.

                            This would be one extra pipe from what we had mapped to earlier.

                            Testing on my end, this should ensure that the orders are correctly mapped to the RB 03-13
                            MatthewNinjaTrader Product Management

                            Comment


                              #29
                              So far so good. Entry point showed in DOM, though a tick high. Will turn A/T on to see how it performs with accessing and moving stops.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by JTizz, Today, 03:32 PM
                              1 response
                              35 views
                              0 likes
                              Last Post NinjaTrader_ChrisL  
                              Started by ebaydan777, Today, 02:41 PM
                              1 response
                              28 views
                              0 likes
                              Last Post NinjaTrader_ChrisL  
                              Started by aligator, Today, 02:28 PM
                              1 response
                              27 views
                              0 likes
                              Last Post NinjaTrader_ChristopherJ  
                              Started by daniel_weber8, Today, 01:21 PM
                              1 response
                              45 views
                              0 likes
                              Last Post NinjaTrader_ChristopherS  
                              Started by jungsoohuh, Today, 12:07 PM
                              1 response
                              35 views
                              0 likes
                              Last Post NinjaTrader_PaulH  
                              Working...
                              X