NexusFi: Find Your Edge


Home Menu

 





Addcloud help please


Discussion in ThinkOrSwim

Updated
    1. trending_up 4,450 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 1 attachments




 
Search this Thread
  #1 (permalink)
Doncorleone
Seattle
 
Posts: 11 since Mar 2011
Thanks Given: 4
Thanks Received: 1

I'm trying to add two clouds to an indicator but one cloud(the lower one) automatically displays in red color on the chart no matter what color I type in. For example, in the script below, I have violet as the color of my choice, but the chart displays it in red. Is this a thinkorswim default or is there something wrong with the script? Is there any way I can change it or have the indicator display the color I want? Thanks in advance.

-------------------------------------


input length = 20;
input Fib1 = .25;
input Fib2 = .75;

plot topBand = Highest(high[1], length);
plot bottomBand = Lowest(low[1], length);
plot centerBand = (topBand + bottomBand) / 2;
plot Fibo1 = ((topBand - bottomband) * Fib1) + bottomband;
plot Fibo2 = ((topBand - bottomband) * Fib2) + bottomband;

AddCloud(topband, Fibo2, color.green);
AddCloud(bottomband, Fibo1, Color.violet);


Attached Thumbnails
Click image for larger version

Name:	2017-09-15-TOS_CHARTS.png
Views:	328
Size:	60.5 KB
ID:	241464  
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Ceasefire Collapse: Iran Fires 24 Missiles, Israel Hits …
Traders Hideout
Kalshi Sets $4.13B All-Time Weekly Record as Polymarket …
Prediction Markets & Event Contracts
Four New E-mini Futures Launch June 29 -- Russell 3000, …
Emini and Emicro Index
May 26 Deadline Dies at 7.5% as US Strikes Iran During C …
Prediction Markets & Event Contracts
CME Group CEO Calls CFTC-Approved Crypto Perps Dangerous …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
15 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 thanks
  #2 (permalink)
Doncorleone
Seattle
 
Posts: 11 since Mar 2011
Thanks Given: 4
Thanks Received: 1

got it figured out. I had to change the last line of code so the two variables are swapped:

previous: addcloud(bottomband, Fibo1, color.blue);

now: addcloud(Fibo1, bottomband, color.blue);

I don't know why that works but it does!


Reply With Quote
  #3 (permalink)
devildriver6
Dallas, Texas
 
Posts: 43 since Jun 2015
Thanks Given: 2
Thanks Received: 32



Doncorleone View Post
got it figured out. I had to change the last line of code so the two variables are swapped:

previous: addcloud(bottomband, Fibo1, color.blue);

now: addcloud(Fibo1, bottomband, color.blue);

I don't know why that works but it does!


Whichever value you put first is the "top" value.
Second is the "bottom" value.

So, whichever color you place first after that displays when top is top and bottom is bottom.
If those flip (where the first value is below, and the second is above), the second color displays.

By default, the first/second colors are green/red. You don't have a second color, so, when you flipped the values, the colors flipped.

Make sense?


Reply With Quote
Thanked by:




Last Updated on September 27, 2017


© 2026 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 - Downloads - Top
no new posts