Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

a divergence signal that plots right under the price bar

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

    a divergence signal that plots right under the price bar

    Delay my last I figured it out.

    Can you help me out with a divergence signal that plots right under the price bar once it goes into divergence? I don't want anything in the lower pane of the chart like a CCI or MacD but just to have a signal pop up on my chart once we are in divergence territory. I can start a new ticket.
    Attached Files

    #2
    Hello trdninstyle,

    As your inquiry is not related to the previous thread topic, I have moved your post to a new thread.

    For an indicator to plot or draw on the same panel as the price bars panel, set IsOverlay to true.


    To draw a dot or other drawing object you can call Draw.Dot() or similar method in the action block of the condition statement that determines 'divergence'.


    For this to be under the bar, you can subtract a few ticks from the Low[0] of the bar, and use this for the y price values of the drawing object.
    Low[0] - 5 * TickSize


    What is the logic you want in the condition set?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thank you, Chelse B.

      My logic is to print a symbol, be it a star, dot, arrow, something. To indicate when price moves into divergence.

      I started a new indicator and started to put in the codes one step at a time. I'm just putting in the examples for now, like the sma even tho I'm not using that.
      Attached Files

      Comment


        #4
        Hello trdninstyle,

        In the image the code you have shown can be used in later areas of the script like OnBarUpdate. The note you pointed to mentions it cannot be used from OnStateChange SetDefaults specifically.

        Comment


          #5
          How do I initiate to instruct script to spot divergence?

          Comment


            #6
            Hello trdninstyle,

            You would need to form conditions for whatever price conditions that you want to check for. Divergence could be interpreted as the amount of difference between two prices, is that what you are referring to finding?

            We can point a better direction if you provide more specific details on what conditions you wanted to check for.

            You can also review existing items on the public user app share:
            This is a conversion from NinjaTrader 7 of the Divergence Spotter indicator originally created by Ben Letto, November 2007, [email protected], as requested by a user. This version has optional background stripes. Update 01/24/2022: Fixed bug that kept indicator from loading on initial application to the chart (previously you had to reload NinjaScript on the chart […]




            Comment


              #7
              Yes, thats what I'm looking for.

              "Divergence could be interpreted as the amount of difference between two prices" Once there's a divergence between the Price & a CCI to plot a Diamond or Star under the bar.

              Those indicators you showed are also a good way for me to have a look at the code. I'm going to go look now.

              Comment


                #8
                These divergence indicators are sufficient for my purpose. I can certainly find one the makes me happy.

                I made another indicator yesterday that I really like, it identifies 3 pushes up and 3 pushes down which is a Wedge. Market tries 3 times to go in one direction when it fails it then tries the other direction, typically. Right now, I only know how to paint the bars, but I would like to Label instead, PSH 1 PSH 2 PSH 3

                I can start a new ticket with that showing my script.
                Thanks for that.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                672 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                379 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                111 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                577 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                582 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X