NexusFi: Find Your Edge


Home Menu

 





How to coding 'opacity' in thinkorswim?


Discussion in ThinkOrSwim

Updated
    1. trending_up 5,076 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 0 posts
    2. attach_file 0 attachments




 
Search this Thread

How to coding 'opacity' in thinkorswim?

  #1 (permalink)
wowo4usa
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?

Reply With Quote




Last Updated on July 18, 2018


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts