Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Moving multiple targets from TradeStation

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

    Moving multiple targets from TradeStation

    Hi I've updated to NinjaTrader 6.5.1000.11 (Live) and I'm still having trouble moving targets from within Tradestation.

    From Tradestation via the DLL I place an order with a strategy for two contracts which has two targets.

    As a test I then use the following Easylanguage code and get the Ninja log output at the bottom of this message;

    T1 = 998.5;
    T2 = 999.5;
    BestStop = 991.25;

    once value1= NTCommand("CHANGE", NTAccount, "SELL", FullSize, "STOP", 1, BestStop , "DAY", "", "STOP1", "", MyStrategyID);
    once value1= NTCommand("CHANGE", NTAccount, "SELL", FullSize, "STOP", 1, BestStop , "DAY", "", "STOP2", "", MyStrategyID);
    once value1= NTCommand("CHANGE", NTAccount, "BUY", 1, "LIMIT", T1, 0 , "DAY", "", "TARGET1", "", MyStrategyID);
    once value1= NTCommand("CHANGE", NTAccount, "BUY", 1, "LIMIT", T2, 0 , "DAY", "", "TARGET2", "", MyStrategyID);

    STOP1 moves to the correct price and Target1 also moves to its correct price however Target2 is cancelled as is STOP2, the relevant section of the Ninja log is below;

    Date Category Message
    04/08/2009 10:35 Order Order='faa4f7e4d7d94786856c650093a45d00/Impulse' Name='Target1' New State=Cancelled Instrument='ES 09-09' Action=Sell Limit price=996.25 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 Order Order='cddf1bf9891147b79a7dedebe91d5309/Impulse' Name='Stop1' New State=Cancelled Instrument='ES 09-09' Action=Sell Limit price=986.25 Stop price=991.25 Quantity=1 Type=StopLimit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 Order Order='3f7b206692714aaf9b5983a8aee9aebc/Impulse' Name='Target1' New State=Working Instrument='ES 09-09' Action=Sell Limit price=998.5 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 Order Order='3f7b206692714aaf9b5983a8aee9aebc/Impulse' Name='Target1' New State=Accepted Instrument='ES 09-09' Action=Sell Limit price=998.5 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 Order Order='4e07ca6914f449699520ec9b2b4459ad/Impulse' Name='Stop2' New State=Cancelled Instrument='ES 09-09' Action=Sell Limit price=988 Stop price=993 Quantity=1 Type=StopLimit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 Order Order='967847423d5443a19fc35c7ac17e02bc/Impulse' Name='Target2' New State=Cancelled Instrument='ES 09-09' Action=Sell Limit price=1000.25 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 Order Order='cddf1bf9891147b79a7dedebe91d5309/Impulse' Name='Stop1' New State=PendingCancel Instrument='ES 09-09' Action=Sell Limit price=986.25 Stop price=991.25 Quantity=1 Type=StopLimit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 Order Order='faa4f7e4d7d94786856c650093a45d00/Impulse' Name='Target1' New State=PendingCancel Instrument='ES 09-09' Action=Sell Limit price=996.25 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 Order Order='faa4f7e4d7d94786856c650093a45d00/Impulse' Name='Target1' New State=Working Instrument='ES 09-09' Action=Sell Limit price=996.25 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 Order Order='faa4f7e4d7d94786856c650093a45d00/Impulse' Name='Target1' New State=Accepted Instrument='ES 09-09' Action=Sell Limit price=996.25 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 Order Order='cddf1bf9891147b79a7dedebe91d5309/Impulse' Name='Stop1' New State=Accepted Instrument='ES 09-09' Action=Sell Limit price=986.25 Stop price=991.25 Quantity=1 Type=StopLimit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 Order Order='cb79829c1028430a9d1a2969657db55c/Impulse' Name='Stop1' New State=Accepted Instrument='ES 09-09' Action=Sell Limit price=986.25 Stop price=991.25 Quantity=1 Type=StopLimit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 ATI AT
    04/08/2009 10:35 Order Order='3f7b206692714aaf9b5983a8aee9aebc/Impulse' Name='Target1' New State=PendingChange Instrument='ES 09-09' Action=Sell Limit price=998.5 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 ATI AT
    04/08/2009 10:35 ATI AT
    04/08/2009 10:35 Order Order='faa4f7e4d7d94786856c650093a45d00/Impulse' Name='Target1' New State=PendingSubmit Instrument='ES 09-09' Action=Sell Limit price=996.25 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 Order Order='cddf1bf9891147b79a7dedebe91d5309/Impulse' Name='Stop1' New State=PendingSubmit Instrument='ES 09-09' Action=Sell Limit price=986.25 Stop price=991.25 Quantity=1 Type=StopLimit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 Order Order='967847423d5443a19fc35c7ac17e02bc/Impulse' Name='Target2' New State=PendingCancel Instrument='ES 09-09' Action=Sell Limit price=1000.25 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 Order Order='4e07ca6914f449699520ec9b2b4459ad/Impulse' Name='Stop2' New State=PendingCancel Instrument='ES 09-09' Action=Sell Limit price=988 Stop price=993 Quantity=1 Type=StopLimit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 Order Order='cb79829c1028430a9d1a2969657db55c/Impulse' Name='Stop1' New State=PendingChange Instrument='ES 09-09' Action=Sell Limit price=986.25 Stop price=991.25 Quantity=1 Type=StopLimit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 ATI AT
    04/08/2009 10:35 Order Order='967847423d5443a19fc35c7ac17e02bc/Impulse' Name='Target2' New State=Working Instrument='ES 09-09' Action=Sell Limit price=1000.25 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 Order Order='967847423d5443a19fc35c7ac17e02bc/Impulse' Name='Target2' New State=Accepted Instrument='ES 09-09' Action=Sell Limit price=1000.25 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 Order Order='4e07ca6914f449699520ec9b2b4459ad/Impulse' Name='Stop2' New State=Accepted Instrument='ES 09-09' Action=Sell Limit price=988 Stop price=993 Quantity=1 Type=StopLimit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 Order Order='3f7b206692714aaf9b5983a8aee9aebc/Impulse' Name='Target1' New State=Working Instrument='ES 09-09' Action=Sell Limit price=996.25 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 Order Order='3f7b206692714aaf9b5983a8aee9aebc/Impulse' Name='Target1' New State=Accepted Instrument='ES 09-09' Action=Sell Limit price=996.25 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 Order Order='cb79829c1028430a9d1a2969657db55c/Impulse' Name='Stop1' New State=Accepted Instrument='ES 09-09' Action=Sell Limit price=988 Stop price=993 Quantity=1 Type=StopLimit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 Order Order='967847423d5443a19fc35c7ac17e02bc/Impulse' Name='Target2' New State=PendingSubmit Instrument='ES 09-09' Action=Sell Limit price=1000.25 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 Order Order='4e07ca6914f449699520ec9b2b4459ad/Impulse' Name='Stop2' New State=PendingSubmit Instrument='ES 09-09' Action=Sell Limit price=988 Stop price=993 Quantity=1 Type=StopLimit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 Order Order='3f7b206692714aaf9b5983a8aee9aebc/Impulse' Name='Target1' New State=PendingSubmit Instrument='ES 09-09' Action=Sell Limit price=996.25 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 Order Order='cb79829c1028430a9d1a2969657db55c/Impulse' Name='Stop1' New State=PendingSubmit Instrument='ES 09-09' Action=Sell Limit price=988 Stop price=993 Quantity=1 Type=StopLimit Filled=0 Fill price=0 Error=NoError Native error=''
    04/08/2009 10:35 Position Instrument='ES 09-09' Account='Impulse' Avg price=994 Quantity=2 Market position=Long Operation=Update Currency=Unknown
    04/08/2009 10:35 Execution Execution='89d8c2538ae244af9137603fee07b054' Instrument='ES 09-09' Account='Impulse' Exchange=Default Price=994 Quantity=1 Market position=Long Operation=Insert Order='843ee9d72a3140c9a27cb93e73afd507' Time='04/08/2009 10:35:48'
    04/08/2009 10:35 Order Order='843ee9d72a3140c9a27cb93e73afd507/Impulse' Name='Entry' New State=Filled Instrument='ES 09-09' Action=Buy Limit price=0 Stop price=0 Quantity=2 Type=Market Filled=2 Fill price=994 Error=NoError Native error=''
    04/08/2009 10:35 Position Instrument='ES 09-09' Account='Impulse' Avg price=994 Quantity=1 Market position=Long Operation=Insert Currency=Unknown
    04/08/2009 10:35 Execution Execution='d072cd34748141fead2c0fe5a55c2b3b' Instrument='ES 09-09' Account='Impulse' Exchange=Default Price=994 Quantity=1 Market position=Long Operation=Insert Order='843ee9d72a3140c9a27cb93e73afd507' Time='04/08/2009 10:35:48'
    04/08/2009 10:35 Order Order='843ee9d72a3140c9a27cb93e73afd507/Impulse' Name='Entry' New State=PartFilled Instrument='ES 09-09' Action=Buy Limit price=0 Stop price=0 Quantity=2 Type=Market Filled=1 Fill price=994 Error=NoError Native error=''
    04/08/2009 10:35 Order Order='843ee9d72a3140c9a27cb93e73afd507/Impulse' Name='Entry' New State=Working Instrument='ES 09-09' Action=Buy Limit price=0 Stop price=0 Quantity=2 Type=Market Filled=0 Fill price=0 Error=NoError Native error=''





    Please advise,
    Thanks

    Kevin.
    Last edited by strad739; 08-04-2009, 03:39 AM.

    #2
    Kevin, for the latest TS releases, please ensure you're on NinjaTrader 6.5.1000.11. Then retest, thanks.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Kevin, I would then need to reproduce this on my end here, it would be great if you can contact me at support at ninjatrader dot com Attn Bertrand with your logs files and if possible the TS test code you used. Thanks!
      BertrandNinjaTrader Customer Service

      Comment


        #4
        Requested files.

        Hi Bertrand I have emailed you the files.

        If you need anything else please let me know.

        Thanks

        Kevin.

        Comment


          #5
          Thanks Kevin got them and will review.
          BertrandNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Nolyn, Today, 10:59 AM
          0 responses
          1 view
          0 likes
          Last Post Nolyn
          by Nolyn
           
          Started by Gkomi, Today, 10:02 AM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Jim  
          Started by JTizz, Today, 08:58 AM
          6 responses
          29 views
          0 likes
          Last Post NinjaTrader_PaulH  
          Started by Bob49, Today, 08:40 AM
          0 responses
          19 views
          0 likes
          Last Post Bob49
          by Bob49
           
          Started by Malik_demoacct, Today, 08:31 AM
          0 responses
          17 views
          0 likes
          Last Post Malik_demoacct  
          Working...
          X