Join useThinkScript to post your question to a community of 21,000+ developers and traders.
#Close above Open:
def AP = AggregationPeriod.DAY;
input cl = close;
input op = open;
plot co = cl>op;
co.assignValueColor(if cl>op then color.green else color.red);
#Open above Yesterday Close and Close Above Open:
def ap = AggregationPeriod.DAY;
def op = open(period = ap);
def ycl = close(period = ap)[1];
def cl = close;
def cond = op > ycl[1] and cl>op;
def isRollover = GetYYYYMMDD() != GetYYYYMMDD()[1];
def beforeStart = GetTime() < RegularTradingStart(GetYYYYMMDD());
def vol = if isRollover and beforeStart then volume else if beforeStart then vol[1] + volume else Double.NaN;
def PMVol = if IsNaN(vol) then PMVol[1] else vol;
def Agg = AggregationPeriod.DAY;
def AvgVol = average(Volume(period=Agg),60)[1];
def RV = Round((PMVol/AvgVol),2);
#def L = Lg(RV);
#def p = if L>=1 then 0 else if L>=0 then 1 else 2;
#def y2 = Round(RV,p);
plot z = RV;
#def L = Lg(RV);
#def p = if L>=1 then 0 else if L>=0 then 1 else 2;
#def y2 = Round(RV,p);
So after reading through everything slightly confused.No, this was a column for Premarket Relative Volume but did not work. You can get the PM relative volume as a chart label in my other thread.
def isRollover = GetYYYYMMDD() != GetYYYYMMDD()[1];
def beforeStart = GetTime() < RegularTradingStart(GetYYYYMMDD());
def vol = if isRollover and beforeStart then volume else if beforeStart then vol[1] + volume else Double.NaN;
def PMV = if IsNaN(vol) then PMV[1] else vol;
def AV = AggregationPeriod.DAY;
def x = Average(Volume(period=AV)[1],60);
def y1 = Round((PMV/x),2);
def L = Lg(y1);
def p = if L>=1 then 0 else if L>=0 then 1 else 2;
def y2 = Round(y1,p);
plot z = y2;
z.assignValueColor(if z>=10 then color.CYAN else if z>=1 then createcolor(255,153,153) else createcolor(0,215,0));
def x = Average(volume, 60)[1];
def v = volume;
plot r = Round((v/x),1);
r.assignValueColor(if r >= 20 then color.CYAN else if r>=5 then createcolor(255,153,153) else createcolor(0,215,0));
EDIT: after reading through the pages I found this. So I'm going to set all of them to D even though ill be looking at the 1-minute chart.The RV calculation is (today's volume) / (60 day average daily volume). When you put in the column code, make sure you mark D for day for next to Column Name.
Invalid statement: Cyan at 1:1
Invalid statement: CO at 37:1
Invalid statement: L1 at 47:1
Invalid statement: RV1 at 59:1
Hi Everyone,I have developed color coded watchlist columns which can be very helpful, especially when looking at a gap scan on the left while tracking charts on the right. These are color coded based on values. The columns eliminate all those extra zeros at the end and make it easy to spot big values. The codes are listed below. Please pass it on!
Cyan - highest
Red - 2nd highest
Green - 3rd highest
Yellow - lowest
C1 – <20, 20-40, >40
CO – <0, 0-20, 20-40, >40
L1 – 1-5, 5-10, >10
RV1 – 0-5, 5-20, >20
C1
Code:#Pct Change from Yesterday Close def AP = AggregationPeriod.DAY; def y = close(period = AP)[1]; def x = Round(100*((close/y)-1),1); plot z=x; z.assignValueColor(if z>=40 then color.CYAN else if z>=20 then createcolor(255,153,153) else createcolor(0,215,0));
CO
Code:#Percent change from open plot x = Round(100*((close/open)-1),1); x.assignValueColor( if x >=40 then color.CYAN else if x>=20 then createcolor(255,153,153) else if x>=0 then createcolor(0,215,0) else color.YELLOW);
L1
Code:#Rounded Last def L = Round(close,2); plot x = L; x.assignValueColor(if x>=10 then color.CYAN else if x>=5 then createcolor(255,153,153) else createcolor(0,215,0));
RV1
Code:#Relative Volume def x = Average(volume, 60)[1]; def v = volume; plot r = Round((v/x),1); r.assignValueColor(if r >= 20 then color.CYAN else if r>=5 then createcolor(255,153,153) else createcolor(0,215,0));
Brilliant- I cant wait to try it out. I have the columns loaded- edit i see how to add the scan now!!! pasting here for others... "These codes are only for watchlist columns. To use these, go to a scan and click Customize at top right. Then add each code separately to Custom column. Once you do that, there should not be any errors. These values only work after 9:30am."@bss05
You could have bought FRAN at less than $4.50 this morning. If you track your premarket scanner on TOS, it spiked at 7:30 when the news came out. You just wait for the pullback and then buy it. Then just hold it as long as it stays above VWAP and you can make 100% return in premarket.
Here is what I use for Premarket Scan:
Last: 0.2 to 15
Volume: 5000 to No Max
Custom Study Filter: After Hours Change, the close is greater then 10% (under Price Performance); check the Ext box and select 1m on the right.
As soon as you see FRAN pop up in the scan, just check the news in TOS, and buy it once it has the small pullback at 7:31.
Brilliant- I cant wait to try it out. I have the columns loaded- I cannot get the settings on the scan. I have the custom study filter open, have added a condition, I chose "close" in the price drop down on the left and then in the center chose "is greater than" I cannot find a way to choose 10% for the right side of the condition wizard... Can you please help?
Which “custom study” do you use?!@bss05
You could have bought FRAN at less than $4.50 this morning. If you track your premarket scanner on TOS, it spiked at 7:30 when the news came out. You just wait for the pullback and then buy it. Then just hold it as long as it stays above VWAP and you can make 100% return in premarket.
Here is what I use for Premarket Scan:
Last: 0.2 to 15
Volume: 5000 to No Max
Custom Study Filter: After Hours Change, the close is greater then 10% (under Price Performance); check the Ext box and select 1m on the right.
As soon as you see FRAN pop up in the scan, just check the news in TOS, and buy it once it has the small pullback at 7:31.
I thought that meant add a filter in scan called "study" prom the dropdown in scanning. then dropdown to the bottom of the study choices to the one at the bottom that is called custom. and from there you get to the thinkscript editor or the condition wizard which I described in detail what I am doing there- but I canot get it to load...Which “custom study” do you use?!
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.