Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

modifying size of several plots with one input parameter

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

    modifying size of several plots with one input parameter

    Hello, depending on the resolutoin of the monitor I use, the blocks of my custom indicator appear to be either too big or too small.
    I have tried to add an input parameter in the indicator for changing the size of a set of its plots, but it doesn't work.
    With regard to attached image: if (in the lower resolution monitor) I set to 4 the size of the blocks, it has no effect on them, they all remain at size 7, the default value assigned in the script.
    Please can explain why this happens and whether/how it is possible to get this feature for the indicator .
    Thank you.


    Click image for larger version

Name:	change in input parameter has no effect on size of blocks.jpg
Views:	211
Size:	293.3 KB
ID:	1100501

    #2
    Hello guidoisot,

    Thank you for your reply.

    The plot size you have there would not increase the painted width of your bars, it's being applied to the lines plotted for the indicator itself. Bar width may be modified by an indicator but is primarily controlled by the Chart Style.

    To influence the width of bars from an indicator, you would need to modify the value of ChartControl.BarWidth:



    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Hello Kate,

      Thank you for your reply.
      Maybe my English was not clear. What I wanted to change are not the price bars, but just the plots of the indicator, as shown on the image I attached

      Comment


        #4
        Hello guidoisot,

        Thank you for your reply.

        No, you're clear, I just missed that the indicator was using the block plot - looked like chart bars on a first glance. You're setting the widths within State.SetDefaults, which is being overridden by the user values. Try setting the plot widths in State.Configure instead:

        else if (State == State.Configure)
        {
        Plots[0].Width = Plot_Size;
        }

        Please let us know if we may be of further assistance to you.
        Kate W.NinjaTrader Customer Service

        Comment


          #5
          Thank you, now it works, molto bene!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by kempotrader, Today, 08:56 AM
          0 responses
          6 views
          0 likes
          Last Post kempotrader  
          Started by kempotrader, Today, 08:54 AM
          0 responses
          4 views
          0 likes
          Last Post kempotrader  
          Started by mmenigma, Today, 08:54 AM
          0 responses
          2 views
          0 likes
          Last Post mmenigma  
          Started by halgo_boulder, Today, 08:44 AM
          0 responses
          1 view
          0 likes
          Last Post halgo_boulder  
          Started by drewski1980, Today, 08:24 AM
          0 responses
          3 views
          0 likes
          Last Post drewski1980  
          Working...
          X