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

Drawing tools

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

    Drawing tools

    Hi, is it possible to make an indicator similar to horizontal line drawing tool, where you can easily move it around the chart and lock it, and save it on the chart. Thanks

    #2
    Hello tunabomb,

    Thanks for your post.

    You could consider creating an indicator that calls the Draw.HorizontalLine() method to draw a horizontal line on the chart.

    The IsLocked property could be used to determine if a drawing tool object should be locked in place.

    See this help guide page for more information about Draw.HorizontalLine(): https://ninjatrader.com/support/help...zontalline.htm

    See this help guide page for more information about IsLocked: https://ninjatrader.com/support/help...8/islocked.htm

    Here is a forum thread for more information about IsLocked: https://forum.ninjatrader.com/forum/...horizontalline
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      Could the ColorZone3 indicator be revised to be able to unlock the zones, move them on the chart and lock them again? Thanks

      This is a port of the NinjaTrader7 ColorZone3 indicator by photog53. Update 4/28/2018: Fixed issue with ChartTemplates and converted regions to use plots. Update 03/19/2011 (allow text entry on zones…also allows entry of negative zone values) Creates up to 12 colored zones on a chart. – Requires only 1 price entry per zone… the indicator […]


      941515249396399730.zip

      Comment


        #4
        Hello tunabomb,

        Thanks for your notes.

        No, to change the zone region being drawn by the ColorZone3 indicator (such as Zone 1), you should right-click on the chart, select 'Indicators', select the 'ColorZone3' indicator in the Configured section of the Indicators window, change the 'Zone 1' property to the value you want the region to be drawn at, and then click OK.

        Once you change the 'Zone 1' property to a new value and click OK to save the changes and close the Indicators window, that Zone 1 region will be drawn at the new value you set it to.
        Brandon H.NinjaTrader Customer Service

        Comment


          #5
          Thanks for your post.

          You could consider creating an indicator that calls the Draw.HorizontalLine() method to draw a horizontal line on the chart.

          The IsLocked property could be used to determine if a drawing tool object should be locked in place.​
          Could a sample indicator of this be posted?

          Comment


            #6
            Hello tunabomb,

            Thanks for your notes.

            I have attached a simple script demonstrating drawing a horizontal line on the chart that can be manually moved. Once the line is manually moved and the current bar on the chart closes, that horizontal line draw object is locked so it cannot be moved.

            See the help guide documentation below for more information.

            Draw.HorizontalLine: https://ninjatrader.com/support/help...zontalline.htm
            IsLocked: https://ninjatrader.com/support/help...8/islocked.htm
            IDrawingTool Objects: https://ninjatrader.com/support/help...ool.htm​
            Attached Files
            Brandon H.NinjaTrader Customer Service

            Comment


              #7
              Thanks! Greatly appreciated

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by geddyisodin, 04-25-2024, 05:20 AM
              8 responses
              61 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by jxs_xrj, 01-12-2020, 09:49 AM
              4 responses
              3,288 views
              1 like
              Last Post jgualdronc  
              Started by Option Whisperer, Today, 09:55 AM
              0 responses
              5 views
              0 likes
              Last Post Option Whisperer  
              Started by halgo_boulder, 04-20-2024, 08:44 AM
              2 responses
              22 views
              0 likes
              Last Post halgo_boulder  
              Started by mishhh, 05-25-2010, 08:54 AM
              19 responses
              6,189 views
              0 likes
              Last Post rene69851  
              Working...
              X