Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BarColor

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

    BarColor

    Hi,

    is there a way to draw sort of BackColor Horizontzal Line??

    I want to draw and keep a DrawLine object in the region where all drawing objects are removed,so the line draws and immediately removes.But,the vertical Line,using BackColor method,is there.

    So,is there a workaround to draw ''BackColor Horizontal Line''??

    Thank you

    #2
    Hello,

    Thank you for the question.

    I am a little confused on what you are trying to do in this situation.

    Can you please provide an example of the code you are using and a explanation of what you are trying to do?

    I would be happy to look over the code so I have a better idea on this question and what you are trying to achieve.

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

    Comment


      #3
      Originally posted by NinjaTrader_Jesse View Post
      Hello,

      Thank you for the question.

      I am a little confused on what you are trying to do in this situation.

      Can you please provide an example of the code you are using and a explanation of what you are trying to do?

      I would be happy to look over the code so I have a better idea on this question and what you are trying to achieve.

      I look forward to being of further assistance.

      Hi Jesse,

      Sure,the code looks like this:

      Code:
      if(!drawObjectExists(objNameDev))
      {
      															DrawDot(objNameDev,false,xPos,xVal,Color.Transparent);
      															
      															drawDot(objNameDev+"xDot",xPos,xVal,developPatternColor);
      															drawDot(objNameDev+"aDot",aPos,aVal,developPatternColor);
      															drawDot(objNameDev+"bDot",bPos,bVal,developPatternColor);
      															
      															drawTempBrTriangle(objNameOneDev,xPos,xVal,aPos,aVal,bPos,bVal);	
      
      
      BackColor = Color.FromArgb(50, Color.Red);															DrawLine("high" + CurrentBar, true, 0, High[0], - 100, High[0], Color.Red, DashStyle.Solid, 2);
      															
      															
      															drawDot(objNameDev+"cDot",cPos,cVal,developPatternColor);
      What it does,is put a temp triangle on the chart,and the removes it.

      I was trying to highlight those region,after the triangle has gone.

      Hence,i put these lines:

      Code:
      BackColor = Color.FromArgb(50, Color.Red);
      															DrawLine("high" + CurrentBar, true, 0, High[0], - 100, High[0], Color.Red, DashStyle.Solid, 2);
      The first code(vertical line):

      Code:
      BackColor = Color.FromArgb(50, Color.Red);
      After the triangle is gone - is there.!

      But the second code(horizontal line):

      Code:
      DrawLine("high" + CurrentBar, true, 0, High[0], - 100, High[0], Color.Red, DashStyle.Solid, 2)
      disappears along with the triangle.

      Now the answer i`m seeking,is how to keep that horizontal line on the chart.Hope that clear.Please,let me know.
      Last edited by outsource; 04-13-2015, 03:44 PM.

      Comment


        #4
        Hello,

        Thank you for the example.

        I believe there is a confusion with the BackColor property and DrawingObjects.

        The BackColor is the background color of the bar which is not associated with drawing objects, this means it can not be "removed" using the drawing objects removal method and does not share the same properties as the drawing objects.

        It is simply for changing the background color of the bar.

        If you need to modify the BackColor or remove it like the drawing objects, you need to remove the color that was set

        You can use BarColorSeries for this, here is the help guide reference:



        This uses a BarsAgo value, if you know that the last bar needs to have the color removed, you would just use:

        Code:
        BackColorSeries[1]	= Color.Empty;
        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Jesse View Post
          Hello,

          Thank you for the example.

          I believe there is a confusion with the BackColor property and DrawingObjects.

          The BackColor is the background color of the bar which is not associated with drawing objects, this means it can not be "removed" using the drawing objects removal method and does not share the same properties as the drawing objects.

          It is simply for changing the background color of the bar.

          If you need to modify the BackColor or remove it like the drawing objects, you need to remove the color that was set

          You can use BarColorSeries for this, here is the help guide reference:



          This uses a BarsAgo value, if you know that the last bar needs to have the color removed, you would just use:

          Code:
          BackColorSeries[1]	= Color.Empty;
          I look forward to being of further assistance.
          Did you read my question,anyway?Or you just copycat the first thing that came to your mind?It`s embarassing!!!!

          Comment


            #6
            Hello,

            I am trying to assist you in your question but the question is not clear.

            Your last reply sounded like you are confusing the property BackColor with the DrawingObjects, If this is not correct please provide a clear and concise question or an example that exactly demonstrates the question and I will be available to assist with that.

            If you are unable to provide a question, please provide a working script so that I can see what you are seeing.

            Please let me know if I may be of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Jesse View Post
              Hello,

              I am trying to assist you in your question but the question is not clear.

              Your last reply sounded like you are confusing the property BackColor with the DrawingObjects, If this is not correct please provide a clear and concise question or an example that exactly demonstrates the question and I will be available to assist with that.

              If you are unable to provide a question, please provide a working script so that I can see what you are seeing.

              Please let me know if I may be of further assistance.
              If the question is not clear,please take 50 sheets of the A4 paper,write down it 50 times,until it becomes clear.That`s how the understannding goes,they say.

              I`m not confusing anything.I`m aware BackColor properties and DrawObject properties are not the same.

              What i was asking,was to find away to apply background coloring properties to the HORIZONTAL LINE.I WANT THE HORIZONTAL LINE TO STAY INTACT AT THE REGION IN THE CODE WHERE THE DRAWING OBJECTS ARE REMOVED.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by pmachiraju, 11-01-2023, 04:46 AM
              8 responses
              148 views
              0 likes
              Last Post rehmans
              by rehmans
               
              Started by mattbsea, Today, 05:44 PM
              0 responses
              5 views
              0 likes
              Last Post mattbsea  
              Started by RideMe, 04-07-2024, 04:54 PM
              6 responses
              33 views
              0 likes
              Last Post RideMe
              by RideMe
               
              Started by tkaboris, Today, 05:13 PM
              0 responses
              5 views
              0 likes
              Last Post tkaboris  
              Started by GussJ, 03-04-2020, 03:11 PM
              16 responses
              3,283 views
              0 likes
              Last Post Leafcutter  
              Working...
              X