龙听期货论坛's Archiver

龙听 发表于 2018-10-22 14:09

SetPlotColor(画线颜色)

Usage[font=sans-serif][size=14px][font=monospace][color=#00ff]SetPlotColor[/color](PlotNumber, PlotColor)[/font]
[/size][/font]
Parameters[b]PlotNumber[/b] - a numerical expression specifying the plot number; plot numbers range from 1 to 999.[b]PlotColor[/b] - an expression specifying the plot color.[p=30, 2, left]Plot color can be specified by a numerical expression representing an [url=https://www.multicharts.com/trading-software/index.php/RGB]RGB color number[/url] or a [url=https://www.multicharts.com/trading-software/index.php/LegacyColorValue]legacy color value[/url], or by one of 17 [url=https://www.multicharts.com/trading-software/index.php/Category:Colors]base color words[/url].[/p]Notes[list][*]Use [url=https://www.multicharts.com/trading-software/index.php/GetPlotColor]GetPlotColor[/url] to get the color of a specified [url=https://www.multicharts.com/trading-software/index.php/Plot]plot[/url].[*]Use [url=https://www.multicharts.com/trading-software/index.php/SetPlotBGColor]SetPlotBGColor[/url] to set the color of a plot, and refer to the [url=https://www.multicharts.com/trading-software/index.php/GetBackgroundColor]GetBackgroundColor[/url] function to get the background [url=https://www.multicharts.com/trading-software/index.php/Category:Colors]color[/url].[/list]Examples[p=30, 2, left]Assign the color of [url=https://www.multicharts.com/trading-software/index.php/Blue]blue[/url] to plot1 for the duration of the current bar:[/p][font=sans-serif][size=14px][font=monospace][color=#00ff]SetPlotColor[/color]([color=#008b][b]1[/b][/color], [color=#00ff]Blue[/color]);[/font]
[/size][/font]
[p=30, 2, left]Assign [url=https://www.multicharts.com/trading-software/index.php/RGB]RGB color[/url] 2138336 (Orange) to plot1 for the duration of the current bar:[/p][font=sans-serif][size=14px][font=monospace][color=#00ff]SetPlotColor[/color]([color=#008b][b]1[/b][/color], [color=#008b][b]2138336[/b][/color]);[/font]
[/size][/font]
[p=30, 2, left]Assign [url=https://www.multicharts.com/trading-software/index.php/LegacyColorValue]legacy color[/url] 4 (Green) to plot1 for the duration of the current bar:[/p][font=sans-serif][size=14px][font=monospace][[color=#00ff]LegacyColorValue[/color] = [color=#00ff]True[/color]]; [color=#00ff]SetPlotColor[/color]([color=#008b][b]1[/b][/color], [color=#008b][b]4[/b][/color]);[/font]
[/size][/font]

页: [1]