Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Calling NTmarketPosition() broken for KC market

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

    Calling NTmarketPosition() broken for KC market

    Hello,

    I'm using TS 8.7 (3085) + NT DLL method in NT simulation mode ("sim 101" account
    ) to do automated paper trading. Using NT's simulated KC coffee data feed and sending orders from TradeStation (TS) to NT using the "place order" NTcommand() fucntion works fine but calling the NTMarketPosition("") function from within an TS Easylanguge strategy does not return the correct value (it always returns zero) even though NT is say long 10 contracts in the NT platform. Calling NTmarketPosition("") from within TS always returns zero for all other symbols too.

    Note that calling the NTOrderStatus("") function for the Coffee market (and all other futures markets too) does work fine and returns the correct string, its just the NTmarketPosition() function this is not returning the correct integer value for all futures markets when doing paper trading using NT DLL + TS 8.7 and using the NT internal simulated data feed which can set-up via by connecting to "simulated data feed" when setting up a connection.

    Could someone from NT customer service please try and duplicate this problem on their computer and let me know if they can see the same problem?

    thanks in advance.

    Regards,

    Rod
    Last edited by Rocket130713; 11-23-2010, 06:25 AM.

    #2
    Hi Rod, thanks for the post - I'll give this a run here on our end and update you what I see.

    Thanks,
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Rod, I tried reproducing here, entered a position on the simulated datafeed in NT on KC 03-11 and then tried printing this position info (Price, MarketPosition and some account stats) to TS's print output log and I had no issues here - would you mind sharing the TS code you used, so I could run it here?
      BertrandNinjaTrader Customer Service

      Comment


        #4
        thanks for trying to solve our problem. if you can't duplicate the problem then thats ok. unfortunately, we cant provide you with any of our TS codes as they are proprietary in nature.

        One question though: When you tested for our problem using the NT KC 03-11 symbol in NT using the NT simulated data feed, did you just have the words KC next to the external heading in Misc? or did you map to KC 03-11 or KC|03 11 next to the external heading in Misc?

        thanks in advance.
        Last edited by Rocket130713; 11-24-2010, 07:46 AM.

        Comment


          #5
          Hello,

          Since Bertrand was the one to test I will have him respond as soon as he can.

          Thanks for your patience.

          Comment


            #6
            Hi Rod, I was testing just the TS symbol base name as map, so KC under Misc > External.

            I would suggest you test with some simple sample code outside your main strategy first to isolate potential causes out, for example try :

            Code:
            if NTConnected(1) then begin
            Print("Position size: " + NumToStr(NTMarketPosition(""), 0));		
            Print("AvgEntryPrice: " + NumToStr(NTAvgEntryPrice(""), 2));
            Print("OrderStatus: " 	+ NTOrderStatus("MyOrderId"));
            Print("Filled #: " 		+ NumToStr(NTFilled("MyOrderId"), 0));
            Print("AvgFillPrice: " 	+ NumToStr(NTAvgFillPrice("MyOrderId"), 2));
            Print("BuyingPower: " 	+ NumToStr(NTBuyingPower(""), 2));
            Print("CashValue: " 	+ NumToStr(NTCashValue(""), 2));
            Print("RealizedPnL: " 	+ NumToStr(NTRealizedPnL(""), 2));
            Print("Open Orders"     + NTOrders(""));
            end;
            BertrandNinjaTrader Customer Service

            Comment


              #7
              thanks Bertrand. I managed to solve this problem by re-installing the NT program. I can now get proper values returned when I call NTmarketPosition("") from within TS EL code, using the NT simulated data feed. So this problem is now resolved. thank you for your help, much appreciated.

              Comment


                #8
                Originally posted by Rocket130713 View Post
                thanks Bertrand. I managed to solve this problem by re-installing the NT program. I can now get proper values returned when I call NTmarketPosition("") from within TS EL code, using the NT simulated data feed. So this problem is now resolved. thank you for your help, much appreciated.
                Glad to hear you got it working Rod
                BertrandNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by trilliantrader, 04-18-2024, 08:16 AM
                5 responses
                22 views
                0 likes
                Last Post trilliantrader  
                Started by Davidtowleii, Today, 12:15 AM
                0 responses
                3 views
                0 likes
                Last Post Davidtowleii  
                Started by guillembm, Yesterday, 11:25 AM
                2 responses
                9 views
                0 likes
                Last Post guillembm  
                Started by junkone, 04-21-2024, 07:17 AM
                9 responses
                68 views
                0 likes
                Last Post jeronymite  
                Started by mgco4you, Yesterday, 09:46 PM
                1 response
                12 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Working...
                X