Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plot a line above or bellow price

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

    Plot a line above or bellow price

    My stops are certain amount of ticks either bellow or above the current price.
    I did that very easily in ninjatrader 7
    If Falling = False ( that means the bars are going up ) then draw a dot on current bar at high-8 ticks.
    Same but opposite for the short stops.

    It works perfect but...

    when I tried to do the same exact thing in ninjatrader 8 it did not work - did not plot anything ( i did enable the strategy ).

    Huge thank you in advance.

    Any idea why ? Click image for larger version

Name:	ES 09-20 (RJay's RenkoSpectrum 4-1)  9_7_2020.jpg
Views:	472
Size:	149.6 KB
ID:	1117237

    #2
    Hello Ben989,

    Thank you for your post.

    Could you supply a code sample of how you're trying to draw the dot?

    Do you receive any errors relating to the script in the Log tab of the Control Center?

    Thanks in advance; I look forward to assisting you further.

    Comment


      #3
      Thank you so much.
      I am attaching the ninja 7 working double side strategy and the ninja 8 one thaat does not plot anything
      Attached Files

      Comment


        #4
        I am not getting any errors, it just does not plot anything.
        This is a great strategy for everyone who wants to plot their stops an X amount of ticks either bellow or above the High/Low of the current price.

        Comment


          #5
          Hello Ben989,

          Thank you for your reply.

          I noticed after changing the color of the dot it draws that it did actually plot a single dot - this is because you aren't giving a unique tag to each dot drawn. The NinjaTrader 7 version uses CurrentBar to accomplish this within its tag name and you can do the same in NinjaTrader 8 - add another set to the Tag Name for the Dot that has Misc > CurrentBar set for its value to make each tag unique.

          Please let us know if we may be of further assistance to you.

          Comment


            #6
            Dear Kate
            You are amazing, thank you so much, this is an incredible support.
            I will do what you suggested .
            HUGE THANKS
            Ben

            Comment


              #7
              Hi Kate
              I tried to do what you said but failed, could you please please please elaborate a little more. HUGE THANK YOU in advance.

              Comment


                #8
                Hello Ben989,

                Thank you for your reply.

                Sure! You'd want to adjust the Tag field for your dot drawing object to look like this:

                Click image for larger version

Name:	2020-09-28_07-08-26.png
Views:	295
Size:	12.5 KB
ID:	1120139

                Please let us know if we may be of further assistance to you.

                Comment


                  #9
                  Hi Kate
                  Thank you so much, Your support is incredible- I will do that later today- this is a huge help.
                  HUGE THANK YOU.

                  Comment


                    #10
                    Hi Kate
                    I did what you suggested but still dont get the dots- any idea what am i doing wrong ?

                    Thanks again

                    Ben
                    Attached Files

                    Comment


                      #11
                      Hello Ben989,

                      Thank you for your reply.

                      You've exported this as a compiled assembly, so I'm unable to view your code. Please try exporting again, making sure not to check the "Export as a Compiled Assembly" box, then attach the resulting .zip file to your reply.

                      Thanks in advance; I look forward to assisting you further.

                      Comment


                        #12
                        so sorry-
                        i noticed that i am getting only 1 dot instead of a dot for every bar, also the location is wrong- i put 8 ticks bellow the current bar high and it plots one dot somewhere lol.
                        Again Huge Thanks
                        Attached Files

                        Comment


                          #13
                          Hello Ben989,

                          Thank you for your reply.

                          You've just typed in CurrentBar[0] into the field. You need to click the Set button on the right of the field and select Current Bar from the Misc folder.

                          From what I can see they do look like they're plotting in the proper place, however - to do 8 ticks below, you'd need to set it to -8 ticks from the current high.

                          Please let us know if we may be of further assistance to you.

                          Comment


                            #14
                            Thanks again Kate- do it all but still no dots - no idea why- it was so easy on ninja 7 took me a minute, sorry for all the bothering but would not be able to do that without your help.
                            here is the updated version- where i chose currentbar[0] from the drop down menu and put -8 ticks at the Y.
                            Attached Files

                            Comment


                              #15
                              Hello Ben989,

                              Thank you for your reply.

                              The dots were actually plotting, you just had it set to be the High[0] + (High[0] + (-8 * TickSize)) for the offset, so they were plotting outside the viewable bounds of the screen. I've corrected that and they should plot 8 ticks below the bar high now.

                              Please let us know if we may be of further assistance to you.
                              Attached Files

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by NullPointStrategies, Yesterday, 05:17 AM
                              0 responses
                              71 views
                              0 likes
                              Last Post NullPointStrategies  
                              Started by argusthome, 03-08-2026, 10:06 AM
                              0 responses
                              143 views
                              0 likes
                              Last Post argusthome  
                              Started by NabilKhattabi, 03-06-2026, 11:18 AM
                              0 responses
                              76 views
                              0 likes
                              Last Post NabilKhattabi  
                              Started by Deep42, 03-06-2026, 12:28 AM
                              0 responses
                              47 views
                              0 likes
                              Last Post Deep42
                              by Deep42
                               
                              Started by TheRealMorford, 03-05-2026, 06:15 PM
                              0 responses
                              51 views
                              0 likes
                              Last Post TheRealMorford  
                              Working...
                              X