Using the reserved word “TL_New”  [SOLVED]

Questions about MultiCharts and user contributed studies.
~Zola~
Posts: 12
Joined: 28 Nov 2016
Has thanked: 4 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: 7146
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 987 times
Been thanked: 2040 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: 12
Joined: 28 Nov 2016
Has thanked: 4 times
Been thanked: 1 time

Re: Using the reserved word “TL_New”

Postby ~Zola~ » 20 May 2019

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


Thanks

User avatar
TJ
Posts: 7146
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 987 times
Been thanked: 2040 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: 12
Joined: 28 Nov 2016
Has thanked: 4 times
Been thanked: 1 time

Re: Using the reserved word “TL_New”

Postby ~Zola~ » 21 May 2019

TJ wrote: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: 615
Joined: 16 Dec 2006
Has thanked: 119 times
Been thanked: 350 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

~Zola~ wrote:
TJ wrote: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: 12
Joined: 28 Nov 2016
Has thanked: 4 times
Been thanked: 1 time

Re: Using the reserved word “TL_New”

Postby ~Zola~ » 21 May 2019

ABC wrote: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: 7146
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 987 times
Been thanked: 2040 times

Re: Using the reserved word “TL_New”

Postby TJ » 21 May 2019

Scaling should be "Same as Instrument".

~Zola~
Posts: 12
Joined: 28 Nov 2016
Has thanked: 4 times
Been thanked: 1 time

Re: Using the reserved word “TL_New”

Postby ~Zola~ » 21 May 2019

TJ wrote:Scaling should be "Same as Instrument".


Thank you for your reply. Still not work.

User avatar
TJ
Posts: 7146
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 987 times
Been thanked: 2040 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: 7146
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 987 times
Been thanked: 2040 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.
These users thanked the author TJ for the post:
~Zola~

User avatar
ABC
Posts: 615
Joined: 16 Dec 2006
Has thanked: 119 times
Been thanked: 350 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

~Zola~ wrote:
TJ wrote:Scaling should be "Same as Instrument".


Thank you for your reply. Still not work.
These users thanked the author ABC for the post:
~Zola~

sptrader
Posts: 710
Joined: 09 Apr 2010
Location: Colorado
Has thanked: 468 times
Been thanked: 261 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
Trendline test image.jpg (262.29 KiB) Viewed 187 times
attached chart.
These users thanked the author sptrader for the post (total 2):
ABC~Zola~

~Zola~
Posts: 12
Joined: 28 Nov 2016
Has thanked: 4 times
Been thanked: 1 time

Re: Using the reserved word “TL_New”

Postby ~Zola~ » 22 May 2019

ABC wrote:~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: 12
Joined: 28 Nov 2016
Has thanked: 4 times
Been thanked: 1 time

Re: Using the reserved word “TL_New”

Postby ~Zola~ » 22 May 2019

sptrader wrote: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”