Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

custom shaped price marker using SharpDX?

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

    custom shaped price marker using SharpDX?

    Is there a way of dynamically changing just the color of the price marker of the current close (preferably using fromArgb or SharpDX.color4) while hiding the price markers of all indicators from within the script of a custom indicator?

    So the question is in two parts:

    1. How does one hide indicator price markers while leaving the price marker of the current close intact?

    2. To set the color of the current close price marker on a tick by tick basis?

    3. Means of drawing a custom shaped price marker using SharpDX?
    Last edited by bkinvent; 08-30-2017, 12:46 AM.

    #2
    Hello bkinvent,

    Yes it can be done. Simply override the FormatPriceMarker with your own code. For example,

    Code:
            public override string FormatPriceMarker(double price)
            {
                 return price.ToString("N0");
            }
    This will do some of it. Do you really need to draw custom price marker shapes?

    Comment


      #3
      Hello,

      Thank you for the post.

      Hiding a indicators markers can be achieved using the PaintPriceMarkers property, this would leave the DataSeries price marker but hide the indicators.


      Alternatively, making a plot Transparent will hide its marker and leave other plots markers visible.

      To set a color for the price marker on the current tick, you would need to set the PlotBrushes Brush:
      Code:
      PlotBrushes[0][0] = Brushes.Orange;
      which would produce a result like the following if you were toggling colors: https://puu.sh/xnk5a/9d94fe6c48.png

      Because this has a BarsAgo index, you can always reset the prior bars brush to something that will match the remainder of the plot so only the current bar is being toggled.

      Currently, there is no way to modify or otherwise draw custom markers, I will put in a feature request for this. The next best solution would be to just hide your price markers and then use OnRender to draw just to the left of the scale.

      I look forward to being of further assistance.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      572 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      331 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
      549 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      550 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X