How do i set Price Markers to False?

Hi,
What code can be added to set the Price Markers to false?

Thanks,

In State.SetDefaults add the following:

PaintPriceMarkers = false;

Here’s the documentation:

https://ninjatrader.com/support/helpGuides/nt8/paintpricemarkers.htm

i tried that, it just removes the color from the marker.
it doesnt remove the marker.

I’m sorry, I don’t know why this doesn’t work for you. It should. I use this all the time.

ā€œSetPriceMarker = false;ā€ line needs to be in State.SetDefaults in your indicator code.

Open a new chart and add your indicators to the chart with default settings.
It should not show price markers associated with any of the indicator plots.
You may still get price markers from price bars. That can be disabled in Data Series settings.

Just to add to this, you can also completely hide the option from the UI:

// PARAMETER HIDE PRICE MARKERS
    [Browsable(false)]
    public new bool PaintPriceMarkers
    {
        get => base.PaintPriceMarkers;
        set => base.PaintPriceMarkers = value;
    }
1 Like

Thanks everyone.
I got all this to work. :slight_smile:

Nice trick! that will work for any property.

Older versions of NT/C# will need to use the following

[Browsable(false)]
public new bool PaintPriceMarkers
{
    get { return base.PaintPriceMarkers;}
    set { base.PaintPriceMarkers = value;}
}

Yea you can hide basically of the useless options that are in the property grid of every indicator. Never made any sense to me why they are included by default.

In my Indicators I basically hide all the options in the ā€˜Visuals’ section and move ā€˜Visible’ to the top.

1 Like