NexusFi: Find Your Edge


Home Menu

 





Changing Price Bar Width based on condition


Discussion in ThinkOrSwim

Updated
      Top Posters
    1. looks_one 38ksfarmer40 with 2 posts (0 thanks)
    2. looks_two coolhand with 1 posts (0 thanks)
    3. looks_3 with 1 posts (1 thanks)
    4. looks_4 Nube with 1 posts (1 thanks)
    1. trending_up 4,695 views
    2. thumb_up 1 thanks given
    3. group 4 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
38ksfarmer40
Spring Hill Kansas
 
Posts: 4 since Jan 2018
Thanks Given: 1
Thanks Received: 1

I am trying to have a script change the width or thickness of a price bar as well as set the color based on signal condition. The script is shown below.
Is this even possible in TOS?
Thanks

Declare upper;
input HiLkBk = 20;
input LoLkBk = 10;

Def Hi = high >= highest(high, HiLkBk) within 2 bars and close < open;
Def Lo = low <= lowest(low, LoLkBk) within 2 bars and close > open;

Def Signal = if hi then 1 else if lo then -1 else 0;

AssignPriceColor(IF signal == 1 then color.YELLOW else
if signal == -1 then color.white else Color.CURRENT);


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trump Lands in Beijing on CPI Day: Iran Peace Expires To …
Prediction Markets & Event Contracts
Sundays Verdict: Lebanon Locked at 99.85% as Iran June 7 …
Prediction Markets & Event Contracts
Friday Update: Markets Now Pricing Fed Rate HIKES as Sta …
Traders Hideout
Thanks Mike. Godspeed.
The Elite Circle
El Clasico Draws $9.2M in Prediction Market Action -- Bi …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
205 thanks
Sober Journey With S&P
21 thanks
30 Sessions
20 thanks
Volume Indicators
8 thanks
Thanks Mike. Godspeed.
7 thanks
  #2 (permalink)
StillGoods69
 
Posts: n/a since

I spoke with a TOS thinkscript employee last week. they are working on functionality of making OHLC bars wider via script. Otherwise, there isn't a way. No time frame on this.


Reply With Quote
Thanked by:
  #3 (permalink)
38ksfarmer40
Spring Hill Kansas
 
Posts: 4 since Jan 2018
Thanks Given: 1
Thanks Received: 1


Mark Paul,
Thank you so much for the investigation and the response.
It is really appreciated.
Frank


Reply With Quote
  #4 (permalink)
coolhand
atlanta ga usa
 
Posts: 1 since Jul 2019
Thanks Given: 0
Thanks Received: 0

Any news on ways to make the bars in tos bigger? thanks for your time and any help


Reply With Quote
  #5 (permalink)
Nube
Minneapolis Minnesota
 
Posts: 24 since Jul 2019
Thanks Given: 0
Thanks Received: 13


38ksfarmer40 View Post
I am trying to have a script change the width or thickness of a price bar as well as set the color based on signal condition. The script is shown below.
Is this even possible in TOS?
Thanks

Declare upper;
input HiLkBk = 20;
input LoLkBk = 10;

Def Hi = high >= highest(high, HiLkBk) within 2 bars and close < open;
Def Lo = low <= lowest(low, LoLkBk) within 2 bars and close > open;

Def Signal = if hi then 1 else if lo then -1 else 0;

AssignPriceColor(IF signal == 1 then color.YELLOW else
if signal == -1 then color.white else Color.CURRENT);

There is no control over the width of the bar in ThinkScript


Reply With Quote
Thanked by:
  #6 (permalink)
mino
madrid
 
Posts: 4 since Feb 2021
Thanks Given: 0
Thanks Received: 1

any news in changing the width of price bars in TOS


Reply With Quote




Last Updated on February 27, 2021


© 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