Join useThinkScript to post your question to a community of 21,000+ developers and traders.
input start_time = 0930;
input endtime = 1600;
def selected_time = if GetLastDay() == GetDay() and SecondsFromTime(start_time) >= 0 and SecondsFromTime(endtime) <
0 then 1 else 0;
plot p1 =
if (GetSymbol() == "AAON") and selected_time then 48.95 else
if (GetSymbol() == "AAPL") and selected_time then 85 else
if (GetSymbol() == "ABBV") and selected_time then 97 else
double.nan;
p1.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
p1.SetLineWeight(5);
p1.SetStyle(Curve.POINTS);
p1.AssignValueColor(if close > p1 then color.Dark_red else color.Dark_orange);
ic. i sorta figured that, but didnt see it in the code.
but does anyone know how to make the line stop at todays price and not go into the expansion area?
plot p1 =
if (GetSymbol() == "AAON") and close then 48.95 else
if (GetSymbol() == "AAPL") and close then 85 else
if (GetSymbol() == "ABBV") and close then 97 else
double.nan;
p1.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
p1.SetLineWeight(5);
p1.SetStyle(Curve.POINTS);
p1.AssignValueColor(if close > p1 then color.Dark_red else color.Dark_orange);
input start_time = 0930;
input endtime = 1600;
def selected_time = if GetLastDay() == GetDay() and SecondsFromTime(start_time) >= 0 and SecondsFromTime(endtime) <
0 then 1 else 0;
plot p1 =
if (GetSymbol() == "AAON") and selected_time then 48.95 else
if (GetSymbol() == "AAPL") and selected_time then 85 else
if (GetSymbol() == "ABBV") and selected_time then 97 else
double.nan;
p1.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
p1.SetLineWeight(5);
p1.SetStyle(Curve.POINTS);
p1.AssignValueColor(if close > p1 then color.Dark_red else color.Dark_orange);
loloh jeez, i missed that. THANK YOU XEO!!!!! you deserve that TB WIN!!!!
plot
but a way to recreate via script what the horizontal drawing tool does, so I can go and relabel when desired and also so the lines persist after the day they are initially drawn.#prior day High 5 days ago
pdHigh5 = high(period = Aggregation.Day)[5]
...
once bar number > 5 and at 9am
pdHigh5 = pdHigh4
pdHigh4 = pdHigh3
pdHigh3 = pdHigh2
pdHigh2 = pdHigh1
pdHigh1 = high(period = Aggregation.Day)
I've used that but it plots the same on all charts and cancels the last chart inputs. Is there a way to hold plots on each chart?Is there a way to keep these plots on one chart, move to another chart, set it up with new plots without cancelling the first charts plots?
Anyone know a script where you enter price levels, and it will draw levels on the chart. Manually enter support and resistance. 4 or 5 levels of each. Perhaps a script that will draw for or 5 levels above and 4 or 5 below after you enter the value in the script for the instrument?
plot line123 = 123;
plot line124 = 124;
plot line125 = 125;
describe your interpretation of "bounced off or rejected off".Hey guys, using thinkscript I want to make it so a horizontal line is placed at a price point that's been bounced off or rejected off.
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.