Help changing bar color in script - ThinkOrSwim | futures io social day trading
futures io futures trading


Help changing bar color in script
Updated: Views / Replies:450 / 2
Created: by tozwp Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Help changing bar color in script

  #1 (permalink)
Trading Apprentice
Milwaukee WI/US
 
Futures Experience: Intermediate
Platform: Multicharts, Tradestation
Favorite Futures: TF
 
Posts: 7 since Feb 2012
Thanks: 2 given, 1 received

Help changing bar color in script

Trying to change the color of candlestick in TOS based on condition of 3 indicators. I've done it in Easylanguage/Tradestation but having brain freeze trying to script it in TOS. Essentially I'm trying to flip the color from green to red on a change in all three indicators. In Easylanguage it looks like this:

Condition1 = (Indicator1 > value1) and (Indicator2 > value2) and (Indicator3 > value3);
Condition2 = (Indicator1 < value1) and (Indicator2 < value2) and (Indicator3 < value3);
If Condition1 then plotcolor = green;
If Condition2 then plotcolor = red;

In Easylanguage this will start plotting green when condition1 is true and continue to plot green until condition2 is true. Then it will plot red bars until condition1 is true again. I have the script written for the indicators and they work fine. I'm experiencing brain freeze regarding the logic for changing the color of the bars in TOS. Probably pretty easy if someone could point me in the right direction. Probably involves AssignPriceColor but so far I can't seem to create the logical equivalent of the Condition1 and Condition2 from Easylanguage.

Thanks!

Reply With Quote
 
  #2 (permalink)
Trading Apprentice
Bangkok
 
Futures Experience: Intermediate
Platform: Thinkorswim
Favorite Futures: Options
 
Posts: 5 since Jan 2016
Thanks: 0 given, 0 received

def Condition1 = (Indicator1 > value1) and (Indicator2 > value2) and (Indicator3 > value3);
def Condition2 = (Indicator1 < value1) and (Indicator2 < value2) and (Indicator3 < value3);

AssignPriceColor
(if Condition1 then Color.green
else if Condition2 then Color.red
else Color.CURRENT);

you can use "CreateColor(0,222,0)" instead of "Color.green" to create more specific color in RGB


Last edited by jjjann; January 22nd, 2016 at 06:01 AM.
Reply With Quote
 
  #3 (permalink)
Trading Apprentice
Milwaukee WI/US
 
Futures Experience: Intermediate
Platform: Multicharts, Tradestation
Favorite Futures: TF
 
Posts: 7 since Feb 2012
Thanks: 2 given, 1 received

Thanks!


Thank you! My problem was that I was trying to use an IF statement in the def statement like this:

def Condition1 = IF (Indicator1 > value1) and (Indicator2 > value2) and (Indicator3 > value3);

That doesn't work! Trying to think in Easylanguage but trying to write in TOS script causes my brain to short circuit.

Reply With Quote

Reply



futures io > > > > Help changing bar color in script

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing background color in TOS tcooper35 ThinkOrSwim 1 October 16th, 2015 10:02 PM
Color changing candles rsi dwemini NinjaTrader 10 February 21st, 2014 06:38 PM
EMA changing Color Trend Carl7816 EasyLanguage Programming 3 May 9th, 2013 08:16 PM
Stochastics Color Changing wbtrader EasyLanguage Programming 4 August 29th, 2011 01:38 PM
Color changing Regression Line with Paint Bar Gibby NinjaTrader Programming 49 April 23rd, 2010 03:54 PM


All times are GMT -4. The time now is 03:08 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-14 in 0.08 seconds with 19 queries on phoenix via your IP 54.145.16.43