Best % Gap Long/Short Plays (Works Pre-Market) for ThinkorSwim

Townsend

Townsend

Active member
VIP
The first hour or two of every trading day is the BEST time for day-traders. ThinkOrSwim has MANY Public Watchlists.
I use the one listed under Lovers and Losers, Pre-Market Movers, for all the upcoming gap Up/Down plays.
It's a big list, so it's hard to know ahead of time which ones will be best. So... I created this simple Watchlist indicator.

This little bit of code will tell you the best gaps: Long/Short plays BEFORE the market opens.
Code:
plot pop = Round("number" = ((ask + bid) / 2 -close[1]) / close[1] * 100, "numberOfDigits" = 1);
pop.assignvalueColor(if pop >0 then color.green else color.red);
Just paste this into the thinkSscript Editor of any available Custom Quote Column.
Set the time period to D for Daily. It's based on an average of bid and asked.
So... It's never exact, but always close to the usual %Change column, as you cans see.

It works great to find the best pre-market % gaps. (But not for post-market % changes.)
Note: the %Change column listed below is for illustration purposes only.
Once you have this Pop% indicator set up correctly %Change is no longer needed.
Also, for what it's worth I usually stick to the high volume movers.

PS: The Ask X column includes a code letter, telling me which exchange the stock is traded on.
I only trade commission free US equities and ETFs. Here's the list of Exchange Codes.
 
Last edited by a moderator:
G

GimmickFace

New member
I'm getting the following errors after pasting the code....any idea what I might be doing wrong?

No such variable: ask at 1:31
No such variable: bid at 1:37
No such variable: ask at 1:31
No such variable: bid at 1:37
 
N

nickivan63

New member
Thank you for sharing the script but still not working on my side.. the 2 blank line didn't resolved the error. Any other advice? Is this Study then using as watchlist, right?

 
T

tomsk

Well-known member
VIP
The code that was posted in post#1 does work in a watchlist. I just tested it in my watchlist and it does populate
If you are attempting to use that in a chart study, that won't work. You will see the error as reported in post #2.
 
W

whats up

New member
VIP
The first hour or two of every trading day is the BEST time for day-traders. ThinkOrSwim has MANY Public Watchlists.
I use the one listed under Lovers and Losers, Pre-Market Movers, for all the upcoming gap Up/Down plays.
It's a big list, so it's hard to know ahead of time which ones will be best. So... I created this simple Watchlist indicator.

This little bit of code will tell you the best gaps: Long/Short plays BEFORE the market opens.
Code:
plot pop = Round("number" = ((ask + bid) / 2 -close[1]) / close[1] * 100, "numberOfDigits" = 1);
pop.assignvalueColor(if pop >0 then color.green else color.red);
Just paste this into the thinkSscript Editor of any available Custom Quote Column.
Set the time period to D for Daily. It's based on an average of bid and asked.
So... It's never exact, but always close to the usual %Change column, as you cans see.

It works great to find the best pre-market % gaps. (But not for post-market % changes.)
Note: the %Change column listed below is for illustration purposes only.
Once you have this Pop% indicator set up correctly %Change is no longer needed.
Also, for what it's worth I usually stick to the high volume movers.

PS: The Ask X column includes a code letter, telling me which exchange the stock is traded on.
I only trade commission free US equities and ETFs. Here's the list of Exchange Codes.
townsend i tryied this morning but nothing showed maybe it because i put it on papertrades?
 
Townsend

Townsend

Active member
VIP
Ah yes, there we go. Thank you!
The code that was posted in post#1 does work in a watchlist. I just tested it in my watchlist and it does populate.
It is possible that the code does not work in paper trade mode. Actually you should NOT be using the paper trade mode at all. I've tried it a few times. Problems is: fills are always horrible. Not in the usual sense. Always way better than they would be in real trading. Makes trading for a profit VERY easy. Not realistic at all. If you want to paper trade with realistic fills use TradingView. It's free. Of course, you can still use TOS for charts, which are best. That's what I do.

PS: I'm not going to be making a video. If you're having a problem it's not the code. It probably has something to do with your inexperience creating Custom Quote Columns. If this is the case go over to youTube and do a search for "thinkOrSwim custom quote column". You'll find tutorial videos there.
 
Last edited:
W

whats up

New member
VIP
It is possible that the code does not work in paper trade mode. Actually you should NOT be using the paper trade mode at all. I've tried it a few times. Problems is: fills are always horrible. Not in the usual sense. Always way better than they would be in real trading. Makes trading for a profit VERY easy. Not realistic at all. If you want to paper trade with realistic fills use TradingView. It's free. Of course, you can still use TOS for charts, which are best. That's what I do.

PS: I'm not going to be making a video. If you're having a problem it's not the code. It probably has something to do with your inexperience creating Custom Quote Columns. If this is the case go over to youTube and do a search for "thinkOrSwim custom quote column". You'll find tutorial videos there.
i will give it a try on real account today thanks
 
J

jwichman.stocks

New member
VIP
The first hour or two of every trading day is the BEST time for day-traders. ThinkOrSwim has MANY Public Watchlists.
I use the one listed under Lovers and Losers, Pre-Market Movers, for all the upcoming gap Up/Down plays.
It's a big list, so it's hard to know ahead of time which ones will be best. So... I created this simple Watchlist indicator.

This little bit of code will tell you the best gaps: Long/Short plays BEFORE the market opens.
Code:
plot pop = Round("number" = ((ask + bid) / 2 -close[1]) / close[1] * 100, "numberOfDigits" = 1);
pop.assignvalueColor(if pop >0 then color.green else color.red);
Just paste this into the thinkSscript Editor of any available Custom Quote Column.
Set the time period to D for Daily. It's based on an average of bid and asked.
So... It's never exact, but always close to the usual %Change column, as you cans see.

It works great to find the best pre-market % gaps. (But not for post-market % changes.)
Note: the %Change column listed below is for illustration purposes only.
Once you have this Pop% indicator set up correctly %Change is no longer needed.
Also, for what it's worth I usually stick to the high volume movers.

PS: The Ask X column includes a code letter, telling me which exchange the stock is traded on.
I only trade commission free US equities and ETFs. Here's the list of Exchange Codes.
Hi Townsend... i have scoured (or i like to think i have) TOS for how you built that custom Ask with the Exchange code but cannot find anything. Mind sharing that piece of code? I too want to follow the commission free and ETFs. Thanks
 
M

mw3541

New member
I am getting a similar error whats the fix any one @Townsend please clarify how to fix it?
 
T

twelvester

New member
Coolio!! I studied the image and was wondering why the Pop% was required when there is the % Change.. And then i loaded it to ToS and saw that Pop% works in pre-market, while the %change stays at 0. Nice one @Townsend
 
Townsend

Townsend

Active member
VIP
Coolio!! I studied the image and was wondering why the Pop% was required when there is the % Change.. And then i loaded it to ToS and saw that Pop% works in pre-market, while the %change stays at 0. Nice one @Townsend
I use the Pop% code posted at the top of this thread almost every day. Works fine for me... and also @twelvester. It shows the percent gap, up or down BEFORE the market opens. And.. once the market opens, the values are identical the the built in %change column. That's how you know it is working correctly.
 
Q

QUIKTDR1

New member
I am trying to copy this "scan" but keep getting error in
No such variable: ask at 1:31
No such variable: bid at 1:37
No such variable: ask at 1:31
No such variable: bid at 1:37

plot pop = Round("number" = ((ask + bid) / 2 -close[1]) / close[1] * 100, "numberOfDigits" = 1);
pop.assignvalueColor(if pop >0 then color.green else color.red);
Just paste this into the thinkSscript Editor of any available Custom Quote Column.
Set the time period to D for Daily. It's based on an average of bid and asked.
So... It's never exact, but always close to the usual %Change column, as you cans see.

I am having trouble with word "plot"
 
M

mw3541

New member
@Townsend Can you please repost a full clean code withe the corrections mentioned above.Many thanks.
 
Q

QUIKTDR1

New member
plot pop = Round("number" = ((ask N+ bid) / 2 -close[1]) / close[1] * 100, "numberOfDigits" = 1);
pop.assignvalueColor(if pop >0 then color.green else color.red);
 
Q

QUIKTDR1

New member
Yes that's my problem. Any resolution to Invalid Statement: Plot at 1;1
 
Top