Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plots and PlotBrushes...Difference

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

    Plots and PlotBrushes...Difference

    hi,

    what is the difference ?

    if i want to change color in Plot line..
    i use :
    PlotBrushes[3][0]=color

    or

    Plots[3]=color

    and if i want change width i can't to use PlotBrushes..is correct?

    I need to change color, PlotStyle and Width during trading session

    thanks
    Last edited by turbofib; 02-08-2017, 04:59 AM.

    #2
    Hello turbofib,

    Thank you for the question.

    You could be correct, you can not change width with a Brush, a Brush is simply the color that would be used but does not specify any other style information.

    You can set the width of a plot using the following syntax:

    Code:
    Plots[0].Width = 12;
    and the PlotStyle:

    Code:
    Plots[0].PlotStyle = PlotStyle.Bar;
    I look forward to being of further assistance.

    Comment


      #3
      hi,
      i write a stupid indicator (prova3.zip)

      i try to change plotstyle in OnBarUpdate but i did not get the desired result

      can you test it and find the error..thanks
      Attached Files

      Comment


        #4
        Hello turbofib,

        I see this working as I would expect, the PlotStyle controls the entire plot, there would not be a way to control this Per bar like the BarBrush.

        I see that if I control the number of bars loading on the chart, I can see the various PlotStyles being used. Additionally if I wait for i to be reset I can see this cycling through the various plot styles.

        Can you tell me, what is the outcome you are seeing versus what you were expecting?

        I look forward to being of further assistance.

        Comment


          #5
          Originally posted by NinjaTrader_Jesse View Post
          Hello turbofib,

          I see this working as I would expect, the PlotStyle controls the entire plot, there would not be a way to control this Per bar like the BarBrush.

          I see that if I control the number of bars loading on the chart, I can see the various PlotStyles being used. Additionally if I wait for i to be reset I can see this cycling through the various plot styles.

          Can you tell me, what is the outcome you are seeing versus what you were expecting?

          I look forward to being of further assistance.
          excuse from your speech I did not understand much ...

          i'd like to change plotstyle in OnBarUpdate..but if i use Plot[0].PlotStyle=PlotStyle.Dot
          (is an example) ...i can't do it..


          you said :

          and the PlotStyle:

          Code:
          Plots[0].PlotStyle = PlotStyle.Bar;
          but I couldn't do it

          Comment


            #6
            Hello turbofib,

            I am not certain I understand your reply.

            I previously said that I can see this example working, are you seeing an error or what is the outcome you are seeing that is not expected? The sample you provided compiles and runs, if you are not seeing the expected result I would suggest to try a more simple example that does not include the i++;

            I look forward to being of further assistance.

            Comment


              #7
              See pictures....

              i want to change plotstyle ...
              i can't to do it..

              do you understand?
              Attached Files
              Last edited by turbofib; 02-08-2017, 12:31 PM.

              Comment


                #8
                Hello turbofib,

                Yes I mentioned this is not possible previously:
                The PlotStyle controls the entire plot, there would not be a way to control this Per bar like the BarBrush.
                The property PlotStyle controls the whole plot, you can not have multiple PlotStyles applied at the same time.

                You would need to add plots for each of the styles you want to use and only set values to those plots on the bars needed. If there is no plot needed on a bar you could use the Reset:


                Reset() method allows you to effectively ignore the value of the current bar for plotting purposes.

                I look forward to being of further assistance.

                Comment


                  #9
                  Hi turbofib,
                  this is quite simple but it requires a little work. Just don't call base.Render() (or similar method in Render method of indicator - I don't remember right from my head and don't have a NT in front of me) and the plots won't be rendered automatically. After then, you need to implement your plot render method where you can just decide how you will draw each of the ticks for visible range of values.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  576 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  334 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  101 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  553 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  551 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X