Dark Theme
Light Theme
Trading Articles
Article Categories
Article Tools
Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to
register in order to view the content of the threads and start contributing to our community.
It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Add previous close line to thinkorswim charts intraday
Updated March 12, 2021
Top Posters
looks_one
phamta
with 4 posts (0 thanks)
looks_two
Nube
with 3 posts (4 thanks)
looks_3
Depiero
with 2 posts (0 thanks)
looks_4
Thatsoundgye
with 2 posts (0 thanks)
trending_up
15,522 views
thumb_up
5 thanks given
group
9 followers
forum
13 posts
attach_file
0 attachments
Add previous close line to thinkorswim charts intraday
February 14th, 2014, 11:37 AM
Charlotte, nc
Posts: 8 since Feb 2014
Thanks Given: 0
Thanks Received: 2
Hello,
I would like to know how can I add a little tittle with the number or closed day, I can see the link but would like to see a number too.. how can I do that?
Code
input aggregationPeriod = AggregationPeriod.DAY;
input length = 1;
input displace = -1;
input showOnlyLastPeriod = no;
plot PrevDayClose;
if showOnlyLastPeriod and !IsNaN(close(period = aggregationPeriod)[-1]) {
PrevDayClose = Double.NaN;
} else {
PrevDayClose = Highest(close(period = aggregationPeriod)[-displace], length);
}
PrevDayClose.SetDefaultColor(GetColor(9));
PrevDayClose.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Can you help answer these questions from other members on NexusFi?
Best Threads (Most Thanked) in the last 7 days on NexusFi
February 14th, 2014, 12:10 PM
Puerto Rico
Experience: Intermediate
Platform: thinkorswim
Broker: TD Ameritrade
Trading: Options
Posts: 379 since Oct 2010
Thanks Given: 3,614
Thanks Received: 441
Add a tittle where? A "label" on the top left area of the chart?
Learning Center ? Charting
February 14th, 2014, 12:26 PM
Charlotte, nc
Posts: 8 since Feb 2014
Thanks Given: 0
Thanks Received: 2
I think I figured it out..
I somehow came up with this and it looks like its working
AddChartBubble(GetYYYYMMDD() != GetYYYYMMDD()[1], high, "Day: " + GetDayofWeek(GetYYYYMMDD()) + " - Close: " + PrevDayClose, Color.white, yes);
January 7th, 2015, 03:59 PM
Prospect, KY. USA
Experience: None
Platform: Sierra Chart
Broker: Infinity
Trading: /CL
Posts: 687 since Jan 2012
Thanks Given: 309
Thanks Received: 617
I don't know if this is still active or not...
See if the attached will do you any good
-Bill
Price Line Study
https://nexusfi.com/download/thinkorswim/
July 16th, 2019, 05:27 AM
Malaysia
Posts: 1 since May 2019
Thanks Given: 0
Thanks Received: 0
Hi guys, the script above is included the after market hour close price. How can I exclude the after market hour close price? Kindly assist. Thanks
July 23rd, 2019, 09:03 PM
Minneapolis Minnesota
Posts: 24 since Jul 2019
Thanks Given: 0
Thanks Received: 13
Daniel S
Hi guys, the script above is included the after market hour close price. How can I exclude the after market hour close price? Kindly assist. Thanks
def RTHClose = if GetTime() crosses above RegularTradingEnd(GetYYYYMMDD()) then
close[1] else RTHClose[1];
plot RegularTradingClose = RTHClose;
December 16th, 2019, 09:36 PM
Monroe
Posts: 3 since Dec 2019
Thanks Given: 0
Thanks Received: 0
Could you guys help me to make a code for an open and close levels for the first 5 minutes opening bar please
December 16th, 2019, 09:55 PM
OR/USA
Legendary /NQ Trader
Posts: 2,129 since Mar 2011
Thanks Given: 1,859
Thanks Received: 5,106
initial balance was the first thing that came to my mind. try this.
might need to change def pastOpeningRange
input showOnlyToday = YES;
input InitialBalanceMinutes = 5;
input Market_Open_Time = 0630;
input Market_Close_Time = 1415;
def day = GetDay();
def lastDay = GetLastDay();
def isToday = If(day == lastDay, 1, 0);
def shouldPlot = If(showOnlyToday and isToday, 1, If(!showOnlyToday, 1, 0));
def pastOpen = If((SecondsTillTime(Market_Open_Time) > 0), 0, 1);
def pastClose = If((SecondsTillTime(Market_Close_Time) > 0), 0, 1);
def marketOpen = If(pastOpen and !pastClose, 1, 0);
def firstBar = If (day[1] != day, day - 1, 0);
def secondsUntilOpen = SecondsTillTime(Market_Open_Time);
def regularHours = SecondsTillTime(Market_Close_Time);
def secondsFromOpen = SecondsFromTime(Market_Open_Time);
def pastOpeningRange = If(secondsFromOpen >= (InitialBalanceMinutes * 60), 1, 0);
rec displayedHigh = If(high > displayedHigh[1] and marketOpen, high, If(marketOpen and !firstBar, displayedHigh[1], high));
rec displayedLow = If(low < displayedLow[1] and marketOpen, low, If(marketOpen and !firstBar, displayedLow[1], low));
rec IBHigh = If(pastOpeningRange, IBHigh[1], displayedHigh);
rec IBLow = If(pastOpeningRange, IBLow[1], displayedLow);
plot IBH = If(pastOpeningRange and marketOpen and shouldPlot, IBHigh, Double.NaN);
plot IBL = If(pastOpeningRange and marketOpen and shouldPlot, IBLow , Double.NaN);
IBH.SetDefaultColor(Color.CYAN);
IBH.SetStyle(Curve.FIRM);
IBH.SetLineWeight(1);
IBL.SetDefaultColor(Color.CYAN);
IBL.SetStyle(Curve.FIRM);
IBL.SetLineWeight(1);
#AddCloud(IBH, IBL, Color.DARK_GRAY, Color.DARK_GRAY);
def ORWidth = IBH - IBL;
plot Mid = (IBH + IBL) / 2;
Mid.SetDefaultColor(Color.CYAN);
Mid.SetStyle(Curve.SHORT_DASH);
Mid.SetLineWeight(2);
input InitialBalance_Label = Yes;
AddLabel(InitialBalance_Label, Concat("IB: ", AbsValue(IBH - IBL)), Color.DARK_ORANGE);
December 16th, 2019, 09:57 PM
Monroe
Posts: 3 since Dec 2019
Thanks Given: 0
Thanks Received: 0
Thanks
Should we use 930 for the regular trading hour?
December 16th, 2019, 11:10 PM
Minneapolis Minnesota
Posts: 24 since Jul 2019
Thanks Given: 0
Thanks Received: 13
phamta
Thanks
Should we use 930 for the regular trading hour?
Code
def RTHOpen;
def FiveMinuteClose;
if GetTime() crosses above RegularTradingStart(GetYYYYMMDD()) {
RTHOpen = open;
FiveMinuteClose = close(period = AggregationPeriod.FIVE_MIN);
}else{
RTHOpen = RTHOpen[1];
FiveMinuteClose = FiveMinuteClose[1];
}
plot o = RTHOpen;
plot c = FiveMinuteClose;
Last Updated on March 12, 2021