NexusFi: Find Your Edge


Home Menu

 





Addcloud help please


Discussion in ThinkOrSwim

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




 
Search this Thread

Addcloud help please

  #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:	251
Size:	60.5 KB
ID:	241464  
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
Trade idea based off three indicators.
Traders Hideout
Is there a way to simulate CONTINUOUS CONTRACT?
NinjaTrader
MC PL editor upgrade
MultiCharts
REcommedations for programming help
Sierra Chart
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Funded Trader platforms
33 thanks
Spoo-nalysis ES e-mini futures S&P 500
16 thanks
GFIs1 1 DAX trade per day journal
15 thanks
The Trading Pit "Futures VIP" Account Journal
15 thanks
Trading with Intuition
14 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


© 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