Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

my stop is not executed with the command "place"

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

    my stop is not executed with the command "place"

    hi all,

    I have a external application that use dll to place order in ninja.
    I calculate a stop loss in this application and want to execute order with this stop loss.
    I defined a variable "Stop" as double.
    My code is :

    Code:
    Command("PLACE", "Sim101", "CL 10-15", action, 1, "MARKET", 0, Stop, "GTC", "", "1", "", "");
    It works for the order but without the stop.
    I don't understand what I 'am doing wrong ?

    Thank you for your help

    #2
    Hello ghtais,

    Thank you for writing in. Please remember, in your current code you are submitting a market order so your stop will be ignored. Please change "MARKET" to "STOP" and the issue should be resolved.

    Please let me know if you have any questions or if I may be of further assistance.
    Michael M.NinjaTrader Quality Assurance

    Comment


      #3
      thanks you for your answer.
      but if I do that my order dosen't appear in Ninja
      Perhaps you mean that I have to write too lines in my code
      First one with "PLACE" command and secondly an other one with "STOP" ?

      Comment


        #4
        Hello ghtais,

        Please see the following:
        Code:
        Command("PLACE", "Sim101", "CL 10-15", action, 1, "STOP", 0, Stop, "GTC", "", "1", "", "");
        Please let me know if you have any further questions.
        Michael M.NinjaTrader Quality Assurance

        Comment


          #5
          thanks you for your answer and to be so patient with me.
          I apologize because I'am not fluent in english and it's difficult to explain the problem.

          Let me explain again with an exemple :

          My external application decides to initiate a buy at 46.23 on Crude for example.
          the code for that is :
          Code:
          Command("PLACE", "Sim101", "CL 10-15", action, 1, "MARKET", 0, 0, "GTC", "", "1", "", "");
          In this case "Action" is string with the value "BUY".
          This works fine, but in the same time I want to Add a stop at 46.15 if the market go back.

          And This is my problem, Ninja doesn't want to put the stop even with the code that you give me.

          Comment


            #6
            Hello ghtais,

            Thank you for your patience. Please manually attach yesterday's log and trace files in an email to platformsupport[AT]ninjatrader[DOT]com, so I may investigate this matter further.

            You will find the log file on your PC in the (My) Documents > NinjaTrader 7 > Log folder.

            The log file will be named "log.20150903.txt"

            You will find the trace file on your PC in the (My) Documents > NinjaTrader 7 > Trace folder.

            The trace file will be named "trace.20150903.txt"

            Please include the following in the subject line of the email: "ATTN: Michael M http://www.ninjatrader.com/support/forum/showthread.php?t=77788"

            Thank you in advance.
            Michael M.NinjaTrader Quality Assurance

            Comment


              #7
              ok, done
              thanks you

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Mestor, 03-10-2023, 01:50 AM
              16 responses
              388 views
              0 likes
              Last Post z.franck  
              Started by rtwave, 04-12-2024, 09:30 AM
              4 responses
              31 views
              0 likes
              Last Post rtwave
              by rtwave
               
              Started by yertle, Yesterday, 08:38 AM
              7 responses
              29 views
              0 likes
              Last Post yertle
              by yertle
               
              Started by bmartz, 03-12-2024, 06:12 AM
              2 responses
              22 views
              0 likes
              Last Post bmartz
              by bmartz
               
              Started by funk10101, Today, 12:02 AM
              0 responses
              7 views
              0 likes
              Last Post funk10101  
              Working...
              X