Tone color when increase
Posted: 08 Dec 2015
Is there any possibility to tone color (like GradientColor) of the plot when I zoom (Increase bar spacing) the chart-window ?
MultiCharts
https://www.multicharts.com/discussion/
https://www.multicharts.com/discussion/viewtopic.php?f=5&t=49226
Code: Select all
vars: barcolor ( 0 );
Switch(getappinfo(aibarspacing)) begin
case < 6: barcolor = red;
case < 8: barcolor = magenta;
case < 10: barcolor = yellow;
case < 15: barcolor = cyan;
case >= 15: barcolor = green;
end;
Plot1 ( 1 , "", barcolor ,barcolor );
Code: Select all
vars: intrabarpersist barcolor ( 0 );
Once barcolor = red;
Switch(getappinfo(aibarspacing)) begin
case < 6: barcolor = red;
case < 8: barcolor = magenta;
case < 10: barcolor = yellow;
case < 15: barcolor = cyan;
case >= 15: barcolor = green;
end;
Plot1 ( RSI (close,14) , "", barcolor ,barcolor );
for value1 = 1 to currentbar
begin
SetPlotColor [value1](1,barcolor);
end;
Code: Select all
Vars: intrabarpersist barcolor(0);
Once barcolor = red;
{------------------ Switch Plot Color ------------------}
Switch(getappinfo(aibarspacing)) begin
case < 0.10: barcolor = white;
case < 0.40: barcolor = magenta;
case < 0.70: barcolor = yellow;
case < 1: barcolor = cyan;
case >= 1: barcolor = green;
end;
{---------------- End Switch Plot Color ---------------}
Plot1 (RSI(close,14),"testRSI",barcolor,barcolor);
{------------------ Set Plot Color --------------------}
if (barColor <> barColor[1]) then
begin
for value1 = 1 to currentbar
begin
SetPlotColor[value1](1,barcolor);
Print("SetPlotColor");
end;
end;
{----------------- End Set Plot Color -----------------}