new york city, new york, usa
Posts: 2 since Jul 2018
Thanks Given: 0
Thanks Received: 0
|
Hi there, does anyone can help on adding 'opacity' feature to any indicator like stochasticDiff?
The 'opacity' feature can only be found in VolumeProfile as below,
#
# TD Ameritrade IP Company, Inc. (c) 2010-2018
#
input pricePerRowHeightMode = {default AUTOMATIC, TICKSIZE, CUSTOM};
input customRowHeight = 1.0;
input timePerProfile = {default CHART, MINUTE, HOUR, DAY, WEEK, MONTH, "OPT EXP", BAR};
input multiplier = 1;
input onExpansion = yes;
input profiles = 1000;
input showPointOfControl = yes;
input showValueArea = yes;
input valueAreaPercent = 70;
input opacity = 50;
def period;
def yyyymmdd = getYyyyMmDd();
.........
profile vol = volumeProfile("startNewProfile" = cond, "onExpansion" = onExpansion, "numberOfProfiles" = profiles, "pricePerRow" = height, "value area percent" = valueAreaPercent);
..........
vol.show(globalColor("Profile"), if showPointOfControl then globalColor("Point Of Control") else color.current, if showValueArea then globalColor("Value Area") else color.current, opacity);
.........
The variable vol defined via profile, so it can use vol.show() to activate 'opacity', but in stochasticDiff or many other indicators, only use plot to draw the curve.
I'd like to overlap 2 or more indicators in one window, just like set VolumeProfile in price window and set opacity=10 to darken it, so that will bot block price candles . But this feature not available on other indicators, how do we add it on?
Any clue?
|