Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Automated Trading and Order Submission

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

    Automated Trading and Order Submission

    I have developed a Ninja Script and have put it on auto trading; kindly guide me on how to do the settings so that following does not happen.

    1. As the strategy throws an order it will automatically be submitted to the live exchange, suppose due to some reason I have to restart the machine and the strategy generated order goes away due to reloading of the data, the computer should not automatically square up the position.

    2. Similarly if Iam flat and on reloading the data due to restarting of the computer, the strategy generates a buy order, it should not automatically get submitted. This is because the price may be very different.

    Suppose I am long one position & the corresponding stop loss & profit target have automatically been put in the exchange. Suppose, I shut down my system for some reason & restart the strategies what would be the status of the following:

    1. Will my stop loss & profit target orders that had been put into the system automatically would have got cancelled (at the exchange level) because I stopped my strategy & had the tab “cancel strategy orders on termination” checked as okay; or they would still exist into the system & the exchange.

    2. Since I am restarting my strategies based on the historical fill, will it again submit a buy order by default into the exchange if I have the tab "immediately submit live working historical orders" checked okay.

    3. Which is a better way of order handling - per entry execution or by strategy position?


    thanks!
    Last edited by kassaindia; 02-09-2010, 03:15 AM. Reason: more queries

    #2
    kassaindia, please review this important info on synching strategy vs account positions -



    If you don't want to submit orders as the strategy starts up, just the WaitUnilFlat option, this will only submit orders for a freshly generated entry signal after the strategy was started -



    There's no 'better' order handling option, as it differes what you individually would need, if you scale in and out of positions, please use PerEntryExecution.

    If you have check to cancel orders on strategy termination, the script would cancel those, but you still need to check if there's any open position you would need to take care of...

    With the 'immediately submit' the strategy sends orders if the situation at startup time warrants this.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Bertrand View Post
      If you don't want to submit orders as the strategy starts up, just the WaitUnilFlat option, this will only submit orders for a freshly generated entry signal after the strategy was started -
      Betrand can you please clarify.
      According to ninja website,


      Wait until flat before executing live
      "When a NinjaScript strategy that relies on historical data to calculate it's current position and orders state is started, it will wait until the strategy position has a flat position before executing any live orders."

      This is different from what you are saying.
      According to the website, if the option is checked, it will wait until the strategy is FLAT before submitting any live orders.

      But according to you, if the options is checked it "will only submit orders for a FRESHLY generated entry signal after the strategy was started".

      The 2 statements mean different things.

      thanks

      Comment


        #4
        Hello aljafp,

        It basically means the same; the strategy will wait with submitting orders to your account until your strategy is flat. A freshly entry signal would refer to an entry order that is submitted once your strategy position is flat.
        JasonNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Bertrand View Post
          If you don't want to submit orders as the strategy starts up, just the WaitUnilFlat option, this will only submit orders for a freshly generated entry signal after the strategy was started.
          Could you tell me how to put WaitUntilFlat directly into my strategy script? I tried putting WaitUntilFlat = true; in the Initialize section, but it wouldn't compile.

          I would rather do this than rely on the Options>Ninjascript settings.

          Comment


            #6
            yamdigger, I will have someone get back to you tomorrow regarding the correct syntax to use for the WaitUntilFlat option.
            AustinNinjaTrader Customer Service

            Comment


              #7
              yamdigger, unfortunately setting this option programmatically is not supported.
              BertrandNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by jclose, Today, 09:37 PM
              0 responses
              5 views
              0 likes
              Last Post jclose
              by jclose
               
              Started by WeyldFalcon, 08-07-2020, 06:13 AM
              10 responses
              1,413 views
              0 likes
              Last Post Traderontheroad  
              Started by firefoxforum12, Today, 08:53 PM
              0 responses
              11 views
              0 likes
              Last Post firefoxforum12  
              Started by stafe, Today, 08:34 PM
              0 responses
              11 views
              0 likes
              Last Post stafe
              by stafe
               
              Started by sastrades, 01-31-2024, 10:19 PM
              11 responses
              169 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Working...
              X