Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

why won't dots print?

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

    why won't dots print?

    i added orange dots to the plots and lines section of the indicator builder in on bar update mode and wrote

    if (1+1==2);

    as the logic but no dots appear. please advise.
    Attached Files

    #2
    Hello trader3000a,

    Thanks for your post.

    Even though you have written a condition that is true, you have terminated the condition with a ; which means the if condition would not matter.

    Additionally, more importantly, the plot will not plot unless you assign a value to it. The value you assign to the plot is the Y-axis value (price) where you want to see the dot.

    So, try:

    Dots[0] = Low[0]; // plot a dot on the low price of the bar.

    Comment


      #3
      Hi Paul, thanks for that.

      What if I want to print dots on their own panel, only when an expression is true? How do i write: if (expression); plot my dots; ?


      Do you know if the indicator builder will at some point be as highly developed as the strategy builder? i.e. We'll be able to tell it to plot stuff in the indicator builder by adding conditions and actions as easily as we can in the strategy builder?
      Last edited by trader3000a; 09-26-2021, 06:12 AM.

      Comment


        #4
        Hello trader3000a,

        Thanks for your reply.

        With a plot, you can only direct the plot to be in the price panel or in the associated indicator panel. This is controlled by the system property IsOverLay: https://ninjatrader.com/support/help...?isoverlay.htm

        "Do you know if the indicator builder will at some point be as highly developed as the strategy builder? i.e. We'll be able to tell it to plot stuff in the indicator builder by adding conditions and actions as easily as we can in the strategy builder?" I would not be able to advise but my personal opinion would be no. As you have seen in this thread, once you have created the plot structure in the indicator wizard, all you need to do is to assign the value to the plot. Keep in mind you can use the strategy builder to create your conditions (and any non plot or non order actions) that you can then view the code of and copy/paste that code into your indicator. Here is a short video: https://paul-ninjatrader.tinytake.co...NV8xMTQ5NjY2NQ

        Comment


          #5
          understood, but no dots print in the indicator panel, only in the series panel. I don't see any examples in the documentation on how to get this working. i set overlay and draw on pp to false, but nothing plots in the indicator panel. I fixed things up after watching the video, but there's still no example on how to write the "draw" code to get things into the indicator panel. I want the dots on a flat horizontal plane in the indicator panel below the bars that test true, like: ooo ooooooo ooo ooo, for example. I've attached my indicator. Help appriciated!
          Attached Files

          Comment


            #6
            Hello trader3000a,

            Thanks for your reply.

            I think you will need to clarify exactly what you are trying to do because there are two things that you are trying and they are not the same.

            You have a plot added that is set to PlotStyle.Dots yet you are not applying any value to the plots, so this means you will not see any plotted dots.

            You are using Draw.Dot() which is a draw method (not to be confused with Plots) and you are drawing the dots as the value of the Low[0] price. Because you are using IsOverlay = true, an indicator panel is added and any draw objects will be sent to the indicator panel.

            If you scale up/down the indicator panel, you will find your dots at the low price level, in the indicator panel.

            You have been asking specific questions and getting specific questions, can you provide an overview of what you are trying to accomplish as this may allow us to provide a comprehensive answer.

            Comment


              #7
              Hi Paul,
              Here's what I'm after:

              If a bar closes and the bollinger bands were inside the keltner channels when it closed, a dot is created beneath that bar on an indicator panel on a flat plane.

              David

              Comment


                #8
                Hello David,

                Thanks for your reply.

                I've modified your code and attached it below. In the indicator, you can draw the dots either with the Draw.Dot() or by using the Plot you have added named Dotz, either way, works. I recommend using plot whenever possible so I have commented out the Draw.Dot() but if you want to see it work with draw.dot instead of the plot, you can comment the plot line of Dotz[0] = 0.0; and uncomment the Draw.Dot line, then recompile, remove and apply.

                screenshot with the Plot applied:

                Click image for larger version

Name:	Trader3000a-1.PNG
Views:	337
Size:	87.2 KB
ID:	1172665


                [ATTACH]n1172666[/ATTACH]

                Comment


                  #9
                  Paul, that's very kind of you, thanks.

                  I feel like the examples in the Help files try to squeeze to many possibilities into themselves, so it's hard to parse them and modify them out into personalized indicators, even after reviewing the indicators in the indicators folder and watching the videos.

                  I know we're encouraged to learn more about the language but a few more examples of more basic ideas like the one you helped me with might save your team a lot of time. I'm very grateful for your time.

                  thanks so much!

                  David

                  Comment


                    #10
                    Hello David,

                    Thanks for your reply.

                    In an effort to help we have recently added tutorials for creating indictors and strategies to the help guide. You can find them here:





                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    633 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    364 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    105 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    567 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    568 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X