Tone color when increase
Re: Tone color when increase
You could try something like that:
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 );
Re: Tone color when increase
SP , your solution was brilliant!
Tried to get the whole plot to change color , but without success.
The idea was to zoom in and when to see a more sensitive indicator ( hidden in the normal mode ).
Tried to get the whole plot to change color , but without success.
The idea was to zoom in and when to see a more sensitive indicator ( hidden in the normal mode ).
Re: Tone color when increase
For changing the color in the past add a loop, i.e.:
You only need to add some lines into your code to prevent that the color change is calculated at each tick.
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;
Re: Tone color when increase
Thanks SP, you are a star!
Everything works as I wanted.
Everything works as I wanted.
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 -----------------}