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

Trace orders dot colors for overlapping strategies

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

    Trace orders dot colors for overlapping strategies

    Hello,

    Is it possible to have some overlapping strategies and have different trace orders colours for each strategy so it becomes easy to spot the pros and cons of each strategy. I can set 2 colours for winning and losing trades, but they are all applicable to all overlapping strategies and it makes very difficult to differentiate them.

    Thanks for your help.




    #2
    Hello roblogic,

    Thank you for the question.

    I am not able to determine from how this is worded, are you talking about the programming output TraceOrders or are you just saying the word trace here in contrast to the Order Markers you see on a chart while the strategy trades?

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Sorry for the poor wording. Please see att the picture. It shows 2 overlapping strategies and I would like the TraceOrder dots to have different colours for each strategy so I can tell which trades are placed from each of the strategies.

      Comment


        #4
        Hello roblogic,

        I believe you mean the Plot Executions color for your executions based on the image. If you mean the arrows and lines, that is a property of the chart specifically or the settings you see at the bottom of the DataSeries window. This would not be able to be set to two values at once, this is a singular color for the whole chart. If you wanted to draw different colored objects you would need to have the strategy draw its own drawing objects to further isolate them when running in the same chart.

        I look forward to being of further assistance.

        JesseNinjaTrader Customer Service

        Comment


          #5
          Ok I understand. Do you have any sample showing how to plot a line or dots from the open position to the exit so that I can customize it for each of my strategies?

          Comment


            #6
            Hello roblogic,

            One other thought that comes to mind is that because you are using NT8 you could use two panels for this use case. I am unaware of any specific samples of drawing your own executions however that could be accomplished in code. If the steps below do not produce the outcome you are after, we can go into more detail about what might be required to draw this yourself.
            1. Create a chart with two of the same instrument, for example, two ES 1 minute charts you will get two panels showing the same data.
            2. You can then change the plot execution settings per data series to what you want
            3. Apply one strategy to each of the separate instruments, when configuring the strategy, click "Input Series" and select the 1st series for the 1st strategy and the 2nd series for the 2nd strategy.
            4. This will result in two strategies in two panels with different color plot markers.
            5. You could click on the bars and drag the bars to the first panel to now overlap the two strategies.


            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Jesse View Post
              Hello roblogic,

              One other thought that comes to mind is that because you are using NT8 you could use two panels for this use case. I am unaware of any specific samples of drawing your own executions however that could be accomplished in code. If the steps below do not produce the outcome you are after, we can go into more detail about what might be required to draw this yourself.
              1. Create a chart with two of the same instrument, for example, two ES 1 minute charts you will get two panels showing the same data.
              2. You can then change the plot execution settings per data series to what you want
              3. Apply one strategy to each of the separate instruments, when configuring the strategy, click "Input Series" and select the 1st series for the 1st strategy and the 2nd series for the 2nd strategy.
              4. This will result in two strategies in two panels with different color plot markers.
              5. You could click on the bars and drag the bars to the first panel to now overlap the two strategies.

              Thanks for the suggestion. I assume this will result in one chart above the other with different zoom settings for each chart. Correct?

              What I would like is to have both strategies running in the same chart so I don't have to sync the zoom levels.

              Ideally I should be able to code the strategy with the variables with public access modifiers, so once overlapped in the same chart I can change the inputs and see how they affect performance comparing several strategies / inputs at the same time.

              Can you outline some guidelines / samples so that I can get it done in code?

              Thanks!

              Comment


                #8
                Hello roblogic,

                I assume this will result in one chart above the other with different zoom settings for each chart. Correct?
                If you use two panels, but if you follow through with the instructions you can see they get put into one panel. As long as both series have the right scale selected, when you scale in or out they would be the same scaling. The X scale will also be aligned in that use case, it essentially looks and acts as 1 set of bars.

                As far as sharing between two strategies this is not something we have a sample for or really suggest, this would not be as simple as a strategy calling an indicator. If the strategies are this closely tied we would suggest combining the logic into a single strategy.

                The options at your original goal for separate colors would include either drawing this yourself from each strategy which in that case 1 data series is used, or you can use two dataseries and overlay them and then you have separate control over the colors. Going other routes like trying to sync data between two strategies would not be something I could suggest for this use case. If two scripts are required and a single series is required, using drawing objects would be my next suggestion.


                I look forward to being of further assistance.
                JesseNinjaTrader Customer Service

                Comment


                  #9
                  Ok I got it. Your instructions lead to exactly what I needed. Thanks!

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Jonafare, 12-06-2012, 03:48 PM
                  5 responses
                  3,984 views
                  0 likes
                  Last Post rene69851  
                  Started by Fitspressorest, Today, 01:38 PM
                  0 responses
                  2 views
                  0 likes
                  Last Post Fitspressorest  
                  Started by Jonker, Today, 01:19 PM
                  0 responses
                  2 views
                  0 likes
                  Last Post Jonker
                  by Jonker
                   
                  Started by futtrader, Today, 01:16 PM
                  0 responses
                  7 views
                  0 likes
                  Last Post futtrader  
                  Started by Segwin, 05-07-2018, 02:15 PM
                  14 responses
                  1,791 views
                  0 likes
                  Last Post aligator  
                  Working...
                  X