Using the reserved word “TL_New”  [SOLVED]

Questions about MultiCharts and user contributed studies.
~Zola~
Posts: 22
Joined: 28 Nov 2016
Has thanked: 5 times
Been thanked: 1 time

Using the reserved word “TL_New”

Postby ~Zola~ » 20 May 2019

Code: Select all

Variables: TLID(-1),
TxtID(-1);

once
begin
TLID = TL_New(Date[10], Time[10], Close, Date, Time, Close);
TL_SetColor(TLID, red);
TL_SetSize(TLID, 2);
TL_SetStyle(TLID, 2);

TxtID = Text_New(Date, Time, Close, "Hello World!");
end;
-----------------------------------------------------------------------------------
I have created an indicator using "TL_New" as the above statement. when I insert the study in MC10, I expect the code line and text string that should be created on the chart, however nothing happen. Is that I have set the wrong "Properties"?

For the details, please refer to https://www.abctradinggroup.com/easylan ... rendlines/
Last edited by ~Zola~ on 20 May 2019, edited 4 times in total.

User avatar
TJ
Posts: 7739
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1032 times
Been thanked: 2221 times

Re: Using the reserved word “TL_New”

Postby TJ » 20 May 2019

Please see posts #1 & #2
How to post codes
viewtopic.php?t=11713

~Zola~
Posts: 22
Joined: 28 Nov 2016
Has thanked: 5 times
Been thanked: 1 time

Re: Using the reserved word “TL_New”

Postby ~Zola~ » 20 May 2019

Please see posts #1 & #2
How to post codes
viewtopic.php?t=11713
Thanks

User avatar
TJ
Posts: 7739
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1032 times
Been thanked: 2221 times

Re: Using the reserved word “TL_New”

Postby TJ » 20 May 2019

What is your chart resolution?

ie the chart type and interval?

~Zola~
Posts: 22
Joined: 28 Nov 2016
Has thanked: 5 times
Been thanked: 1 time

Re: Using the reserved word “TL_New”

Postby ~Zola~ » 21 May 2019

What is your chart resolution?

ie the chart type and interval?
I have tried the "Bar Chart" and "Hollow Candlestick Chart" with 1 minute or 1 day resolution.

User avatar
ABC
Posts: 718
Joined: 16 Dec 2006
Location: www.abctradinggroup.com
Has thanked: 125 times
Been thanked: 408 times
Contact:

Re: Using the reserved word “TL_New”

Postby ABC » 21 May 2019

Hi ~Zola~,

can you post a screenshot of the chart with the study applied, as this might help us in understanding the cause.

Regards,

ABC
What is your chart resolution?

ie the chart type and interval?
I have tried the "Bar Chart" and "Hollow Candlestick Chart" with 1 minute or 1 day resolution.

~Zola~
Posts: 22
Joined: 28 Nov 2016
Has thanked: 5 times
Been thanked: 1 time

Re: Using the reserved word “TL_New”

Postby ~Zola~ » 21 May 2019

Hi ~Zola~,

can you post a screenshot of the chart with the study applied, as this might help us in understanding the cause.

Regards,

ABC
Thank you for your reply. I clicked the "Insert study" and added an indicator call "Trend V0". Attached please find the setting screen for your reference.
Last edited by ~Zola~ on 05 Jun 2019, edited 1 time in total.

User avatar
TJ
Posts: 7739
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1032 times
Been thanked: 2221 times

Re: Using the reserved word “TL_New”

Postby TJ » 21 May 2019

Scaling should be "Same as Instrument".

~Zola~
Posts: 22
Joined: 28 Nov 2016
Has thanked: 5 times
Been thanked: 1 time

Re: Using the reserved word “TL_New”

Postby ~Zola~ » 21 May 2019

Scaling should be "Same as Instrument".
Thank you for your reply. Still not work.

User avatar
TJ
Posts: 7739
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1032 times
Been thanked: 2221 times

Re: Using the reserved word “TL_New”

Postby TJ » 22 May 2019

Try this

Code: Select all

Variables: TLID(-1),
TxtID(-1);

TLID = TL_New(Date[10], Time[10], Close, Date, Time, Close);
TL_SetColor(TLID, red);
TL_SetSize(TLID, 4);
TL_SetStyle(TLID, 2);

TxtID = Text_New(Date, Time, Close, "Hello World!");
Text_SetStyle(TxtID, 0, 2);

User avatar
TJ
Posts: 7739
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1032 times
Been thanked: 2221 times

Re: Using the reserved word “TL_New”

Postby TJ » 22 May 2019

ps. ABC's sample code is for offline educational use only.

You should create the chart first, then apply the code.

It will not appear on a real-time chart that has previously been saved in a workspace.

User avatar
ABC
Posts: 718
Joined: 16 Dec 2006
Location: www.abctradinggroup.com
Has thanked: 125 times
Been thanked: 408 times
Contact:

Re: Using the reserved word “TL_New”

Postby ABC » 22 May 2019

~Zola~,

the code is designed to create the drawings only once when the study gets executed i.e. it will apply them on the first bar after your max bars back settings. Having said that you should be able to find the drawings close to the start of your chart.

Regards,

ABC
Scaling should be "Same as Instrument".
Thank you for your reply. Still not work.

sptrader
Posts: 742
Joined: 09 Apr 2010
Location: Texas
Has thanked: 483 times
Been thanked: 274 times
Contact:

Re: Using the reserved word “TL_New”  [SOLVED]

Postby sptrader » 22 May 2019

You'll find it if you scroll all the way to the Left side of your chart. (earliest date).
It's very small but the text size can be made larger very easily.
See the
Trendline test image.jpg
(262.29 KiB) Downloaded 378 times
attached chart.

~Zola~
Posts: 22
Joined: 28 Nov 2016
Has thanked: 5 times
Been thanked: 1 time

Re: Using the reserved word “TL_New”

Postby ~Zola~ » 22 May 2019

~Zola~,

the code is designed to create the drawings only once when the study gets executed i.e. it will apply them on the first bar after your max bars back settings. Having said that you should be able to find the drawings close to the start of your chart.

Regards,

ABC
Many thanks for your reply, it is okay now. I have used the data over 30 years, that is the reason I cannot find the indicator on the screen.

~Zola~
Posts: 22
Joined: 28 Nov 2016
Has thanked: 5 times
Been thanked: 1 time

Re: Using the reserved word “TL_New”

Postby ~Zola~ » 22 May 2019

You'll find it if you scroll all the way to the Left side of your chart. (earliest date).
It's very small but the text size can be made larger very easily.
See the Trendline test image.jpgattached chart.
Many thanks for your reply, I got it.


Return to “MultiCharts”