Make colors on chart studies more translucent?

  • Thread starter YungTraderFromMontana
  • Start date
YungTraderFromMontana

YungTraderFromMontana

Well-known member
I'm trying to overlay accumulation distribution on my chart but the color are too bright and distracting. Could anyone make it so the colors are more see through and don't clash with the candles. I know their is a feature on volume profile to do this but I can't replicate it on other indicators.

Here's the accumulation distribution code:
Code:
declare lower;
input length = 6;
input factor = 0.95;
input mode = {default Range, ATR};

def range;
switch (mode) {
case Range:
    range = Highest(high, length) - Lowest(low, length);

case ATR:
    range = reference ATR();
}

plot RangeRatio = (range / range[length])/2;
plot RangeFactor = factor/2;

RangeRatio.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
RangeRatio.DefineColor("Consolidation", GetColor(4));
RangeRatio.DefineColor("Non-consolidation", GetColor(1));

RangeRatio.AssignValueColor( if (RangeRatio < RangeFactor) then RangeRatio.Color("Consolidation") else RangeRatio.Color("Non-consolidation"));
RangeFactor.SetDefaultColor(GetColor(7));

RangeRatio.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
RangeRatio.DefineColor("Consolidation", GetColor(4));
RangeRatio.DefineColor("Non-consolidation", GetColor(1));

RangeRatio.AssignValueColor( if (RangeRatio < RangeFactor) then RangeRatio.Color("Consolidation") else RangeRatio.Color("Non-consolidation"));
RangeFactor.SetDefaultColor(GetColor(7));
Here is the opacity control feature in volume profile:

Code:
input showPointOfControl = yes;
input showValueArea = yes;
input valueAreaPercent = 70;
input opacity = 50;

DefineGlobalColor("Profile", GetColor(1));
DefineGlobalColor("Point Of Control", GetColor(5));
DefineGlobalColor("Value Area", GetColor(8));
vol.show(globalColor("Profile"), if showPointOfControl then globalColor("Point Of Control") else color.current, if showValueArea then globalColor("Value Area") else color.current, opacity);
I would like the end goal to be an opacity control of the rangeratio.
 
horserider

horserider

Well-known member
VIP
Do not know if it is possible. SHOW is defined as "This function controls visibility and color scheme of Time, Volume, and Monkey Bars profiles. Note that profiles calculated by the corresponding functions will only be visible if the Show function is applied to them. " Opacity is one of the inputs available.

Maybe use Createcolor and find a pastel that works.
 
YungTraderFromMontana

YungTraderFromMontana

Well-known member
Do not know if it is possible. SHOW is defined as "This function controls visibility and color scheme of Time, Volume, and Monkey Bars profiles. Note that profiles calculated by the corresponding functions will only be visible if the Show function is applied to them. " Opacity is one of the inputs available.

Maybe use Createcolor and find a pastel that works.
That worked, I didn't know transparency was an option when picking colors.
 
X

XeoNoX

New member
yes you can make it transparent ( lighter or darker - see through ) pretty much same as changing opacity in thinkorswim thinkscript on volume profile

 
G

gjervis

New member
2019 Donor
VIP
@YungTraderFromMontana Is this one code? or two separate codes? how does one combine it if its two separate codes?
 
V

vro3

Member
Hey all! Is there a way to make the overall opacity of a study less?
Thanks!

EDIT:
FOUND IT. Color -> more colors. then RGB . etc. there's an option!
 

Similar threads

Top