Plot Time Line Drawing Object

Questions about MultiCharts and user contributed studies.
daniele.maddaluno
Posts: 4
Joined: 29 Aug 2018
Has thanked: 1 time

Plot Time Line Drawing Object

Postby daniele.maddaluno » 09 Jan 2020

I am looking how to plot a TimeLine Drawing Object from an indicator.
I don't want to use a TrendLine to mock a Time Line object because I want it to be plotted over all the subcharts of the chart window.
For example, this code is woking but it plots just on one subchart:

Code: Select all

Inputs: LineTime(0830), LineColor(DarkGray), LineStyle(Tool_Solid), LineThickness(0.5); Variables: Offset(0); Offset = Minmove/PriceScale; If T >= LineTime and T[1] < LineTime then begin Value1 = TL_New(D, T, H+Offset, D, T, H+Offset*100); Value2 = TL_SetExtRight(Value1, True); TL_SetColor(Value1, LineColor); TL_SetStyle(Value1, LineStyle); TL_SetSize(Value1, LineThickness); Value3 = TL_New(D, T, L-Offset, D, T, L-Offset*100); Value4 = TL_SetExtRight(Value3, True); TL_SetColor(Value3, LineColor); TL_SetStyle(Value3, LineStyle); TL_SetSize(Value3, LineThickness); End;
In this (if the link is broken look for "The Vertical Line Time Indicator [Free Code]" in the search box of "emini-watch.com") other one it uses the elsystem.drawing way to create a TimeLine which I don't think that in this moment can be used on multicharts...
I did not find a way doing such a thing with multicharts without multipling my indicator over each subchart.

User avatar
rrams
Posts: 128
Joined: 10 Feb 2011
Location: USA
Has thanked: 7 times
Been thanked: 70 times
Contact:

Re: Plot Time Line Drawing Object

Postby rrams » 09 Jan 2020

No Object Oriented Easy Language available, thankfully. But yeah, it is a little kludgy that there isn't a function with an additional parameter to specify which subchart(s) to apply the drawing to.
Not a big deal though; just make sure to replace in the code TL_New with TL_New_Self and add the indicator to each subchart.
Image
Image
Attachments
MC V TL.png
(9.85 KiB) Not downloaded yet


Return to “MultiCharts”