My Custom Watchlist and Gap Scans For ThinkOrSwim

UpTwoBucks

EDUCATOR
My Custom Watchlist and Gap Scans.


There are many codes below. Make sure to only copy the one mentioned in the video.

IMPORTANT NOTE: I made an error in the 1 minute, 5 minute and the 15 minute chart. In the video I say to use the same code for each one. This is not correct. Each one has it's own code. I have pasted them below.

%VSpike Code Below:


###Begin Code###

# Set the percentage threshold for the spike
def spike_percentage_threshold = 0.0;

# Calculate the relative volume for the current bar
def rel_vol = volume / Average(volume, 50);

# Calculate the percentage change in volume relative to the average volume
def vol_change_pct = (rel_vol - 1.0) * 100.0;

# Determine if the current bar has a volume spike
def is_spike = vol_change_pct >= spike_percentage_threshold;

# Define the label value as the percentage change in volume if it is a spike, otherwise NaN
def label_value = if is_spike then vol_change_pct else Double.NaN;

# Determine if the current bar is bullish or bearish based on the close price
def is_bullish = close > open;
def is_bearish = close < open;

# Add the label to the watch list
AddLabel(yes,
if is_spike and is_bullish then Concat(AsPercent(vol_change_pct / 10000.0), " - Bullish")
else if is_spike and is_bearish then Concat(AsPercent(vol_change_pct / 10000.0), " - Bearish")
else "",
if is_spike and is_bullish then Color.GREEN
else if is_spike and is_bearish then Color.LIGHT_RED
else Color.BLACK);


###End Code###

Gap and Run Code Below:

###Begin Code####

def price = close;

plot GapandRun = if (open - close[1])>0 and close > open then 100*(close/high) else 0;

###End Code###

1 Minute Chart Below:

###Begin Code###

input length = 14;
input ADXLevels = 20;
input averageType = AverageType.WILDERS;

def MinPlus;
def MinMinus;
def MinAdx;

def MinBullishSignal;
def MinBearishSignal;


def MinBullishZone;
def MinBearishZone;
def MinNeutralZone;

def MinHiDiff;
def MinLoDiff;
def MinPlusDM;
def MinMinusDM;
def MinDX;
if GetAggregationPeriod() <= AggregationPeriod.Min{

MinHiDiff = high(period = "1 Min") - high(period = "1 Min")[1];
MinLoDiff = low(period = "1 Min")[1] - low(period = "1 Min");
MinPlusDM = if MinHiDiff > MinLoDiff and MinHiDiff > 0 then MinHiDiff else 0;
MinMinusDM = if MinLoDiff > MinHiDiff and MinLoDiff > 0 then MinLoDiff else 0;
MinPlus = 100 * MovingAverage(averageType, MinPlusDM, length);
MinMinus = 100 * MovingAverage(averageType, MinMinusDM, length);
MinBullishSignal = MinPlus crosses above MinMinus;
MinBearishSignal = MinPlus crosses below MinMinus;

MinDX = if (MinPlus + MinMinus > 0) then 100 * AbsValue(MinPlus - MinMinus) / (MinPlus + MinMinus) else 0;
MinAdx = MovingAverage(averageType, MinDX, length);

MinBullishZone = MinPlus > MinMinus and MinADX >= ADXLevels;
MinBearishZone = MinPlus < MinMinus and MinADX >= ADXLevels;
MinNeutralZone = !MinBullishZone and !MinBearishZone;

}
else {
MinPlus = 0;
MinMinus = 0;
MinAdx = 0;
MinPlusDM = 0;
MinMinusDM = 0;
MinBullishSignal = 0;
MinBearishSignal = 0;
MinDX = 0;

MinBullishZone = 0;
MinBearishZone = 0;
MinNeutralZone = 0;

MinHiDiff = 0;
MinLoDiff = 0;

}


AddLabel(MinBullishZone, "1m", color.green); AddLabel(MinBearishZone, "1m", color.red); AddLabel(MinNeutralZone, "1m", color.yellow);

###End Code###

5 Minute Chart

###Begin Code###

input length = 14;
input ADXLevels = 20;
input averageType = AverageType.WILDERS;

def fiveMinPlus;
def fiveMinMinus;
def fiveMinAdx;

def fiveMinBullishSignal;
def fiveMinBearishSignal;


def fiveMinBullishZone;
def fiveMinBearishZone;
def fiveMinNeutralZone;

def fiveMinHiDiff;
def fiveMinLoDiff;
def fiveMinPlusDM;
def fiveMinMinusDM;
def fiveMinDX;
if GetAggregationPeriod() <= AggregationPeriod.FIVE_MIN {

fiveMinHiDiff = high(period = "5 Min") - high(period = "5 Min")[1];
fiveMinLoDiff = low(period = "5 Min")[1] - low(period = "5 Min");
fiveMinPlusDM = if fiveMinHiDiff > fiveMinLoDiff and fiveMinHiDiff > 0 then fiveMinHiDiff else 0;
fiveMinMinusDM = if fiveMinLoDiff > fiveMinHiDiff and fiveMinLoDiff > 0 then fiveMinLoDiff else 0;
fiveMinPlus = 100 * MovingAverage(averageType, fiveMinPlusDM, length);
fiveMinMinus = 100 * MovingAverage(averageType, fiveMinMinusDM, length);
fiveMinBullishSignal = fiveMinPlus crosses above fiveMinMinus;
fiveMinBearishSignal = fiveMinPlus crosses below fiveMinMinus;

fiveMinDX = if (fiveMinPlus + fiveMinMinus > 0) then 100 * AbsValue(fiveMinPlus - fiveMinMinus) / (fiveMinPlus + fiveMinMinus) else 0;
fiveMinAdx = MovingAverage(averageType, fiveMinDX, length);

fiveMinBullishZone = fiveMinPlus > fiveMinMinus and fiveMinAdx >= ADXLevels;
fiveMinBearishZone = fiveMinPlus < fiveMinMinus and fiveMinAdx >= ADXLevels;
fiveMinNeutralZone = !fiveMinBullishZone and !fiveMinBearishZone;

}
else {
fiveMinPlus = 0;
fiveMinMinus = 0;
fiveMinAdx = 0;
fiveMinPlusDM = 0;
fiveMinMinusDM = 0;
fiveMinBullishSignal = 0;
fiveMinBearishSignal = 0;
fiveMinDX = 0;

fiveMinBullishZone = 0;
fiveMinBearishZone = 0;
fiveMinNeutralZone = 0;

fiveMinHiDiff = 0;
fiveMinLoDiff = 0;

}
AddLabel(fiveMinBullishZone, "5m", Color.GREEN);
AddLabel(fiveMinBearishZone, "5m", Color.RED);
AddLabel(fiveMinNeutralZone, "5m", Color.YELLOW);

###End Code###

15 Minute Chart

###Begin Code###

input length = 14;
input ADXLevels = 20;
input averageType = AverageType.WILDERS;



def fifteenMinPlus;
def fifteenMinMinus;
def fifteenMinAdx;

def fifteenMinBullishSignal;
def fifteenMinBearishSignal;


def fifteenMinBullishZone;
def fifteenMinBearishZone;
def fifteenMinNeutralZone;

def fifteenMinHiDiff;
def fifteenMinLoDiff;
def fifteenMinPlusDM;
def fifteenMinMinusDM;
def fifteenMinDX;
if GetAggregationPeriod() <= AggregationPeriod.fifteen_Min{

fifteenMinHiDiff = high(period = "15 Min") - high(period = "15 Min")[1];
fifteenMinLoDiff = low(period = "15 Min")[1] - low(period = "15 Min");
fifteenMinPlusDM = if fifteenMinHiDiff > fifteenMinLoDiff and fifteenMinHiDiff > 0 then fifteenMinHiDiff else 0;
fifteenMinMinusDM = if fifteenMinLoDiff > fifteenMinHiDiff and fifteenMinLoDiff > 0 then fifteenMinLoDiff else 0;
fifteenMinPlus = 100 * MovingAverage(averageType, fifteenMinPlusDM, length);
fifteenMinMinus = 100 * MovingAverage(averageType, fifteenMinMinusDM, length);
fifteenMinBullishSignal = fifteenMinPlus crosses above fifteenMinMinus;
fifteenMinBearishSignal = fifteenMinPlus crosses below fifteenMinMinus;

fifteenMinDX = if (fifteenMinPlus + fifteenMinMinus > 0) then 100 * AbsValue(fifteenMinPlus - fifteenMinMinus) / (fifteenMinPlus + fifteenMinMinus) else 0;
fifteenMinAdx = MovingAverage(averageType, fifteenMinDX, length);

fifteenMinBullishZone = fifteenMinPlus > fifteenMinMinus and fifteenMinADX >= ADXLevels;
fifteenMinBearishZone = fifteenMinPlus < fifteenMinMinus and fifteenMinADX >= ADXLevels;
fifteenMinNeutralZone = !fifteenMinBullishZone and !fifteenMinBearishZone;

}
else {
fifteenMinPlus = 0;
fifteenMinMinus = 0;
fifteenMinAdx = 0;
fifteenMinPlusDM = 0;
fifteenMinMinusDM = 0;
fifteenMinBullishSignal = 0;
fifteenMinBearishSignal = 0;
fifteenMinDX = 0;

fifteenMinBullishZone = 0;
fifteenMinBearishZone = 0;
fifteenMinNeutralZone = 0;

fifteenMinHiDiff = 0;
fifteenMinLoDiff = 0;

}


AddLabel(fifteenMinBullishZone, "15m", color.green); AddLabel(fifteenMinBearishZone, "15m", color.red); AddLabel(fifteenMinNeutralZone, "15m", color.yellow);

###End Code###

Relative Volume Code Below:
###Begin Code###

def rVol = volume / Average(volume, 50)[1];
AddLabel(yes, round(rVol,2));

###End Code###

Gap and Run Scan (Shared Link): https://tos.mx/m31lIxC

Gap and Run Watchlist (Shared Link): https://tos.mx/ltsXYEK

My Desktop: http://tos.mx/5fykLmv
 
Last edited:
@UpTwoBucks Thank you for sharing.
As always, looking forward to more videos.
Perhaps, if this would not be so much trouble,
It would be very helpful if you could re-organize your teachings into a new trader-scalper tutorial?
I am sure there is more than tools that will make trader profitable.
Thanks again!
 
@UpTwoBucks Thank you for sharing.
As always, looking forward to more videos.
Perhaps, if this would not be so much trouble,
It would be very helpful if you could re-organize your teachings into a new trader-scalper tutorial?
I am sure there is more than tools that will make trader profitable.
Thanks again!
Understood. I plan on doing some live trading videos in the near future using these tools and how my brain is working during a trade. I have a few more tools to get out before that happens. Thanks for following my vids..
 
i liked and subscribed as well. hope you keep on posting stuff. very helpful lubrication for my ancient brain, trying to sort things out per your thinking.
 
Yes trade live many scalpers find how to trade with your video..I already subscribed your chennal and I downloaded your indicator and try to learn how to trade..but your more video help us..
Thank you
Happy trading sir
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
379 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

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.

How do I get started?

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.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top