Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy start - activate on weekends!? Status never turned „green“!?

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

    Strategy start - activate on weekends!? Status never turned „green“!?

    Hi Traders and tecnical support!

    I use the nt8 session templates when i add a strategy to the tab in the control center.

    When i activate a strategy on weekends it often shows the orange status , indicating that the strategy is long/short.

    But that is not tru because all of my strategies are exiting before session close.

    On Monday then - just after the session start I need to deactivate the strategy and directly re activate the strategy again.

    Only then it is turning to green!?

    Sorry for my englisch...and greetings from Germany.

    #2
    Hello oheyn,

    Thanks for your first post in the forums!

    With reference the help guide (linked below), "Orange highlighted "Strategy" name indicates the strategy is waiting until it reaches a flat position to be in sync with the account position before fully starting.".



    For additional start-up information, please see: https://ninjatrader.com/support/help..._positions.htm
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Dear Paul!

      I know this....but when I activate before the Session - and then the sessions starts- the strategy never turned Green!

      Only when I uncheck the strategy and directly mark again - it turns green????

      Comment


        #4
        Hello oheyn,

        Thanks for your reply.

        We do not know what you know so we have to start at the beginning.

        We do not know what your strategy is doing nor what your settings are so we have to ask further questions to help understand.

        Please run a strategy performance report (Right mouse click on the strategy and select strategy performance) and review to see what trade is open that is causing the Orange condition. Alternatively, put your strategy on a chart with plot executions enabled (in the data series of the chart) and review these trades near the end and beginning of the session. So I am asking you to verify your statement, "But that is not tru because all of my strategies are exiting before session close."

        If the performance report or the strategy on the chart do not show an open order, When you apply your strategy on the weekends, does it show a strategy position and/or an account position in the strategy tab? Can you provide a screenshot of this.



        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Hi Paul!

          I am not in the office until November 12.

          But generally- yes - if i start before the selected session (selected with adding the strategy) it is orange when there is a position. But, my strategy is closing any position before 10pm.... ??? So, why should the strategy open a position after?


          Comment


            #6
            Hello oheyn,

            Thanks for your reply.

            I would not know why and this is why I suggested you apply the strategy to a chart to help visualize what the strategy is actually doing.
            Paul H.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_PaulH View Post
              Hello oheyn,

              Thanks for your reply.

              I would not know why and this is why I suggested you apply the strategy to a chart to help visualize what the strategy is actually doing.
              Hi Paul!

              Here a new example:

              Last Friday the strategy executed a sell order at 17:15

              The strategy trading hours are CME ETH

              The strategy is set to exit 30second before session close

              --> Now it is Sunday and the strategy is still short and the therefore orange in the strategy tab of the control center!?
              --> It should be green because the strategy should closed the position on session close!?
              --> I am sure that as soon as the CME ETH session starts I am able to to activate the strategy...but why not now???

              Where can be the problem?

              Thanks for your help.


              Last edited by oheyn; 11-10-2019, 03:11 PM.

              Comment


                #8
                Hello oheyn,

                Thanks for your reply.

                If I understand correctly, you place an order after the market close on Friday?

                If so then there would be no exit on session close as the Friday session is already closed. There are no other sessions until the mark re-opens on Sunday afternoon.
                Paul H.NinjaTrader Customer Service

                Comment


                  #9
                  Hi Paul!

                  Attached the requested infos...hope you can help with that.
                  Thanks for coming back on this :-)

                  Attached Files

                  Comment


                    #10
                    Hello oheyn,

                    Thanks for your reply.

                    I see the entry on Friday November 8th at 17:15 your time (CET) but there is no ExitOnSessionClose exit. It appears the order was closed on MonDay November 11 at 45 minutes after midnight your time followed immediately by a new short entry.

                    In looking at the other days I noted that on Friday November 1st and entry order at 7:15 was closed by ExitOnSessionClose at 22:00. Also, Friday October 25 at 18:45 shows an Entry and the order was closed by ExitOnSessionClose but this time it is at 23:00. I suppose that may be related to changing the clocks for daylight saving time.

                    The YM instrument, by default, is assigned the trading hours of CME US Index Futures ETH. These trading hours have a consistent start and end time Sunday through Friday. Can you verify which trading hours template you are using? Further, if it is a custom one, please provide a screenshot of the Trading hours that are in the template.

                    A solution you can employ for now would be to modify your strategy to use a simple time filter such as:

                    Code:
                    if ((Times[0][0].TimeOfDay > new TimeSpan(22, 30, 0))
                                     && (Times[0][0].TimeOfDay < new TimeSpan(22, 55, 0))
                                     && (Times[0][0].DayOfWeek == DayOfWeek.Friday)
                                     && (Position.MarketPosition != MarketPosition.Flat))
                                {
                                    ExitShort(Convert.ToInt32(DefaultQuantity), "", "");
                                    ExitLong(Convert.ToInt32(DefaultQuantity), "", "");
                                }
                    If the time is between 22:30 your time and 22:55 your time and is a Friday and you are in a position (Not Flat), to then issue ExitLong() and ExitShort().

                    Paul H.NinjaTrader Customer Service

                    Comment


                      #11
                      Hi Paul!

                      thanks for your detailed answer.

                      I am using the standard CME ETH template.

                      Strategy works on bar close...could this be the problem?
                      Last edited by oheyn; 11-13-2019, 01:56 PM.

                      Comment


                        #12
                        Hello oheyn,

                        Thanks for your reply.

                        I've created a test strategy I would like you to test on your end, please assign it to the sim account and run the strategy in the same way that you currently are.
                        The test strategy will only ever place one order per week which will be at 2:00 PM (CET) on each Friday. After adding it in and enabling it, you can run a performance report and observe its historical exits.which should be very consistent.

                        ExitOnCloseTest.zip
                        Paul H.NinjaTrader Customer Service

                        Comment


                          #13
                          Here we go
                          Attached Files

                          Comment


                            #14
                            Hello oheyn,

                            Thanks for your reply.

                            You can also test that on PlayBack with market replay data if you wish (I did here).

                            Please keep the test strategy running on your live data and report any further anomalies with either strategy (yours and the test) showing the executions page for both if needed.

                            I've also provided you with code you can add to your strategy in post #10 to ensure that you are exiting on Friday.


                            Paul H.NinjaTrader Customer Service

                            Comment


                              #15
                              Hello Paul!

                              Again the same Problem with a different strategy.
                              I activate on Saturday a 24/7 YM strategy.
                              Status was green - ready to fire.
                              Today I wondered why no trade was executed.
                              I disabled and enabled the strategy.
                              And...like a wonder - green status is orange with an execution at x167 (now x300).

                              Again, why could this happen????

                              If anybody can help me with this?

                              Thanks a lot and happy trading!

                              Oliver

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by funk10101, Today, 09:43 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post funk10101  
                              Started by pkefal, 04-11-2024, 07:39 AM
                              11 responses
                              37 views
                              0 likes
                              Last Post jeronymite  
                              Started by bill2023, Yesterday, 08:51 AM
                              8 responses
                              44 views
                              0 likes
                              Last Post bill2023  
                              Started by yertle, Today, 08:38 AM
                              6 responses
                              26 views
                              0 likes
                              Last Post ryjoga
                              by ryjoga
                               
                              Started by algospoke, Yesterday, 06:40 PM
                              2 responses
                              24 views
                              0 likes
                              Last Post algospoke  
                              Working...
                              X