New Indicator Style Type Request

Questions about MultiCharts .NET and user contributed studies.
MidKnight
Posts: 343
Joined: 12 Aug 2012
Has thanked: 123 times
Been thanked: 56 times

New Indicator Style Type Request

Postby MidKnight » 13 Sep 2013

Hi there,

Please consider adding an indicator style type of horizontal line "-". This will span the full bar width regardless of bar compression size. Basically like the indicator is doing below on the horizontal lines, but omit the line jumping that is happening here.

With kind regards,
MK
Attachments
MK_2013-09-13_213357.png
(19.18 KiB) Downloaded 1972 times

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2949 times

Re: New Indicator Style Type Request

Postby Henry MultiСharts » 22 Oct 2013

Hello MidKnight,

Do you mean you want to have only horizontal lines plotted, without the part of the plot that connects them?

MidKnight
Posts: 343
Joined: 12 Aug 2012
Has thanked: 123 times
Been thanked: 56 times

Re: New Indicator Style Type Request

Postby MidKnight » 22 Oct 2013

Yes Henry, that is exactly right.

User avatar
JoshM
Posts: 2193
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1542 times
Been thanked: 1548 times
Contact:

Re: New Indicator Style Type Request

Postby JoshM » 23 Oct 2013

Please consider adding an indicator style type of horizontal line "-". This will span the full bar width regardless of bar compression size. Basically like the indicator is doing below on the horizontal lines, but omit the line jumping that is happening here.
In regular MultiCharts I 'solved' that by colouring the plot black for those 'jumping' segments, though that is not a real solution of course.

With EasyLanguage you can also turn off the line for certain segments (i.e. NoPlot()), but I don't know what the MC .NET equivalent of that is. MC Support, does MC .NET have such a statement?

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2949 times

Re: New Indicator Style Type Request

Postby Henry MultiСharts » 23 Oct 2013

With EasyLanguage you can also turn off the line for certain segments (i.e. NoPlot()), but I don't know what the MC .NET equivalent of that is. MC Support, does MC .NET have such a statement?
Yes, it is called Reset.

Image
Attachments
2013-10-23_162905_p.png
(95.4 KiB) Downloaded 2257 times

MidKnight
Posts: 343
Joined: 12 Aug 2012
Has thanked: 123 times
Been thanked: 56 times

Re: New Indicator Style Type Request

Postby MidKnight » 23 Oct 2013

I still think it would be a useful draw style addition. Many charting applications provide it. Forcing the programmer to jump through hoops on this just adds complexity to your platform and does nothing to make the application easy to use and expand the user base.

With kind regards,
MK

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2949 times

Re: New Indicator Style Type Request

Postby Henry MultiСharts » 24 Oct 2013

I would not agree that it is "jumping through hoops". If you do not want to have plot - just tell your code to do that for you with the help of Reset / NoPlot (PL).
Alternatively you can draw trendlines that will have the desired length and shape.

MidKnight
Posts: 343
Joined: 12 Aug 2012
Has thanked: 123 times
Been thanked: 56 times

Re: New Indicator Style Type Request

Postby MidKnight » 30 Oct 2013

Jumping through hoops using Reset(). None of this would be required if the indicator style I mention would be implemented internally.

Code: Select all

Output.WriteLine("Session start: {0} Session end: {1}", Bars.Sessions[0].StartTime, Bars.Sessions[0].EndTime);
if ((Bars.Time[1].TimeOfDay <= Bars.Sessions[0].EndTime) && (Bars.Time[0].TimeOfDay > Bars.Sessions[0].StartTime))
{
Output.WriteLine("Reseting {0}", Bars.TimeValue.ToString("dd-MM-yy HH:mm:ss"));
plot1.Reset();
}
else
plot1.Set(m_dayComp[1].High);
Outputs:

Code: Select all

Session start: 17:30:00 Session end: 17:00:00
Session start: 17:30:00 Session end: 17:00:00
Reseting 30-10-13 17:35:00
Session start: 17:30:00 Session end: 17:00:00
Session start: 17:30:00 Session end: 17:00:00
But it still has that annoying connecting line rather than 2 horizontal lines without the vertical connection. Using trendlines adds too much complexity to what should be a simple indicator. Do you want MC to be easily adopted by new users or not - that is why many platforms offer this indicator style.

Unless I'm using Reset() wrong, it is not a solution to the indicator style I am suggesting.
Attachments
MK_2013-10-31_142105.png
(20.66 KiB) Downloaded 1891 times

User avatar
JoshM
Posts: 2193
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1542 times
Been thanked: 1548 times
Contact:

Re: New Indicator Style Type Request

Postby JoshM » 31 Oct 2013

But it still has that annoying connecting line rather than 2 horizontal lines without the vertical connection. Using trendlines adds too much complexity to what should be a simple indicator. Do you want MC to be easily adopted by new users or not - that is why many platforms offer this indicator style.

Unless I'm using Reset() wrong, it is not a solution to the indicator style I am suggesting.
I also could not make Reset() work in this situation, since the previous bar value also should not be plotted, since the difference between the previous bar and the current bar gives the rising or decline line. I could not find a way to call Reset() on the previous bar.

However, if you choose to use colours, the situation in this thread can be 'fixed':

Image


And if you place it in a method (see NoPlot() below), it's quite user friendly:

Code: Select all

using System;
using System.Drawing;
using System.Linq;
using PowerLanguage.Function;

namespace PowerLanguage.Indicator
{
[SameAsSymbol(true)]
[UpdateOnEveryTick(false)]
public class Example_PlotReset : IndicatorObject
{
private IPlotObject plot1;

public Example_PlotReset(object _ctx) : base(_ctx) { }

protected override void Create()
{
plot1 = AddPlot(new PlotAttributes("HighestHigh", EPlotShapes.Line, Color.Yellow));
}

protected override void CalcBar()
{
plot1.Set(Bars.High.Highest(25));

if (plot1.Values[0] != plot1.Values[1])
{
NoPlot(plot1);
}
}

// Artificially turn off the plot for a given IPlotObject
private void NoPlot(IPlotObject plot)
{
plot.Set(0, plot.Values[0], Color.Black);
plot.Set(1, plot.Values[1], Color.Black);
}
}
}
Attachments
scr.31-10-2013 05.52.27.png
(9.99 KiB) Downloaded 2172 times

MidKnight
Posts: 343
Joined: 12 Aug 2012
Has thanked: 123 times
Been thanked: 56 times

Re: New Indicator Style Type Request

Postby MidKnight » 31 Oct 2013

Thanks for the example JoshM. I still feel this is jumping through hoops and wish MC staff would focus their product towards the usability of discretionary traders more than they do.

With thanks,
MK

User avatar
JoshM
Posts: 2193
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1542 times
Been thanked: 1548 times
Contact:

Re: New Indicator Style Type Request

Postby JoshM » 31 Oct 2013

@MultiCharts Support: can you give an example of how to instantiate DrawContext() so that the member field BackGround becomes available? That would give more robust plotting in the example above, since not all charts are with a black background.

If I try to create an instance of the DrawContext() class, its constructors asks for the Color backGround, and that's precisely what I don't know at that point.
Thanks for the example JoshM. I still feel this is jumping through hoops and wish MC staff would focus their product towards the usability of discretionary traders more than they do.
I wish MC would focus less on discretionary traders and more on algorithmic traders. ;] It's hard to please everyone at the same time.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2949 times

Re: New Indicator Style Type Request

Postby Henry MultiСharts » 31 Oct 2013

This case is being analyzed by our engineers. I will keep the board posted.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2949 times

Re: New Indicator Style Type Request

Postby Henry MultiСharts » 05 Nov 2013

But it still has that annoying connecting line rather than 2 horizontal lines without the vertical connection. Using trendlines adds too much complexity to what should be a simple indicator. Do you want MC to be easily adopted by new users or not - that is why many platforms offer this indicator style.

Unless I'm using Reset() wrong, it is not a solution to the indicator style I am suggesting.
MidKnight, Reset just skips one of the indicator values. If you are using Line indicator style and you have three points (1,2,3), you decide to Reset point 2, then points 1 and 3 will still be connected with a line. To workaround it you can select any different plot shape like dot.

If you still want to request a new plot style - please submit it to the project management section of our web site so other users can vote for it: https://www.multicharts.com/pm/

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2949 times

Re: New Indicator Style Type Request

Postby Henry MultiСharts » 05 Nov 2013

@MultiCharts Support: can you give an example of how to instantiate DrawContext() so that the member field BackGround becomes available? That would give more robust plotting in the example above, since not all charts are with a black background.

If I try to create an instance of the DrawContext() class, its constructors asks for the Color backGround, and that's precisely what I don't know at that point.
Thanks for the example JoshM. I still feel this is jumping through hoops and wish MC staff would focus their product towards the usability of discretionary traders more than they do.
I wish MC would focus less on discretionary traders and more on algorithmic traders. ;] It's hard to please everyone at the same time.
Unfortunately I do not have a sample code at hand but I can point you to the right direction.
You need to have a look at .NET Framework Graphics Methods @ MSDN. I believe CopyFromScreen should do the job.

User avatar
JoshM
Posts: 2193
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1542 times
Been thanked: 1548 times
Contact:

Re: New Indicator Style Type Request

Postby JoshM » 23 Sep 2014

MidKnight, Reset just skips one of the indicator values. If you are using Line indicator style and you have three points (1,2,3), you decide to Reset point 2, then points 1 and 3 will still be connected with a line. To workaround it you can select any different plot shape like dot.
When will we get a MultiCharts .NET feature that is similar to PowerLanguage's NoPlot()? Currently, what `Reset()` does we can also do ourselves by not assigning a plot value on that bar. What is needed is a way to turn of the indicator lines, what NoPlot() does:
Removes a specified plot from the current bar.

MidKnight
Posts: 343
Joined: 12 Aug 2012
Has thanked: 123 times
Been thanked: 56 times

Re: New Indicator Style Type Request

Postby MidKnight » 23 Sep 2014

^^
Exactly - that is needed.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2949 times

Re: New Indicator Style Type Request

Postby Henry MultiСharts » 26 Sep 2014

NoPlot and Reset works the same way. NoPlot does not turn off the indicator lines.

User avatar
JoshM
Posts: 2193
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1542 times
Been thanked: 1548 times
Contact:

Re: New Indicator Style Type Request

Postby JoshM » 26 Sep 2014

NoPlot and Reset works the same way. NoPlot does not turn off the indicator lines.
Yes, I made an error. But the underlying idea still holds, in my view:
(..) a way to turn of the indicator lines, (...)


Return to “MultiCharts .NET”