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 rhyminkevin, Today, 04:58 PM
              0 responses
              9 views
              0 likes
              Last Post rhyminkevin  
              Started by lightsun47, Today, 03:51 PM
              0 responses
              5 views
              0 likes
              Last Post lightsun47  
              Started by 00nevest, Today, 02:27 PM
              1 response
              12 views
              0 likes
              Last Post 00nevest  
              Started by futtrader, 04-21-2024, 01:50 AM
              4 responses
              48 views
              0 likes
              Last Post futtrader  
              Started by Option Whisperer, Today, 09:55 AM
              1 response
              15 views
              0 likes
              Last Post bltdavid  
              Working...
              X