i dont want the open price i want HIGH LOW CLOSE onlyChart Settings > Appearance > Bar
which platform contains hlc bars only@MAGICO I don't believe it is possible to do so. In other platforms I know it can be done, but I have never found such a function in ThinkorSwim.
I'm pretty sure you can do it you mean hlc/3?i dont want the open price just high low close
you got me?
#addchart - up/down heiken ashi candle colors - workaround for the addchart() function not supported by TOS
def nan = double.nan;
def o = open;
def c = close;
def h = high;
def l = low;
AddChart(high = if c > o then h else nan,
low = if c > o then l else nan,
close = if c > o then c else nan,
open = if c > o then nan else nan,
ChartType.BAR, Color.dark_GREEN);
AddChart(high = if c < o then h else nan,
low = if c < o then l else nan,
open = if c < o then nan else nan,
close = if c < o then c else nan,
ChartType.BAR, Color.dark_RED);
AddChart(high = if c == o then h else nan,
low = if c == o then l else nan,
open = if c == o then nan else nan,
close = if c == o then c else nan,
ChartType.BAR, Color.GRAY);
thanks for your reply@MAGICO I have no idea why you aren't satisfied with what Thinkorswim has to offer but if you aren't then it surely isn't our job to point you to a platform that better suits you... Go do your own research, plain and simple...!!! Or learn to live within Thinkorswims limitations... These forums are for traders who use and enjoy Thinkorswim... I'll go so far as to say that I'm appalled when members come here asking us to convert Thinkscripts to other platforms, and I'm not to keen on repetitive requests to convert scripts from other platforms to Thinkscript... This is a coding forum, to learn to use and write Thinkscript, not place for members to beg for others to do their work for them... I hope I've made myself clear...
how can i make the bar much thicker?Per @SleepyZ, who fancied-up my suggestion there to use AddChart in another thread (https://usethinkscript.com/threads/change-opacity-of-cloud.5721/post-54287), you can use the AddChart (though it is deprecated and wonky as all get out)
Code:#addchart - up/down heiken ashi candle colors - workaround for the addchart() function not supported by TOS def nan = double.nan; def o = open; def c = close; def h = high; def l = low; AddChart(high = if c > o then h else nan, low = if c > o then l else nan, close = if c > o then c else nan, open = if c > o then nan else nan, ChartType.BAR, Color.dark_GREEN); AddChart(high = if c < o then h else nan, low = if c < o then l else nan, open = if c < o then nan else nan, close = if c < o then c else nan, ChartType.BAR, Color.dark_RED); AddChart(high = if c == o then h else nan, low = if c == o then l else nan, open = if c == o then nan else nan, close = if c == o then c else nan, ChartType.BAR, Color.GRAY);
See how the open is always a double.nan? That's how you can ignore the open price.
happy trading,
mashume
P.S. If you don't want to use the (c<o|c>o|c==o) set of operations -- if you want to ignore open prices entirely, you can replace the o in each of them with c[1] (c<c[1]|c>c[1]|c==c[1]).
You can't. Not that I know how to do. This is already a deprecated function (read: may be removed at any time). We can only bend ToS so far.thanks for your reply
how can i make the bar much thicker?
thanksYou can't. Not that I know how to do. This is already a deprecated function (read: may be removed at any time). We can only bend ToS so far.
You could, I suppose, modify the script above so that instead of a single bar for each block of trades, it generated two such that one was coloured green for the vertical bar and a different chart was coloured dependent on the movement of the bar to be red for down and green for up. Just depends on how important it is to you.anyone know how i can make the opening horizontal line one color and the closing line a different color. or this?
#addchart - up/down heiken ashi candle colors - workaround for the addchart() function not supported by TOS
def nan = double.nan;
def o = open;
def c = close;
def h = high;
def l = low;
AddChart(high = if c > o then h else nan,
low = if c > o then l else nan,
close = if c > o then c else nan,
open = if c > o then nan else nan,
ChartType.bar, Color.black);
AddChart(high = if c < o then h else nan,
low = if c < o then l else nan,
open = if c < o then nan else nan,
close = if c < o then c else nan,
ChartType.bar, Color.black);
AddChart(high = if c == o then h else nan,
low = if c == o then l else nan,
open = if c == o then nan else nan,
close = if c == o then c else nan,
ChartType.bar, Color.black);
plot RealClose = close;
RealClose.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
RealClose.HideBubble();
how did you do it, we can change the color?If anyone wants HLC candles similar to those of MarketSmith, I slightly modified the code above to make the close go across the whole bar and made the built in candles fully transparent.Code:#addchart - up/down heiken ashi candle colors - workaround for the addchart() function not supported by TOS def nan = double.nan; def o = open; def c = close; def h = high; def l = low; AddChart(high = if c > o then h else nan, low = if c > o then l else nan, close = if c > o then c else nan, open = if c > o then nan else nan, ChartType.bar, Color.black); AddChart(high = if c < o then h else nan, low = if c < o then l else nan, open = if c < o then nan else nan, close = if c < o then c else nan, ChartType.bar, Color.black); AddChart(high = if c == o then h else nan, low = if c == o then l else nan, open = if c == o then nan else nan, close = if c == o then c else nan, ChartType.bar, Color.black); plot RealClose = close; RealClose.SetPaintingStrategy(PaintingStrategy.HORIZONTAL); RealClose.HideBubble();
View attachment 20802
how did you do it, we can change the color?
FYI: Line Width works on Bar, Candle, Candle Trend, Heikin Ashi, Line@MAGICO I don't believe it is possible to do so. In other platforms I know it can be done, but I have never found such a function in ThinkorSwim.
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
Q | Is there a way to pull HLC array into thinkscript? | Questions | 4 | |
T | HLC Price Line | Questions | 5 | |
D | Bar Count.. every THREE bars | Questions | 2 | |
H | Plot an arrow a variable number of bars to the right | Questions | 3 | |
T | How t o find 4th highest close in last 100 bars? | Questions | 6 |
Start a new thread and receive assistance from our community.
useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.
We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.
If you are new, or just looking for guidance, here are some helpful links to get you started.