Custom Column in Market Scanner

Questions about MultiCharts .NET and user contributed studies.
User avatar
orad
Posts: 119
Joined: 14 Nov 2012
Has thanked: 50 times
Been thanked: 18 times

Custom Column in Market Scanner

Postby orad » 28 Nov 2018

Hi, I was wondering if I can create a custom column on Market Scanner in MultiCharts.NET? What I'm looking for is Price Volume similar to this:
https://www.barchart.com/stocks/most-ac ... me-leaders

The definition of "Price Vol" column is:
"Current price times current volume divided by 1000."

Thanks!

User avatar
ABC
Posts: 636
Joined: 16 Dec 2006
Has thanked: 120 times
Been thanked: 359 times
Contact:

Re: Custom Column in Market Scanner

Postby ABC » 28 Nov 2018

Hi orad,

you can create an indicator and have it plot the Price Vol according to your formula. This would then appear a column in the Scanner just like other indicators would do - for example add one of the built-in indicators to the Scanner (like one of the moving averages) to see what I mean.

Regards,

ABC

User avatar
orad
Posts: 119
Joined: 14 Nov 2012
Has thanked: 50 times
Been thanked: 18 times

Re: Custom Column in Market Scanner

Postby orad » 28 Nov 2018

Excellent! Thanks!

For anybody who is interested, this is the code for Price_Volume indicator.

Code: Select all

using System;
using System.Drawing;

namespace PowerLanguage.Indicator
{
/// <summary>
/// Current price times current volume divided by 1000.
/// </summary>
public class Price_Volume : IndicatorObject
{
public Price_Volume(object ctx) : base(ctx) { }

private IPlotObject _plot;

protected override void Create()
{
_plot = AddPlot(new PlotAttributes("PriceVolume", EPlotShapes.Line, Color.White));
}

protected override void CalcBar()
{
var priceVolume = Math.Round(Bars.Volume[0] * Bars.Close[0] / 1000);
_plot.Set(priceVolume);
}
}
}


Return to “MultiCharts .NET”