Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Wizard - How add vertical lines

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

    #16
    Nice Person, someone will get back to you with an answer to this question tomorrow. Thank you for your patience.
    AustinNinjaTrader Customer Service

    Comment


      #17
      Nice Person, this is unfortunately expected, as you plot the Close price in the script. The Stochastic scale would range from 0 - 100 while so adding the Close value would throw this off - this would work in our upcoming NinjaTrader 7 as you could then have a left and right scale for example in the same subpanel to plot both values.

      Comment


        #18
        MY original need was to have a vertical line on the stochastic inidicator panel itsel. One suggestion was as follows
        Quote:
        To draw on the indicator panel you will have to open up the Stochastics indicator code and add DrawOnPricePanel = false to the Initialize() method. Then you would have to add code to draw the lines. Strategies are always added to panel 1 which is why you need to do it directly in the indicator if you want it on the indicator panel.
        Unquote

        I tried it but I was getting errors. May be my coding was not right. Then one reader posted a code file which gives 'out of scale' range.

        Is there really no way to get a line or any other drawing object like arrow on the indicator panel itself without effecting the range, in NT 6.5?

        Comment


          #19
          Thanks for the reply, took another look at the code, please try the attached should do what you seek.
          Attached Files

          Comment


            #20
            Hi,

            Is there anyway to modify it to draw vertical line on price chart based on time? and make it work on range chart?

            I tried the first file, drawverticalline, it draws using stoch..

            Comment


              #21
              You could draw based on a time condition as well, however you would need to make sure the timestamp of the used data allows for clear evaluation of your condition...as Range bars are not based on time and thus it would be unlikely to hit an exact time (9:30:00 for example). In NT 7 which is availabe you could draw on a 1 min chart and then attach all draw objects to all charts of the same instrument, which simplifies this task.

              Comment


                #22
                Hello.

                I am very new to NT Script also so I realize I have a lot to learn.

                The statement DrawOnPricePanel = *, can I assume that you can draw in the price panel or in an indicator panel but not both within the same custom indicator?

                What I mean by this is, I want to draw a vertical line in the price panel and in an indicator panel, or perhaps several. These lines would look like one continuous line such as the verticle grid line on a chart. This would give me control of the vertical line spacing.

                So. Is it possible to have several statements/arguments to draw in the price panel and an indicator panel in the same custom indicator? Or must one indicator be written and loaded for each panel? Meaning - if I had two indicator panels and I wanted a vertical line in those two and the price panel, I would need to load the custom indicator onto the chart three times?

                This would be with NT 6.5

                Thank you.

                Comment


                  #23
                  Welcome to our forums jethro, correct you can either draw in the price panel or the indicator panel, however for your ideas you could also look into BackColorAll, which would allow you to change all background colors to your liking -

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by NullPointStrategies, Yesterday, 05:17 AM
                  0 responses
                  62 views
                  0 likes
                  Last Post NullPointStrategies  
                  Started by argusthome, 03-08-2026, 10:06 AM
                  0 responses
                  134 views
                  0 likes
                  Last Post argusthome  
                  Started by NabilKhattabi, 03-06-2026, 11:18 AM
                  0 responses
                  75 views
                  0 likes
                  Last Post NabilKhattabi  
                  Started by Deep42, 03-06-2026, 12:28 AM
                  0 responses
                  45 views
                  0 likes
                  Last Post Deep42
                  by Deep42
                   
                  Started by TheRealMorford, 03-05-2026, 06:15 PM
                  0 responses
                  50 views
                  0 likes
                  Last Post TheRealMorford  
                  Working...
                  X