Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Tradestation Interface to Ninjatrader example

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

    #16
    imported post

    Hi Ray,

    I went to the trouble of uninstalling the beta version and then installed the regular version. It seems the ELD in your regular install is dated march 25, 2006. The beta version installs the ELD dated Dec 21, 2005. I am guessing that your beta also would like to install the latest version. I will copy over the old ELD file and try my test again. Hopefully I can get it to work.

    -Thanks


    Comment


      #17
      imported post

      Hi Ray,

      I was able to get the sample script working as you indicated it would. I did however find a few quirks with it that I think need to be addressed. I listed them below and tried to explain in detail excatly what I found. Overall I think you have a good product with a lot of potential for Tradestation users. I personally am working with Multicharts which runs tradestation scripts 100%.


      1 I noticed on several occasions that with fast moving indicies I would see a second or third order sneak in under the sample script example before the first order got filled. This is due to the fact that until the order fills the NTMarketPosition status is still a 0. maybe it would be possible to somehow indicate a order was sent and being processed ?

      2 I tried to send the orders listed below seperate. The first was a limit buy and the second is a stop. I found that this caused several stop orders and limit orders to be sent until one of then filled. Again I suspect this is due to NTMarketPosition flag not being set until a order fills.

      Suggestions:

      Modify the NTmarketPosition to accomodate for the order pending status. Don't send any other orders unless the first order fills or is cancelled. Also somehow handle a stop order sent if the two orders are not sent in the same command.





      Comment


        #18
        imported post

        Hi Widgetman,

        So that you are not offended, I want to let you know thatI did edit your last post and remove the link you provided to our competitor. I am sure you can understand that.

        Your observations are correct. We do provide methods for identifying orders and checking the status of orders. Of course, this would need to be incorporated into your scripts. This then would provide you the level of tolerance you may be looking for. I am working with another TS user who is coding some wrapper functions that would simulate how the TS Trade Manager works.

        Ray
        RayNinjaTrader Customer Service

        Comment


          #19
          imported post

          Hi Ray,

          I am not offended that you removed part of my post. I assue you though they are no competition to you right now. I would however like to see a example of how you would actually use the NTOrderStatus to prevent other orders from firing. Is it possible to do something like

          If NTOrderStatus = "Filled" then

          begin

          Proceed with routines here

          end

          The reason I ask is I am not sure easy language processes commands based on strings very well. Any example script would be appreciated. I also was gonna try to figure out how to send a NTCommand over to set the stops, strategy, and limits all in one order. Maybe that will work better.


          Comment


            #20
            imported post

            You are on the right path. You would need to pass in a unique order id, then check NTOrderStatus(orderId) = Filled


            RayNinjaTrader Customer Service

            Comment


              #21
              imported post

              Hi Ray,

              Thanks for the help. I tried the NTCommand function and was able to get a better resolution that I was looking for by also using the NTFilled function. I did notice however that the stop I set in my order entry does not stay active in the order when it gets filled. Listed below is my command I sent. Why would a stop show up under the order tab, but not br set in the actual IB order entry ?





              if
              LastBarOnChartandNTConnected(1)then

              begin

              FilledStatus=NTFilled("MyOrderId");

              if(NTMarketPosition("MyAcctId")=0)and(FilledStatus=0)then

              begin

              NTCommand("Place","MyAcctId","Sell",1,"StopLimit",(High-.0001),(High+.0010),"","","MyOrderId","","");

              FilledStatus=-1;

              end;

              end
              ;

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by AveryFlynn, Today, 04:57 AM
              0 responses
              3 views
              0 likes
              Last Post AveryFlynn  
              Started by RubenCazorla, 08-30-2022, 06:36 AM
              3 responses
              77 views
              0 likes
              Last Post PaulMohn  
              Started by f.saeidi, Yesterday, 12:14 PM
              9 responses
              23 views
              0 likes
              Last Post f.saeidi  
              Started by Tim-c, Today, 03:54 AM
              0 responses
              3 views
              0 likes
              Last Post Tim-c
              by Tim-c
               
              Started by FrancisMorro, Today, 03:24 AM
              0 responses
              5 views
              0 likes
              Last Post FrancisMorro  
              Working...
              X