Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Wait until flat before executing live

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

    #16
    Just as a tip, using a buy-to-cover from flat on a live bar is sent for execution, thank you very much.

    I am using UNMANAGED orders, and really all I need is Ninja to send them for execution.

    Comment


      #17
      BTW ... If I use an opening Stop order in MarketReplay on a Sunday afternoon, the order gets rejected after the following message: "Market Replay Connection, There is no market data available to drive the simulation engine. affected Order: Buy Stop @ 94.19".

      On top of that, the strategy does not get notified that the order is Rejected.

      Comment


        #18
        Hi Dominique,

        Because the market replay is running over sunday I would expect this behavior.

        The Market Replay may be running but there also needs to have been recorded trades during the time you are placing orders.

        If you are receiving active bid / ask information the order should place with the Market Replay.

        So that I may test this on my end, which instrument (+expiry), and exactly what time did you place this order?


        I look forward to your reply.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #19
          Hi Chelsea

          CL 02-13 ... Sunday date : January 6, 2013.

          BTW ... sorry for the harsh tone yesterday

          Regards
          Dominique

          Comment


            #20
            Hello Dominique,

            Thank you for that information.

            I was not able to download that day of replay data to test as the data is no longer available.

            However, I am fairly certain this is the cause. During playback, if you select this instrument in the Control Center does it show that you are receiving updated Bid/Ask information?
            Chelsea B.NinjaTrader Customer Service

            Comment


              #21
              Hi Chelsea,

              I "cheated" by changing the Sunday session open to 6:15pm ... in that case, the strategy starts and submits the orders for execution before the 6:15pm session open, which is enough for me to validate that behavior at this stage (I will have all the week-end to test it against my IB live account).

              After quite a bit of rework of my own code, I have reached a point where my strategy can be stopped then restarted, and it restarts from exactly the same position & open-orders, regardless of any update of historical data in the interval. It then checks what its position should be, given the current historical data, vs what the position was prior to restart, and adjusts that position accordingly.

              I also found the answer to my own question which started this thread. A strategy can decide of its own start mode, "WaitUntilFlat" or "ImmediatelySubmitOrders", independently of the global setting in Options / Strategy / NinjaScript ... In Initialize(), use :

              StrategySync = NinjaTrader.Strategy.StrategySync.SubmitImmediatel y;

              or

              StrategySync = NinjaTrader.Strategy.StrategySync.WaitUntilFlat;


              Cheers
              Dominique

              Comment


                #22
                Hello Dominique,

                It looks like you are on the right path, and that is very interesting about how you are developing your strategy.

                Also, thank you for letting me know about the StrategySync. I will let Bertrand know you have found the answer to this question.


                Please let me know if I can be of any further assistance.
                Chelsea B.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by rbeckmann05, Yesterday, 06:48 PM
                1 response
                12 views
                0 likes
                Last Post bltdavid  
                Started by llanqui, Today, 03:53 AM
                0 responses
                6 views
                0 likes
                Last Post llanqui
                by llanqui
                 
                Started by burtoninlondon, Today, 12:38 AM
                0 responses
                10 views
                0 likes
                Last Post burtoninlondon  
                Started by AaronKoRn, Yesterday, 09:49 PM
                0 responses
                15 views
                0 likes
                Last Post AaronKoRn  
                Started by carnitron, Yesterday, 08:42 PM
                0 responses
                11 views
                0 likes
                Last Post carnitron  
                Working...
                X