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

Chart displays during/after running a strategy

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

    Chart displays during/after running a strategy

    2 issues:
    1. When I'm running a strategy, each order gets displayed textually twice on my chart, slightly overlapping. But when I disable to strategy, the duplicates disappear, leaving only one for each order. Is there a setting that prevents the duplicate displays?

    2. When I'm running a strategy, dotted lines are drawn between an opening and closing of a trade, color coded whether a profit or loss. I like this. But when I disable the strategy, the lines disappear even though the text displays about the orders do not. Is there a way to keep those lines displayed after the strategy is disabled?

    #2
    Hello dweems,

    "When I'm running a strategy, each order gets displayed textually twice on my chart, slightly overlapping. But when I disable to strategy, the duplicates disappear, leaving only one for each order. Is there a setting that prevents the duplicate displays?"

    When the strategy is disabled, the chart will be showing executions made on the Account selected in Chart Trader.
    When the strategy is enabled, the chart will be showing executions made by the strategy.

    With the strategy, are you seeing duplicates on all orders or just orders when transitioning from historical to real-time?


    "Is there a way to keep those lines displayed after the strategy is disabled?"

    Unfortunately, the profitable / unprofitable trade lines are only visible when a strategy is enabled.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      I'm only running my strategy in real time. And only in simulation mode.

      Comment


        #4
        Hello dweems,

        Historical data is processed before real-time data.

        To confirm, you have code in your script to return in OnBarUpdate() if State is State.Historical so that no orders are placed in the historical data?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          That is correct. I have "if (State != State.Realtime) return;​"

          Comment


            #6
            Hello dweems,

            All order executions are duplicated when the strategy is enabled, is this correct?

            May I have a screenshot of the chart and a screenshot of the Strategy Performance window with the Executions display selected?

            May I also confirm you are using 8.1.2.1?
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Here they are. I'm currently using 8.1.1.6 64-bit
              Attached Files

              Comment


                #8
                Hello dweems,

                The second screenshot appears to be the Executions tab of the Control Center.

                May I have you provide a screenshot of the Strategy Performance window (of both Historical & Real-time) with the Executions Display selected?
                https://ninjatrader.com/support/helpGuides/nt8/index.html?running_a_ninjascript_strategy.htm#Runn ingAninjascriptStrategyFromAChart
                https://ninjatrader.com/support/helpGuides/nt8/index.html?performance_displays.htm#UnderstandingT heExecutionsDisplay


                Also, please update to the latest release 8.1.2.1 and confirm the behavior can still be reproduced.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Here are both the displays you wanted in one file. I have updated the software to the current version and the duplicate display is still occurring while the strategy is enabled. By the way, pay no attention to the executions with respect to working properly and the Quantity. There are coding issues I will have to address.
                  Attached Files

                  Comment


                    #10
                    Hello dweems,

                    I'm not seeing the duplicated execution markers in the screenshot from your last post.

                    Are you still experiencing the behavior?
                    Which executions in this screenshot are duplicates?
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      Sorry. I made the screenshot after the strategy was disabled. All of those executions display duplicates. But the execution list from strategy performance correctly shows only one execution. So it's only the display of the executions on the chart while the strategy is running that for some reason shows 2 texts per execution. And as you see, when I disable the strategy, all those duplicate displays disappear leaving only one each.

                      Comment


                        #12
                        Hello dweems,

                        May I have you take another screenshot with the strategy enabled showing the issue?

                        Are you able to reproduce this using the SampleMACrossover included with NinjaTrader?
                        (This is so I can try and reproduce on my end)

                        What Start behavior is being used?
                        Chelsea B.NinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by fx.practic, 10-15-2013, 12:53 AM
                        5 responses
                        5,406 views
                        0 likes
                        Last Post Bidder
                        by Bidder
                         
                        Started by Shai Samuel, 07-02-2022, 02:46 PM
                        4 responses
                        98 views
                        0 likes
                        Last Post Bidder
                        by Bidder
                         
                        Started by DJ888, Yesterday, 10:57 PM
                        0 responses
                        8 views
                        0 likes
                        Last Post DJ888
                        by DJ888
                         
                        Started by MacDad, 02-25-2024, 11:48 PM
                        7 responses
                        160 views
                        0 likes
                        Last Post loganjarosz123  
                        Started by Belfortbucks, Yesterday, 09:29 PM
                        0 responses
                        9 views
                        0 likes
                        Last Post Belfortbucks  
                        Working...
                        X