Can I set the trendline Style in easylanguage  [SOLVED]

Questions about MultiCharts and user contributed studies.
KhaosTrader
Posts: 186
Joined: 10 May 2012
Has thanked: 14 times
Been thanked: 11 times

Can I set the trendline Style in easylanguage

Postby KhaosTrader » 25 Oct 2012

Hi,

How can I set the Trendline style in easylanguge - So that I can make the trendline solid to dotted based on a condition.

Thanks.

escamillo
Posts: 203
Joined: 25 Mar 2011
Has thanked: 23 times
Been thanked: 56 times

Re: Can I set the trendline Style in easylanguage

Postby escamillo » 25 Oct 2012

TL_SetStyle
Assigns the specified style to a trendline with the specified ID number; returns a value of 0 if the trendline style was successfully assigned, and a value of -2 if the specified trendline ID number is invalid.

Usage
TL_SetStyle(TL_ID,TL_Style)

Parameters
TL_ID - a numerical expression specifying the trendline ID number

TL_Style - a TL style constant or a numerical expression specifying the trendline style as follows:

Tool_Solid 1 ______________________
Tool_Dashed 2 - - - - - - - - - - - - - - - - - - -
Tool_Dotted 3 ............................................
Tool_Dashed2 4 __ _ __ _ __ _ __ _ __ _ __
Tool_Dashed3 5 ___ _ _ ___ _ _ ___ _ _ ___


Notes
A trendline-specific ID number is returned by TL_New when the trendline is created.

Example
Set the style of the trendline with an ID number of 3 to Tool Dashed:

Value1=TL_SetStyle(3, 2);

Set the style of the trendline with an ID number of 3 to Tool Dashed:

Value1=TL_SetStyle(3, Tool_Dashed);

bowlesj3
Posts: 2112
Joined: 21 Jul 2007
Has thanked: 202 times
Been thanked: 420 times

Re: Can I set the trendline Style in easylanguage  [SOLVED]

Postby bowlesj3 » 25 Oct 2012

In the Main MC Wiki page
https://www.multicharts.com/trading-sof ... /Main_Page
you can click on the "PowerLanguage Keyword Reference" to see all the keywords for trend lines.

Also, it took me a while but I figure out that you can search the Wiki with "*Dashed*" or "*Dotted*" and the use of the asterisks will bring up the "TL_SetStyle" command which is the one you use as mentioned above. If you do not include the asterisk character on both sides it does not find the information.


Return to “MultiCharts”