Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Drawings show on all timeframes & keep constant bar size

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

    Drawings show on all timeframes & keep constant bar size

    Hello,

    I am wondering if there is a simple method to have drawings show on all timeframes for the same instrument.

    Also, is there a way to keep a consistent OHLC bar width? When I zoom in and out, the bars are changing width and I'd like to keep it all at one level at all times.

    Thank you!

    #2
    Hello,

    Thank you for your post.

    Glad to assist. To enable the object to show up on instruments, first double click a drawing object to open its Properties window > use the Attach to menu to select All Charts > Press OK.

    Regarding the bar width, what method is used to zoom the chart? The Zoom feature of the chart toolbar should zoom without changing bar width, but via click + drag in the time axis zooms via expanding the scale of the axis/bars together and unfortunately cannot be made independent at this time.

    We look forward to assisting further.
    Eric B.NinjaTrader Customer Service

    Comment


      #3
      Perfect thanks. So will I need to do this for each and every drawing or is there a global setting to do them all?

      Both methods change bar size for me. Is there any way to specify bar size as part of an indicator?

      Comment


        #4
        Thank you for your reply.

        Yes, each drawing object will need it's setting manually changed, there is not a global option for all at this time. Specifying bar size would likely be possible via custom programming.

        If you are a programmer, our NinjaScript team may provide you links to samples which would help you write the indicator yourself, or I can have someone reach out with a list of third parties that would be interested in building this for you.

        Please let us know if you need further assistance.
        Eric B.NinjaTrader Customer Service

        Comment


          #5
          Hi Eric,

          Thanks.

          If you could provide some samples that would be great. I'm not the best coder but I have been successful with editing existing scripts.

          One more question. Can you toggle between timeframes with a keyboard shortcut?

          Comment


            #6
            Hello Splex,

            Thank you for your reply.

            For manually drawn objects you would need to mark these yourself, however, you can have NinjaScript draw objects as global as well. Most of the drawing objects contain a global overload like the Dot in the following page: https://ninjatrader.com/support/help...htsub=draw.dot

            Code:
            Draw.Dot(NinjaScriptBase owner, string tag, bool isAutoScale, DateTime time, double y, bool isGlobal, string templateName)

            For the bar width, you could do something like the following to control the width of the bars. The scaling of the chart still affects the bars, so this would generate overlapping bars as they get wider. At this time there is no way to disable the resizing based on scaling.

            Code:
            protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
            {
                base.OnRender(chartControl,chartScale);
                  ChartBars.Properties.ChartStyle.BarWidth = 5;
            }
            To navigate the chart and timeframes, please see the following document:



            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              Thank you very much, Jesse.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by wzgy0920, 04-20-2024, 06:09 PM
              2 responses
              26 views
              0 likes
              Last Post wzgy0920  
              Started by wzgy0920, 02-22-2024, 01:11 AM
              5 responses
              32 views
              0 likes
              Last Post wzgy0920  
              Started by wzgy0920, Yesterday, 09:53 PM
              2 responses
              49 views
              0 likes
              Last Post wzgy0920  
              Started by Kensonprib, 04-28-2021, 10:11 AM
              5 responses
              192 views
              0 likes
              Last Post Hasadafa  
              Started by GussJ, 03-04-2020, 03:11 PM
              11 responses
              3,234 views
              0 likes
              Last Post xiinteractive  
              Working...
              X