Custom color from dropdown inputs

wes.

New member
Hey there, I am new to thinkscript and would greatly appreciate any help. I would like to add a custom color to this input's drop down menu:

JLeavTa.png


The custom color I would like to use is:

MnoGw1T.jpg


this is the study's script:

Code:
input Period = aggregationPeriod.HOUR;
input AvgType = averageType.EXPONENTIAL;
input FastLength = 72;
input SlowLength = 89;
input priceclose = close;
input CloudColorBull = {"MAGENTA", "CYAN", "PINK", "LIGHT_GRAY", "ORANGE", "RED", "GREEN", default "GRAY", "WHITE"};
input CloudColorBear = {"MAGENTA", "CYAN", "PINK", "LIGHT_GRAY", "ORANGE","RED", "GREEN",default "GRAY", "WHITE"};

plot fastAVG = MovingAverage(AvgType, close(period = Period), FastLength);
plot slowAVG = MovingAverage(AvgType,close(period = Period), SlowLength);
fastAVG.setdefaultcolor(color.white);
fastAVG.setStyle(curve.SHORT_DASH);
slowAVG.setdefaultcolor(color.white);
slowAVG.setStyle(curve.SHORT_DASH);
AddCloud(fastAVG,slowAVG,GetColor(CloudColorBull),GetColor(CloudColorBear));
 

XeoNoX

Well-known member
VIP
here you go... you can manually set the color code to the the RGB code numbers you want
just change CreateColor(205,0, 0) and CreateColor(29,129, 163) to your wanted numbers


Code:
input Period = aggregationPeriod.HOUR;
input AvgType = averageType.EXPONENTIAL;
input FastLength = 72;
input SlowLength = 89;
input priceclose = close;
plot fastAVG = MovingAverage(AvgType, close(period = Period), FastLength);
plot slowAVG = MovingAverage(AvgType,close(period = Period), SlowLength);
fastAVG.setdefaultcolor(color.white);
fastAVG.setStyle(curve.SHORT_DASH);
slowAVG.setdefaultcolor(color.white);
slowAVG.setStyle(curve.SHORT_DASH);
AddCloud(fastAVG,slowAVG,CreateColor(205,0, 0),CreateColor(29,129, 163));
 

wes.

New member
here you go... you can manually set the color code to the the RGB code numbers you want
just change CreateColor(205,0, 0) and CreateColor(29,129, 163) to your wanted numbers


Code:
input Period = aggregationPeriod.HOUR;
input AvgType = averageType.EXPONENTIAL;
input FastLength = 72;
input SlowLength = 89;
input priceclose = close;
plot fastAVG = MovingAverage(AvgType, close(period = Period), FastLength);
plot slowAVG = MovingAverage(AvgType,close(period = Period), SlowLength);
fastAVG.setdefaultcolor(color.white);
fastAVG.setStyle(curve.SHORT_DASH);
slowAVG.setdefaultcolor(color.white);
slowAVG.setStyle(curve.SHORT_DASH);
AddCloud(fastAVG,slowAVG,CreateColor(205,0, 0),CreateColor(29,129, 163));
Awesome! Thank you very much
 

Similar threads

Top