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 sidlercom80, 10-28-2023, 08:49 AM
                              168 responses
                              2,262 views
                              0 likes
                              Last Post sidlercom80  
                              Started by Barry Milan, Yesterday, 10:35 PM
                              3 responses
                              10 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Started by WeyldFalcon, 12-10-2020, 06:48 PM
                              14 responses
                              1,429 views
                              0 likes
                              Last Post Handclap0241  
                              Started by DJ888, 04-16-2024, 06:09 PM
                              2 responses
                              9 views
                              0 likes
                              Last Post DJ888
                              by DJ888
                               
                              Started by jeronymite, 04-12-2024, 04:26 PM
                              3 responses
                              41 views
                              0 likes
                              Last Post jeronymite  
                              Working...
                              X