3 Trigger Pillar System For ThinkOrSwim

justAnotherTrader

Well-known member
VIP
VIP Enthusiast

šŸ“ˆ Simple Buy Signal Script: "Reasonable Entry Finder"

J1l4bCs.png


Access to Chart: https://tos.mx/!hF5KBQ6z MUST follow these instructions for loading shared links.

Hey traders,
I’m sharing a straightforward script designed to help identify reasonable buy-in points based on three simple pillars:
  • āœ… Reasonable Strength – RSI not oversold, but showing some recovery potential
  • āœ… Reasonable Price – Price below Bollinger Band basis (but not in panic zone)
  • āœ… Reasonable Interest – Elevated relative volume to confirm trader participation
It’s not meant to be flashy or overloaded—just clean signals that help you keep your edge without noise.

🧠 Logic Behind the Setup
Buy Signal triggers when:
  • RSI < 40 (suggesting we’ve pulled back to a healthy zone)
  • Price is under the Bollinger Band basis (a technical discount)
  • Relative volume > 1.5x the average (indicating unusual interest)

Sell Signal (optional) fires when RSI > 60, price is extended above basis, and volume is also elevated.

šŸ·ļø Labels for Quick Visuals
  • RSI value + slope to catch subtle directional shifts
  • Bollinger Band zone (Buy/Sell/Neutral)
  • Relative volume label (Confirms/Neutral/Weak)
  • ā€œBuy Setup Confirmedā€ label when everything lines up

šŸ”½ Chart Display
  • Cyan up arrows = Confirmed buy setups
  • Magenta down arrows = Optional sell zones (if you want to test reversals or trim)

CASE STUDY:
The stock pictured is EVRG, they are a utility company and had two things hurt it recently which caused it to back off its uptrend. 1) They had some one times on their earnings report that reduced net income. Some of that was Higher Depreciation and Amortization because EVRG is investing heavily right now in infrastructure. Notable that this is not a cash reduction and a tax benefit. They also had reduced demand because of a rough winter. 2) The market overloaded Utilities as safe havens recently with the economic headwinds, so its natural that we are starting to see a bit of retrace due to sector rotation now that fears have subsided "some". Based off this I suggest EVRG is a good buy the dip company, but not yet. If you notice the chart below, you'll see the oval I put on the chart at current price levels. This means the stock is currently in a buy zone, also indicated by the label that is lit up green in the top left. It still has a weak RSI and volume is still low, once all 3 of this are working together then I would consider it a buy for a short term swing and possible long term defensive stock with a 5% dividend.

Code:
# === Inputs ===
input rsiLength = 14;
input rsiOverbought = 60;
input rsiOversold = 40;

input bbLength = 20;
input bbMult = 2.0;

input volLength = 20;
input relVolHigh = 1.5;
input relVolLow = 0.8;

input showLabels = yes;
input showArrows = yes;

# === RSI ===
def rsi = RSI(length = rsiLength);

# === Bollinger Bands ===
def basis = Average(close, bbLength);
def dev = bbMult * stdev(close, bbLength);
def upperBB = basis + dev;
def lowerBB = basis - dev;

# === Volume ===
def avgVol = Average(volume, volLength);
def relVol = if avgVol != 0 then volume / avgVol else 0;

# === Buy Condition ===
def buySignal = rsi < rsiOversold and high < basis and relVol > relVolHigh;

# === Sell Condition (Optional) ===
def sellSignal = rsi > rsiOverbought and low > basis and relVol > relVolHigh;

# === Label 1: RSI ===
def rsiSlope = rsi - rsi[1];
AddLabel(showLabels,
    "RSI: (" + Round(rsi, 1) + ", Slope: " +Round(rsiSlope, 1) +")",
    if rsi < rsiOversold then Color.GREEN
    else if rsi > rsiOverbought then Color.RED
    else Color.GRAY
);

# === Label 2: Bollinger Band Position ===
AddLabel(showLabels,
    if high < basis then "BB Buy Zone"
    else if low > basis then "BB Sell Zone"
    else "Price in Range",
    if high < basis then Color.GREEN
    else if low > basis then Color.RED
    else Color.GRAY
);

# === Label 3: Relative Volume ===
AddLabel(showLabels,
    if relVol > relVolHigh then "Volume Confirms"
    else if relVol < relVolLow then "Volume Weak – Wait"
    else "Neutral Volume",
    if relVol > relVolHigh then Color.GREEN
    else if relVol < relVolLow then Color.ORANGE
    else Color.GRAY
);

# === Label 4: Confluence ===
AddLabel(showLabels,
    if buySignal then "Buy Setup Confirmed"
    else "No Setup",
    if buySignal then Color.CYAN else Color.DARK_GRAY
);

# === Arrows ===
plot buyArrow = showArrows and buySignal;
buyArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
buyArrow.SetDefaultColor(Color.CYAN);
buyArrow.SetLineWeight(3);

plot sellArrow = showArrows and sellSignal;
sellArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
sellArrow.SetDefaultColor(Color.MAGENTA);
sellArrow.SetLineWeight(3);

Tips:
1)It helps to have bollinger bands on and RSI so you see whats going on. I also like the CMF as well
2) As with any indicator or system it requires a little common sense and not just pulling the trigger. This is a classical strategy, nothing ground breaking on it. IT just helps you not chase good opportunities
 
Last edited by a moderator:
To setup 3 Trigger Pillar Watchlist Column
1. Shared Watchlist Link: http://tos.mx/!ZN5Jdl38 MUST follow these instructions for loading shared links.

2. click on the gear to the right of your watchlist column titles
In the drop down box, type in the name you gave the imported script
Click add, Click ok,
HAl6Edl.png



To setup a 3 Trigger Pillar Scan
1. copy and paste the script at the bottom of this post into your study tab.
2. the scan filter is:
buySignal is true
or
sellSignal is true
3. Here is a tutorial for adding the scan filter to the scanner:
https://usethinkscript.com/threads/how-to-use-thinkorswim-stock-hacker-scans.284/
hvhkQwC.png


Ruby:
# === Inputs ===
input rsiLength = 14;
input rsiOverbought = 60;
input rsiOversold = 40;

input bbLength = 20;
input bbMult = 2.0;

input volLength = 20;
input relVolHigh = 1.5;

# === RSI ===
def rsi = RSI(length = rsiLength);
def rsiSlopeUp = rsi > rsi[1];

# === Bollinger Bands ===
def basis = Average(close, bbLength);
def dev = bbMult * stdev(close, bbLength);
def upperBB = basis + dev;
def lowerBB = basis - dev;

# === Volume ===
def avgVol = Average(volume, volLength);
def relVol = if avgVol != 0 then volume / avgVol else 0;

# === Buy Condition (with RSI slope up) ===
plot buySignal =
    rsi < rsiOversold and
    high < basis and
    relVol > relVolHigh and
    rsiSlopeUp;

# === Sell Condition ===
plot sellSignal =
    rsi > rsiOverbought and
    low > basis and
    relVol > relVolHigh;
 
Last edited:

šŸ“ˆ Simple Buy Signal Script: "Reasonable Entry Finder"

J1l4bCs.png


Access to Chart: Chart Setup

Hey traders,
I’m sharing a straightforward script designed to help identify reasonable buy-in points based on three simple pillars:
  • āœ… Reasonable Strength – RSI not oversold, but showing some recovery potential
  • āœ… Reasonable Price – Price below Bollinger Band basis (but not in panic zone)
  • āœ… Reasonable Interest – Elevated relative volume to confirm trader participation
It’s not meant to be flashy or overloaded—just clean signals that help you keep your edge without noise.

🧠 Logic Behind the Setup
Buy Signal triggers when:
  • RSI < 40 (suggesting we’ve pulled back to a healthy zone)
  • Price is under the Bollinger Band basis (a technical discount)
  • Relative volume > 1.5x the average (indicating unusual interest)

Sell Signal (optional) fires when RSI > 60, price is extended above basis, and volume is also elevated.

šŸ·ļø Labels for Quick Visuals
  • RSI value + slope to catch subtle directional shifts
  • Bollinger Band zone (Buy/Sell/Neutral)
  • Relative volume label (Confirms/Neutral/Weak)
  • ā€œBuy Setup Confirmedā€ label when everything lines up

šŸ”½ Chart Display
  • Cyan up arrows = Confirmed buy setups
  • Magenta down arrows = Optional sell zones (if you want to test reversals or trim)

CASE STUDY:
The stock pictured is EVRG, they are a utility company and had two things hurt it recently which caused it to back off its uptrend. 1) They had some one times on their earnings report that reduced net income. Some of that was Higher Depreciation and Amortization because EVRG is investing heavily right now in infrastructure. Notable that this is not a cash reduction and a tax benefit. They also had reduced demand because of a rough winter. 2) The market overloaded Utilities as safe havens recently with the economic headwinds, so its natural that we are starting to see a bit of retrace due to sector rotation now that fears have subsided "some". Based off this I suggest EVRG is a good buy the dip company, but not yet. If you notice the chart below, you'll see the oval I put on the chart at current price levels. This means the stock is currently in a buy zone, also indicated by the label that is lit up green in the top left. It still has a weak RSI and volume is still low, once all 3 of this are working together then I would consider it a buy for a short term swing and possible long term defensive stock with a 5% dividend.

Code:
# === Inputs ===
input rsiLength = 14;
input rsiOverbought = 60;
input rsiOversold = 40;

input bbLength = 20;
input bbMult = 2.0;

input volLength = 20;
input relVolHigh = 1.5;
input relVolLow = 0.8;

input showLabels = yes;
input showArrows = yes;

# === RSI ===
def rsi = RSI(length = rsiLength);

# === Bollinger Bands ===
def basis = Average(close, bbLength);
def dev = bbMult * stdev(close, bbLength);
def upperBB = basis + dev;
def lowerBB = basis - dev;

# === Volume ===
def avgVol = Average(volume, volLength);
def relVol = if avgVol != 0 then volume / avgVol else 0;

# === Buy Condition ===
def buySignal = rsi < rsiOversold and high < basis and relVol > relVolHigh;

# === Sell Condition (Optional) ===
def sellSignal = rsi > rsiOverbought and low > basis and relVol > relVolHigh;

# === Label 1: RSI ===
def rsiSlope = rsi - rsi[1];
AddLabel(showLabels,
    "RSI: (" + Round(rsi, 1) + ", Slope: " +Round(rsiSlope, 1) +")",
    if rsi < rsiOversold then Color.GREEN
    else if rsi > rsiOverbought then Color.RED
    else Color.GRAY
);

# === Label 2: Bollinger Band Position ===
AddLabel(showLabels,
    if high < basis then "BB Buy Zone"
    else if low > basis then "BB Sell Zone"
    else "Price in Range",
    if high < basis then Color.GREEN
    else if low > basis then Color.RED
    else Color.GRAY
);

# === Label 3: Relative Volume ===
AddLabel(showLabels,
    if relVol > relVolHigh then "Volume Confirms"
    else if relVol < relVolLow then "Volume Weak – Wait"
    else "Neutral Volume",
    if relVol > relVolHigh then Color.GREEN
    else if relVol < relVolLow then Color.ORANGE
    else Color.GRAY
);

# === Label 4: Confluence ===
AddLabel(showLabels,
    if buySignal then "Buy Setup Confirmed"
    else "No Setup",
    if buySignal then Color.CYAN else Color.DARK_GRAY
);
How do I set up the middle chart on volume? 
[QUOTE="justAnotherTrader, post: 153143, member: 2604"]

[TABLE]
[TR]
[TD][CENTER]
šŸ“ˆ Simple Buy Signal Script: "Reasonable Entry Finder"[/CENTER][/TD]
[/TR]
[/TABLE]

[IMG]https://i.imgur.com/J1l4bCs.png[/IMG]

Access to Chart: Chart Setup

Hey traders,
I’m sharing a straightforward script designed to help identify reasonable buy-in points based on three simple pillars:
[LIST]
[*]āœ… Reasonable Strength – RSI not oversold, but showing some recovery potential
[*]āœ… Reasonable Price – Price below Bollinger Band basis (but not in panic zone)
[*]āœ… Reasonable Interest – Elevated relative volume to confirm trader participation
[/LIST]
It’s not meant to be flashy or overloaded—just clean signals that help you keep your edge without noise.

🧠 Logic Behind the Setup
Buy Signal triggers when:
[LIST]
[*]RSI < 40 (suggesting we’ve pulled back to a healthy zone)
[*]Price is under the Bollinger Band basis (a technical discount)
[*]Relative volume > 1.5x the average (indicating unusual interest)
[/LIST]

Sell Signal (optional) fires when RSI > 60, price is extended above basis, and volume is also elevated.

šŸ·ļø Labels for Quick Visuals
[LIST]
[*]RSI value + slope to catch subtle directional shifts
[*]Bollinger Band zone (Buy/Sell/Neutral)
[*]Relative volume label (Confirms/Neutral/Weak)
[*]ā€œBuy Setup Confirmedā€ label when everything lines up
[/LIST]

šŸ”½ Chart Display
[LIST]
[*]Cyan up arrows = Confirmed buy setups
[*]Magenta down arrows = Optional sell zones (if you want to test reversals or trim)
[/LIST]

CASE STUDY:
   The stock pictured is EVRG, they are a utility company and had two things hurt it recently which caused it to back off its uptrend. 1) They had some one times on their earnings report that reduced net income. Some of that was Higher Depreciation and Amortization because EVRG is investing heavily right now in infrastructure. Notable that this is not a cash reduction and a tax benefit. They also had reduced demand because of a rough winter. 2) The market overloaded Utilities as safe havens recently with the economic headwinds, so its natural that we are starting to see a bit of retrace due to sector rotation now that fears have subsided "some". Based off this I suggest EVRG is a good buy the dip company, but not yet. If you notice the chart below, you'll see the oval I put on the chart at current price levels. This means the stock is currently in a buy zone, also indicated by the label that is lit up green in the top left. It still has a weak RSI and volume is still low, once all 3 of this are working together then I would consider it a buy for a short term swing and possible long term defensive stock with a 5% dividend.

[code]
# === Inputs ===
input rsiLength = 14;
input rsiOverbought = 60;
input rsiOversold = 40;

input bbLength = 20;
input bbMult = 2.0;

input volLength = 20;
input relVolHigh = 1.5;
input relVolLow = 0.8;

input showLabels = yes;
input showArrows = yes;

# === RSI ===
def rsi = RSI(length = rsiLength);

# === Bollinger Bands ===
def basis = Average(close, bbLength);
def dev = bbMult * stdev(close, bbLength);
def upperBB = basis + dev;
def lowerBB = basis - dev;

# === Volume ===
def avgVol = Average(volume, volLength);
def relVol = if avgVol != 0 then volume / avgVol else 0;

# === Buy Condition ===
def buySignal = rsi < rsiOversold and high < basis and relVol > relVolHigh;

# === Sell Condition (Optional) ===
def sellSignal = rsi > rsiOverbought and low > basis and relVol > relVolHigh;

# === Label 1: RSI ===
def rsiSlope = rsi - rsi[1];
AddLabel(showLabels,
    "RSI: (" + Round(rsi, 1) + ", Slope: " +Round(rsiSlope, 1) +")",
    if rsi < rsiOversold then Color.GREEN
    else if rsi > rsiOverbought then Color.RED
    else Color.GRAY
);

# === Label 2: Bollinger Band Position ===
AddLabel(showLabels,
    if high < basis then "BB Buy Zone"
    else if low > basis then "BB Sell Zone"
    else "Price in Range",
    if high < basis then Color.GREEN
    else if low > basis then Color.RED
    else Color.GRAY
);

# === Label 3: Relative Volume ===
AddLabel(showLabels,
    if relVol > relVolHigh then "Volume Confirms"
    else if relVol < relVolLow then "Volume Weak – Wait"
    else "Neutral Volume",
    if relVol > relVolHigh then Color.GREEN
    else if relVol < relVolLow then Color.ORANGE
    else Color.GRAY
);

# === Label 4: Confluence ===
AddLabel(showLabels,
    if buySignal then "Buy Setup Confirmed"
    else "No Setup",
    if buySignal then Color.CYAN else Color.DARK_GRAY
);

# === Arrows ===
plot buyArrow = showArrows and buySignal;
buyArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
buyArrow.SetDefaultColor(Color.CYAN);
buyArrow.SetLineWeight(3);

plot sellArrow = showArrows and sellSignal;
sellArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
sellArrow.SetDefaultColor(Color.MAGENTA);
sellArrow.SetLineWeight(3);

Tips:
1)It helps to have bollinger bands on and RSI so you see whats going on. I also like the CMF as well
2) As with any indicator or system it requires a little common sense and not just pulling the trigger. This is a classical strategy, nothing ground breaking on it. IT just helps you not chase good opportunities
# === Arrows ===
plot buyArrow = showArrows and buySignal;
buyArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
buyArrow.SetDefaultColor(Color.CYAN);
buyArrow.SetLineWeight(3);

plot sellArrow = showArrows and sellSignal;
sellArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
sellArrow.SetDefaultColor(Color.MAGENTA);
sellArrow.SetLineWeight(3);

[/code]

Tips:
1)It helps to have bollinger bands on and RSI so you see whats going on. I also like the CMF as well
2) As with any indicator or system it requires a little common sense and not just pulling the trigger. This is a classical strategy, nothing ground breaking on it. IT just helps you not chase good opportunities
[/QUOTE]
 

šŸ“ˆ Simple Buy Signal Script: "Reasonable Entry Finder"

J1l4bCs.png


Access to Chart: Chart Setup

Hey traders,
I’m sharing a straightforward script designed to help identify reasonable buy-in points based on three simple pillars:
  • āœ… Reasonable Strength – RSI not oversold, but showing some recovery potential
  • āœ… Reasonable Price – Price below Bollinger Band basis (but not in panic zone)
  • āœ… Reasonable Interest – Elevated relative volume to confirm trader participation
It’s not meant to be flashy or overloaded—just clean signals that help you keep your edge without noise.

🧠 Logic Behind the Setup
Buy Signal triggers when:
  • RSI < 40 (suggesting we’ve pulled back to a healthy zone)
  • Price is under the Bollinger Band basis (a technical discount)
  • Relative volume > 1.5x the average (indicating unusual interest)

Sell Signal (optional) fires when RSI > 60, price is extended above basis, and volume is also elevated.

šŸ·ļø Labels for Quick Visuals
  • RSI value + slope to catch subtle directional shifts
  • Bollinger Band zone (Buy/Sell/Neutral)
  • Relative volume label (Confirms/Neutral/Weak)
  • ā€œBuy Setup Confirmedā€ label when everything lines up

šŸ”½ Chart Display
  • Cyan up arrows = Confirmed buy setups
  • Magenta down arrows = Optional sell zones (if you want to test reversals or trim)

CASE STUDY:
The stock pictured is EVRG, they are a utility company and had two things hurt it recently which caused it to back off its uptrend. 1) They had some one times on their earnings report that reduced net income. Some of that was Higher Depreciation and Amortization because EVRG is investing heavily right now in infrastructure. Notable that this is not a cash reduction and a tax benefit. They also had reduced demand because of a rough winter. 2) The market overloaded Utilities as safe havens recently with the economic headwinds, so its natural that we are starting to see a bit of retrace due to sector rotation now that fears have subsided "some". Based off this I suggest EVRG is a good buy the dip company, but not yet. If you notice the chart below, you'll see the oval I put on the chart at current price levels. This means the stock is currently in a buy zone, also indicated by the label that is lit up green in the top left. It still has a weak RSI and volume is still low, once all 3 of this are working together then I would consider it a buy for a short term swing and possible long term defensive stock with a 5% dividend.

Code:
# === Inputs ===
input rsiLength = 14;
input rsiOverbought = 60;
input rsiOversold = 40;

input bbLength = 20;
input bbMult = 2.0;

input volLength = 20;
input relVolHigh = 1.5;
input relVolLow = 0.8;

input showLabels = yes;
input showArrows = yes;

# === RSI ===
def rsi = RSI(length = rsiLength);

# === Bollinger Bands ===
def basis = Average(close, bbLength);
def dev = bbMult * stdev(close, bbLength);
def upperBB = basis + dev;
def lowerBB = basis - dev;

# === Volume ===
def avgVol = Average(volume, volLength);
def relVol = if avgVol != 0 then volume / avgVol else 0;

# === Buy Condition ===
def buySignal = rsi < rsiOversold and high < basis and relVol > relVolHigh;

# === Sell Condition (Optional) ===
def sellSignal = rsi > rsiOverbought and low > basis and relVol > relVolHigh;

# === Label 1: RSI ===
def rsiSlope = rsi - rsi[1];
AddLabel(showLabels,
    "RSI: (" + Round(rsi, 1) + ", Slope: " +Round(rsiSlope, 1) +")",
    if rsi < rsiOversold then Color.GREEN
    else if rsi > rsiOverbought then Color.RED
    else Color.GRAY
);

# === Label 2: Bollinger Band Position ===
AddLabel(showLabels,
    if high < basis then "BB Buy Zone"
    else if low > basis then "BB Sell Zone"
    else "Price in Range",
    if high < basis then Color.GREEN
    else if low > basis then Color.RED
    else Color.GRAY
);

# === Label 3: Relative Volume ===
AddLabel(showLabels,
    if relVol > relVolHigh then "Volume Confirms"
    else if relVol < relVolLow then "Volume Weak – Wait"
    else "Neutral Volume",
    if relVol > relVolHigh then Color.GREEN
    else if relVol < relVolLow then Color.ORANGE
    else Color.GRAY
);

# === Label 4: Confluence ===
AddLabel(showLabels,
    if buySignal then "Buy Setup Confirmed"
    else "No Setup",
    if buySignal then Color.CYAN else Color.DARK_GRAY
);

# === Arrows ===
plot buyArrow = showArrows and buySignal;
buyArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
buyArrow.SetDefaultColor(Color.CYAN);
buyArrow.SetLineWeight(3);

plot sellArrow = showArrows and sellSignal;
sellArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
sellArrow.SetDefaultColor(Color.MAGENTA);
sellArrow.SetLineWeight(3);

Tips:
1)It helps to have bollinger bands on and RSI so you see whats going on. I also like the CMF as well
2) As with any indicator or system it requires a little common sense and not just pulling the trigger. This is a classical strategy, nothing ground breaking on it. IT just helps you not chase good opportunities
How do I set up the middle "Volume Chart" to get the whole picture? Thanks
 

šŸ“ˆ Simple Buy Signal Script: "Reasonable Entry Finder"

J1l4bCs.png


Access to Chart: Chart Setup

Hey traders,
I’m sharing a straightforward script designed to help identify reasonable buy-in points based on three simple pillars:
  • āœ… Reasonable Strength – RSI not oversold, but showing some recovery potential
  • āœ… Reasonable Price – Price below Bollinger Band basis (but not in panic zone)
  • āœ… Reasonable Interest – Elevated relative volume to confirm trader participation
It’s not meant to be flashy or overloaded—just clean signals that help you keep your edge without noise.

🧠 Logic Behind the Setup
Buy Signal triggers when:
  • RSI < 40 (suggesting we’ve pulled back to a healthy zone)
  • Price is under the Bollinger Band basis (a technical discount)
  • Relative volume > 1.5x the average (indicating unusual interest)

Sell Signal (optional) fires when RSI > 60, price is extended above basis, and volume is also elevated.

šŸ·ļø Labels for Quick Visuals
  • RSI value + slope to catch subtle directional shifts
  • Bollinger Band zone (Buy/Sell/Neutral)
  • Relative volume label (Confirms/Neutral/Weak)
  • ā€œBuy Setup Confirmedā€ label when everything lines up

šŸ”½ Chart Display
  • Cyan up arrows = Confirmed buy setups
  • Magenta down arrows = Optional sell zones (if you want to test reversals or trim)

CASE STUDY:
The stock pictured is EVRG, they are a utility company and had two things hurt it recently which caused it to back off its uptrend. 1) They had some one times on their earnings report that reduced net income. Some of that was Higher Depreciation and Amortization because EVRG is investing heavily right now in infrastructure. Notable that this is not a cash reduction and a tax benefit. They also had reduced demand because of a rough winter. 2) The market overloaded Utilities as safe havens recently with the economic headwinds, so its natural that we are starting to see a bit of retrace due to sector rotation now that fears have subsided "some". Based off this I suggest EVRG is a good buy the dip company, but not yet. If you notice the chart below, you'll see the oval I put on the chart at current price levels. This means the stock is currently in a buy zone, also indicated by the label that is lit up green in the top left. It still has a weak RSI and volume is still low, once all 3 of this are working together then I would consider it a buy for a short term swing and possible long term defensive stock with a 5% dividend.

Code:
# === Inputs ===
input rsiLength = 14;
input rsiOverbought = 60;
input rsiOversold = 40;

input bbLength = 20;
input bbMult = 2.0;

input volLength = 20;
input relVolHigh = 1.5;
input relVolLow = 0.8;

input showLabels = yes;
input showArrows = yes;

# === RSI ===
def rsi = RSI(length = rsiLength);

# === Bollinger Bands ===
def basis = Average(close, bbLength);
def dev = bbMult * stdev(close, bbLength);
def upperBB = basis + dev;
def lowerBB = basis - dev;

# === Volume ===
def avgVol = Average(volume, volLength);
def relVol = if avgVol != 0 then volume / avgVol else 0;

# === Buy Condition ===
def buySignal = rsi < rsiOversold and high < basis and relVol > relVolHigh;

# === Sell Condition (Optional) ===
def sellSignal = rsi > rsiOverbought and low > basis and relVol > relVolHigh;

# === Label 1: RSI ===
def rsiSlope = rsi - rsi[1];
AddLabel(showLabels,
    "RSI: (" + Round(rsi, 1) + ", Slope: " +Round(rsiSlope, 1) +")",
    if rsi < rsiOversold then Color.GREEN
    else if rsi > rsiOverbought then Color.RED
    else Color.GRAY
);

# === Label 2: Bollinger Band Position ===
AddLabel(showLabels,
    if high < basis then "BB Buy Zone"
    else if low > basis then "BB Sell Zone"
    else "Price in Range",
    if high < basis then Color.GREEN
    else if low > basis then Color.RED
    else Color.GRAY
);

# === Label 3: Relative Volume ===
AddLabel(showLabels,
    if relVol > relVolHigh then "Volume Confirms"
    else if relVol < relVolLow then "Volume Weak – Wait"
    else "Neutral Volume",
    if relVol > relVolHigh then Color.GREEN
    else if relVol < relVolLow then Color.ORANGE
    else Color.GRAY
);

# === Label 4: Confluence ===
AddLabel(showLabels,
    if buySignal then "Buy Setup Confirmed"
    else "No Setup",
    if buySignal then Color.CYAN else Color.DARK_GRAY
);

# === Arrows ===
plot buyArrow = showArrows and buySignal;
buyArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
buyArrow.SetDefaultColor(Color.CYAN);
buyArrow.SetLineWeight(3);

plot sellArrow = showArrows and sellSignal;
sellArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
sellArrow.SetDefaultColor(Color.MAGENTA);
sellArrow.SetLineWeight(3);

Tips:
1)It helps to have bollinger bands on and RSI so you see whats going on. I also like the CMF as well
2) As with any indicator or system it requires a little common sense and not just pulling the trigger. This is a classical strategy, nothing ground breaking on it. IT just helps you not chase good opportunities

Any recommendation on which timeframe to use this on? Also, is it possible to provide watchlist for this?
 
Last edited:
Any recommendation on which timeframe to use this on? Also, is it possible to provide watchlist for this?

Let me explain how I use it because the time frame depends on the trader you are.

Disclaimer: I am a fundamentals first trader --> I only trade stocks I believe in fundamentally and I like the story / sector / index. I also "mainly" swing or take long position trades. That means I want to not chase momentum (always hate the feeling of that) and buy when I think the stock is reasonably priced (note this is done with confluence of forward p/e and technically based off the type of the company (growth, mature etc).

I look at these 3 timeframes when swing trading (Weekly, Daily, Hourly).

- (Where I build the watchlist) On the weekly I look for a stock in obvious uptrend. Then I want RSI to be 40-45 and curling up and near support levels. This says, hey not overbought, and not bearish either.

-On the daily (really where I would put the watchlist column): I like my rsi to be a little lower than the weekly, say 25-35 and curling up. We also want our volume to confirm the action and be on the lower bb since this is kind of like a mean mean reversion play.
**Im also a fan of watching money flow (cmf or obv). I am working with those now actually to create another indicator that uses them both to spot possible retail vs institution

-On the hourly (Where I would use the indicator for my trigger): We want stocks that the rsi is definitely improving from a more oversold area (positive sloping RSI), volume confirms and lower end of the bb

Shared Watchlist Column: http://tos.mx/!ZN5Jdl38 MUST follow these instructions for loading shared links.
Code:
# === Inputs ===
input rsiLength = 14;
input rsiOverbought = 60;
input rsiOversold = 40;

input bbLength = 20;
input bbMult = 2.0;

input volLength = 20;
input relVolHigh = 1.5;

# === RSI ===
def rsi = RSI(length = rsiLength);
def rsiSlopeUp = rsi > rsi[1];

# === Bollinger Bands ===
def basis = Average(close, bbLength);
def dev = bbMult * stdev(close, bbLength);
def upperBB = basis + dev;
def lowerBB = basis - dev;

# === Volume ===
def avgVol = Average(volume, volLength);
def relVol = if avgVol != 0 then volume / avgVol else 0;

# === Buy Condition (with RSI slope up) ===
def buySignal =
    rsi < rsiOversold and
    high < basis and
    relVol > relVolHigh and
    rsiSlopeUp;

# === Sell Condition ===
def sellSignal =
    rsi > rsiOverbought and
    low > basis and
    relVol > relVolHigh;

# === Signal Code ===
def signal = if buySignal then 1 else if sellSignal then -1 else 0;



# === Background Color ===
AssignBackgroundColor(
    if signal == 1 then Color.GREEN
    else if signal == -1 then Color.RED
    else Color.GRAY
);

plot rsiVal = Round(rsi, 2);
 
Last edited by a moderator:
Thank you for sharing this chart set up. I am still trying to learn to be a better swing trader and I too are trading very specific stocks, don't like to trade gap up, I also don't buy on big green days. I was wondering if you have a scanner set up to help you narrow down which ticker meet the trigger alerts. Also I dont understand the "watchlist column" (I don't know how to code) is this something I would add to the left side of TOS on the watch list? How do I set that up? @justAnotherTrader Thank you in advance for your help.
 

šŸ“ˆ Simple Buy Signal Script: "Reasonable Entry Finder"

J1l4bCs.png


Access to Chart: Chart Setup

Hey traders,
I’m sharing a straightforward script designed to help identify reasonable buy-in points based on three simple pillars:
  • āœ… Reasonable Strength – RSI not oversold, but showing some recovery potential
  • āœ… Reasonable Price – Price below Bollinger Band basis (but not in panic zone)
  • āœ… Reasonable Interest – Elevated relative volume to confirm trader participation
It’s not meant to be flashy or overloaded—just clean signals that help you keep your edge without noise.

🧠 Logic Behind the Setup
Buy Signal triggers when:
  • RSI < 40 (suggesting we’ve pulled back to a healthy zone)
  • Price is under the Bollinger Band basis (a technical discount)
  • Relative volume > 1.5x the average (indicating unusual interest)

Sell Signal (optional) fires when RSI > 60, price is extended above basis, and volume is also elevated.

šŸ·ļø Labels for Quick Visuals
  • RSI value + slope to catch subtle directional shifts
  • Bollinger Band zone (Buy/Sell/Neutral)
  • Relative volume label (Confirms/Neutral/Weak)
  • ā€œBuy Setup Confirmedā€ label when everything lines up

šŸ”½ Chart Display
  • Cyan up arrows = Confirmed buy setups
  • Magenta down arrows = Optional sell zones (if you want to test reversals or trim)

CASE STUDY:
The stock pictured is EVRG, they are a utility company and had two things hurt it recently which caused it to back off its uptrend. 1) They had some one times on their earnings report that reduced net income. Some of that was Higher Depreciation and Amortization because EVRG is investing heavily right now in infrastructure. Notable that this is not a cash reduction and a tax benefit. They also had reduced demand because of a rough winter. 2) The market overloaded Utilities as safe havens recently with the economic headwinds, so its natural that we are starting to see a bit of retrace due to sector rotation now that fears have subsided "some". Based off this I suggest EVRG is a good buy the dip company, but not yet. If you notice the chart below, you'll see the oval I put on the chart at current price levels. This means the stock is currently in a buy zone, also indicated by the label that is lit up green in the top left. It still has a weak RSI and volume is still low, once all 3 of this are working together then I would consider it a buy for a short term swing and possible long term defensive stock with a 5% dividend.

Code:
# === Inputs ===
input rsiLength = 14;
input rsiOverbought = 60;
input rsiOversold = 40;

input bbLength = 20;
input bbMult = 2.0;

input volLength = 20;
input relVolHigh = 1.5;
input relVolLow = 0.8;

input showLabels = yes;
input showArrows = yes;

# === RSI ===
def rsi = RSI(length = rsiLength);

# === Bollinger Bands ===
def basis = Average(close, bbLength);
def dev = bbMult * stdev(close, bbLength);
def upperBB = basis + dev;
def lowerBB = basis - dev;

# === Volume ===
def avgVol = Average(volume, volLength);
def relVol = if avgVol != 0 then volume / avgVol else 0;

# === Buy Condition ===
def buySignal = rsi < rsiOversold and high < basis and relVol > relVolHigh;

# === Sell Condition (Optional) ===
def sellSignal = rsi > rsiOverbought and low > basis and relVol > relVolHigh;

# === Label 1: RSI ===
def rsiSlope = rsi - rsi[1];
AddLabel(showLabels,
    "RSI: (" + Round(rsi, 1) + ", Slope: " +Round(rsiSlope, 1) +")",
    if rsi < rsiOversold then Color.GREEN
    else if rsi > rsiOverbought then Color.RED
    else Color.GRAY
);

# === Label 2: Bollinger Band Position ===
AddLabel(showLabels,
    if high < basis then "BB Buy Zone"
    else if low > basis then "BB Sell Zone"
    else "Price in Range",
    if high < basis then Color.GREEN
    else if low > basis then Color.RED
    else Color.GRAY
);

# === Label 3: Relative Volume ===
AddLabel(showLabels,
    if relVol > relVolHigh then "Volume Confirms"
    else if relVol < relVolLow then "Volume Weak – Wait"
    else "Neutral Volume",
    if relVol > relVolHigh then Color.GREEN
    else if relVol < relVolLow then Color.ORANGE
    else Color.GRAY
);

# === Label 4: Confluence ===
AddLabel(showLabels,
    if buySignal then "Buy Setup Confirmed"
    else "No Setup",
    if buySignal then Color.CYAN else Color.DARK_GRAY
);

# === Arrows ===
plot buyArrow = showArrows and buySignal;
buyArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
buyArrow.SetDefaultColor(Color.CYAN);
buyArrow.SetLineWeight(3);

plot sellArrow = showArrows and sellSignal;
sellArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
sellArrow.SetDefaultColor(Color.MAGENTA);
sellArrow.SetLineWeight(3);

Tips:
1)It helps to have bollinger bands on and RSI so you see whats going on. I also like the CMF as well
2) As with any indicator or system it requires a little common sense and not just pulling the trigger. This is a classical strategy, nothing ground breaking on it. IT just helps you not chase good opportunities

Im really enjoying trading using this , but I have a request. I use it in a lower study and the buy/sell arrows get lost , could you change the code for me and put the buy/sell arrow instead into a fixed label that keeps the color until the next signal in opposite direction activates and changes the color?

Im new to thinkscript and have been trying for an hour with no success.

Thanks !! This group and the indicators are a fantastic resource
 
Im really enjoying trading using this , but I have a request. I use it in a lower study and the buy/sell arrows get lost , could you change the code for me and put the buy/sell arrow instead into a fixed label that keeps the color until the next signal in opposite direction activates and changes the color?

Im new to thinkscript and have been trying for an hour with no success.

Thanks !! This group and the indicators are a fantastic resource
Im glad you're enjoying it! I "think" I understood what you're asking but I hope youll forive me I took it on myself to give you a different lower study. I have converted it into a histogram composite scorer. If all 3 pillars are in confluence the histogram will be 3 high and you will see 3 different colors.
Chart Setup: https://tos.mx/!hiF0oJXT

Here is a pic:
Yzpbxn5.png


Code:
declare lower;

input rsiLength = 14;
input rsiOversold = 40;
input rsiOverbought = 60;

input bbLength = 20;
input bbMult = 2.0;

input volLength = 20;
input relVolHigh = 1.5;

# === RSI ===
def rsi = RSI(length = rsiLength);
def rsiBuy = rsi < rsiOversold;
def rsiSell = rsi > rsiOverbought;

# === Bollinger Bands ===
def basis = Average(close, bbLength);
def bbBuy = high < basis;
def bbSell = low > basis;

# === Relative Volume ===
def avgVol = Average(volume, volLength);
def relVol = if avgVol != 0 then volume / avgVol else 0;

# āœ… FIX: Volume should only confirm directionally
def volBuy = relVol > relVolHigh and (rsiBuy or bbBuy);
def volSell = relVol > relVolHigh and (rsiSell or bbSell);

# === BUY Stack ===
def buy1 = if rsiBuy then 1 else 0;
def buy2 = buy1 + (if bbBuy then 1 else 0);
def buy3 = buy2 + (if volBuy then 1 else 0);

# === SELL Stack ===
def sell1 = if rsiSell then -1 else 0;
def sell2 = sell1 + (if bbSell then -1 else 0);
def sell3 = sell2 + (if volSell then -1 else 0);

# === Histogram Plots (Stacked) ===
plot rsiBuyBar = if rsiBuy then 1 else Double.NaN;
rsiBuyBar.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
rsiBuyBar.SetLineWeight(3);
rsiBuyBar.AssignValueColor(Color.MAGENTA);

plot bbBuyBar = if bbBuy then buy2 else Double.NaN;
bbBuyBar.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
bbBuyBar.SetLineWeight(3);
bbBuyBar.AssignValueColor(Color.CYAN);

plot volBuyBar = if volBuy then buy3 else Double.NaN;
volBuyBar.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
volBuyBar.SetLineWeight(3);
volBuyBar.AssignValueColor(Color.YELLOW);

plot rsiSellBar = if rsiSell then -1 else Double.NaN;
rsiSellBar.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
rsiSellBar.SetLineWeight(3);
rsiSellBar.AssignValueColor(Color.MAGENTA);

plot bbSellBar = if bbSell then sell2 else Double.NaN;
bbSellBar.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
bbSellBar.SetLineWeight(3);
bbSellBar.AssignValueColor(Color.CYAN);

plot volSellBar = if volSell then sell3 else Double.NaN;
volSellBar.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
volSellBar.SetLineWeight(3);
volSellBar.AssignValueColor(Color.YELLOW);

# === Zero Line ===
plot zeroLine = 0;
zeroLine.SetDefaultColor(Color.DARK_GRAY);
zeroLine.SetStyle(Curve.SHORT_DASH);

# === Labels (Fixed Color) ===
AddLabel(yes,
    "RSI: " + Round(rsi, 1) +
    (if rsiBuy then " ā¬…ļø < 40 (Buy)" else if rsiSell then " ā¬†ļø > 60 (Sell)" else ""),
    Color.MAGENTA
);

AddLabel(yes,
    "BB Basis: " + Round(basis, 2) +
    (if bbBuy then " ā¬…ļø High < Basis" else if bbSell then " ā¬†ļø Low > Basis" else ""),
    Color.CYAN
);

AddLabel(yes,
    "RelVol: " + Round(relVol, 2) +
    (if volBuy and !volSell then " āœ… Buy Confirm"
     else if volSell then " šŸ”» Sell Confirm"
     else ""),
    Color.YELLOW
);

# === Total Confluence Score ===
def totalConfluence = buy3 + sell3;
AddLabel(yes,
    "Confluence Score: " + totalConfluence,
    if totalConfluence >= 2 then Color.GREEN
    else if totalConfluence <= -2 then Color.RED
    else Color.LIGHT_GRAY
);
 
Last edited:
Im glad you're enjoying it! I "think" I understood what you're asking but I hope youll forive me I took it on myself to give you a different lower study. I have converted it into a histogram composite scorer. If all 3 pillars are in confluence the histogram will be 3 high and you will see 3 different colors. Here is a pic:
No shared chart link.
So, could you please click on the "explanation point" error in the upper left-hand corner of your screen.
Is it an unimportant error? Thanks!
CMh7SgU.png
 
No shared chart link.
So, could you please click on the "explanation point" error in the upper left-hand corner of your screen.
Is it an unimportant error? Thanks!
CMh7SgU.png
Good Catch! Its in the shared chart from the original post as well. Its because of the indicator overlaying the volume. Its saying there isnt enough space. My guess is because the buy arrow drops below the zero line idk, above my paygrade =)

Error:
"Due to lack of space on some subgraphs, Fit study markers setting not applied"

After removing the volume indicator the error went away

***I duplicated the error and shared it on my post if you wanted to inspect it
 
Last edited:
Good Catch! Its in the shared chart from the original post as well. Its because of the indicator overlaying the volume. Its saying there isnt enough space. My guess is because the buy arrow drops below the zero line idk, above my paygrade =)

Error:
"Due to lack of space on some subgraphs, Fit study markers setting not applied"

After removing the volume indicator the error went away

I figured it was an unimportant error.
This is a common error seen when a custom volume indicator is overlaid on the volume lower chart.

In this case, the custom volume indicator is attempting to place arrows below the zero line of the volume histogram.
But the volume lower chart does not default to displaying "below zero" and throws an error.

It is an easy fix. Instead of overlaying custom volume studies on the volume lower chart, move the custom volume study down to a regular lower chart slot*** VoilĆ !! No more error!

shared chart link: http://tos.mx/!05DbEO3U MUST follow these instructions for loading shared links.
1KHYR4Q.png



***must also unclick show volume subgraph
QpFX573.png
 
Last edited by a moderator:
Im glad you're enjoying it! I "think" I understood what you're asking but I hope youll forive me I took it on myself to give you a different lower study. I have converted it into a histogram composite scorer. If all 3 pillars are in confluence the histogram will be 3 high and you will see 3 different colors.
Chart Setup: https://tos.mx/!hiF0oJXT

Here is a pic:
Yzpbxn5.png


Code:
declare lower;

input rsiLength = 14;
input rsiOversold = 40;
input rsiOverbought = 60;

input bbLength = 20;
input bbMult = 2.0;

input volLength = 20;
input relVolHigh = 1.5;

# === RSI ===
def rsi = RSI(length = rsiLength);
def rsiBuy = rsi < rsiOversold;
def rsiSell = rsi > rsiOverbought;

# === Bollinger Bands ===
def basis = Average(close, bbLength);
def bbBuy = high < basis;
def bbSell = low > basis;

# === Relative Volume ===
def avgVol = Average(volume, volLength);
def relVol = if avgVol != 0 then volume / avgVol else 0;

# āœ… FIX: Volume should only confirm directionally
def volBuy = relVol > relVolHigh and (rsiBuy or bbBuy);
def volSell = relVol > relVolHigh and (rsiSell or bbSell);

# === BUY Stack ===
def buy1 = if rsiBuy then 1 else 0;
def buy2 = buy1 + (if bbBuy then 1 else 0);
def buy3 = buy2 + (if volBuy then 1 else 0);

# === SELL Stack ===
def sell1 = if rsiSell then -1 else 0;
def sell2 = sell1 + (if bbSell then -1 else 0);
def sell3 = sell2 + (if volSell then -1 else 0);

# === Histogram Plots (Stacked) ===
plot rsiBuyBar = if rsiBuy then 1 else Double.NaN;
rsiBuyBar.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
rsiBuyBar.SetLineWeight(3);
rsiBuyBar.AssignValueColor(Color.MAGENTA);

plot bbBuyBar = if bbBuy then buy2 else Double.NaN;
bbBuyBar.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
bbBuyBar.SetLineWeight(3);
bbBuyBar.AssignValueColor(Color.CYAN);

plot volBuyBar = if volBuy then buy3 else Double.NaN;
volBuyBar.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
volBuyBar.SetLineWeight(3);
volBuyBar.AssignValueColor(Color.YELLOW);

plot rsiSellBar = if rsiSell then -1 else Double.NaN;
rsiSellBar.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
rsiSellBar.SetLineWeight(3);
rsiSellBar.AssignValueColor(Color.MAGENTA);

plot bbSellBar = if bbSell then sell2 else Double.NaN;
bbSellBar.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
bbSellBar.SetLineWeight(3);
bbSellBar.AssignValueColor(Color.CYAN);

plot volSellBar = if volSell then sell3 else Double.NaN;
volSellBar.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
volSellBar.SetLineWeight(3);
volSellBar.AssignValueColor(Color.YELLOW);

# === Zero Line ===
plot zeroLine = 0;
zeroLine.SetDefaultColor(Color.DARK_GRAY);
zeroLine.SetStyle(Curve.SHORT_DASH);

# === Labels (Fixed Color) ===
AddLabel(yes,
    "RSI: " + Round(rsi, 1) +
    (if rsiBuy then " ā¬…ļø < 40 (Buy)" else if rsiSell then " ā¬†ļø > 60 (Sell)" else ""),
    Color.MAGENTA
);

AddLabel(yes,
    "BB Basis: " + Round(basis, 2) +
    (if bbBuy then " ā¬…ļø High < Basis" else if bbSell then " ā¬†ļø Low > Basis" else ""),
    Color.CYAN
);

AddLabel(yes,
    "RelVol: " + Round(relVol, 2) +
    (if volBuy and !volSell then " āœ… Buy Confirm"
     else if volSell then " šŸ”» Sell Confirm"
     else ""),
    Color.YELLOW
);

# === Total Confluence Score ===
def totalConfluence = buy3 + sell3;
AddLabel(yes,
    "Confluence Score: " + totalConfluence,
    if totalConfluence >= 2 then Color.GREEN
    else if totalConfluence <= -2 then Color.RED
    else Color.LIGHT_GRAY
);
This is exactly what I was looking for! thank you so much.
This also was a great fix you added and not saying "Volume confirms " when it is big sellers volume.
# āœ… FIX: Volume should only confirm directionally
def volBuy = relVol > relVolHigh and (rsiBuy or bbBuy);
def volSell = relVol > relVolHigh and (rsiSell or bbSell);
 
Im glad you're enjoying it! I "think" I understood what you're asking but I hope youll forive me I took it on myself to give you a different lower study. I have converted it into a histogram composite scorer. If all 3 pillars are in confluence the histogram will be 3 high and you will see 3 different colors.
Chart Setup: https://tos.mx/!hiF0oJXT

Here is a pic:
Yzpbxn5.png


Code:
declare lower;

input rsiLength = 14;
input rsiOversold = 40;
input rsiOverbought = 60;

input bbLength = 20;
input bbMult = 2.0;

input volLength = 20;
input relVolHigh = 1.5;

# === RSI ===
def rsi = RSI(length = rsiLength);
def rsiBuy = rsi < rsiOversold;
def rsiSell = rsi > rsiOverbought;

# === Bollinger Bands ===
def basis = Average(close, bbLength);
def bbBuy = high < basis;
def bbSell = low > basis;

# === Relative Volume ===
def avgVol = Average(volume, volLength);
def relVol = if avgVol != 0 then volume / avgVol else 0;

# āœ… FIX: Volume should only confirm directionally
def volBuy = relVol > relVolHigh and (rsiBuy or bbBuy);
def volSell = relVol > relVolHigh and (rsiSell or bbSell);

# === BUY Stack ===
def buy1 = if rsiBuy then 1 else 0;
def buy2 = buy1 + (if bbBuy then 1 else 0);
def buy3 = buy2 + (if volBuy then 1 else 0);

# === SELL Stack ===
def sell1 = if rsiSell then -1 else 0;
def sell2 = sell1 + (if bbSell then -1 else 0);
def sell3 = sell2 + (if volSell then -1 else 0);

# === Histogram Plots (Stacked) ===
plot rsiBuyBar = if rsiBuy then 1 else Double.NaN;
rsiBuyBar.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
rsiBuyBar.SetLineWeight(3);
rsiBuyBar.AssignValueColor(Color.MAGENTA);

plot bbBuyBar = if bbBuy then buy2 else Double.NaN;
bbBuyBar.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
bbBuyBar.SetLineWeight(3);
bbBuyBar.AssignValueColor(Color.CYAN);

plot volBuyBar = if volBuy then buy3 else Double.NaN;
volBuyBar.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
volBuyBar.SetLineWeight(3);
volBuyBar.AssignValueColor(Color.YELLOW);

plot rsiSellBar = if rsiSell then -1 else Double.NaN;
rsiSellBar.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
rsiSellBar.SetLineWeight(3);
rsiSellBar.AssignValueColor(Color.MAGENTA);

plot bbSellBar = if bbSell then sell2 else Double.NaN;
bbSellBar.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
bbSellBar.SetLineWeight(3);
bbSellBar.AssignValueColor(Color.CYAN);

plot volSellBar = if volSell then sell3 else Double.NaN;
volSellBar.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
volSellBar.SetLineWeight(3);
volSellBar.AssignValueColor(Color.YELLOW);

# === Zero Line ===
plot zeroLine = 0;
zeroLine.SetDefaultColor(Color.DARK_GRAY);
zeroLine.SetStyle(Curve.SHORT_DASH);

# === Labels (Fixed Color) ===
AddLabel(yes,
    "RSI: " + Round(rsi, 1) +
    (if rsiBuy then " ā¬…ļø < 40 (Buy)" else if rsiSell then " ā¬†ļø > 60 (Sell)" else ""),
    Color.MAGENTA
);

AddLabel(yes,
    "BB Basis: " + Round(basis, 2) +
    (if bbBuy then " ā¬…ļø High < Basis" else if bbSell then " ā¬†ļø Low > Basis" else ""),
    Color.CYAN
);

AddLabel(yes,
    "RelVol: " + Round(relVol, 2) +
    (if volBuy and !volSell then " āœ… Buy Confirm"
     else if volSell then " šŸ”» Sell Confirm"
     else ""),
    Color.YELLOW
);

# === Total Confluence Score ===
def totalConfluence = buy3 + sell3;
AddLabel(yes,
    "Confluence Score: " + totalConfluence,
    if totalConfluence >= 2 then Color.GREEN
    else if totalConfluence <= -2 then Color.RED
    else Color.LIGHT_GRAY
);

It is a raining thunderstorming kinda morning here in Alabama and Im using ondemand to practice trading, could I make one more request or have I used them all up?

Is it possible to this label?
Price and price action slope. (like your rsi slope ) where when price slope is positive direction (say 2?) the label turns green and when price action slope is -2 the label turns red, and gray when close to 0
rsislope.png
 
It is a raining thunderstorming kinda morning here in Alabama and Im using ondemand to practice trading, could I make one more request or have I used them all up?

Is it possible to this label?
Price and price action slope. (like your rsi slope ) where when price slope is positive direction (say 2?) the label turns green and when price action slope is -2 the label turns red, and gray when close to 0
View attachment 24781
It's no problem, glad to help. I want to mention this is really the delta of RSI (that is the change in), not technically the slope but a quick and dirty way to see whats going on. That said, an RSI of 32 where RSI[1] is 30 will give the same slope as RSI of 72 and RSI[1] of 70. So it doesnt give scale any weight

Code:
# === Inputs ===
input rsiLength = 14;
input rsiOverbought = 60;
input rsiOversold = 40;

input bbLength = 20;
input bbMult = 2.0;

input volLength = 20;
input relVolHigh = 1.5;
input relVolLow = 0.8;

input showLabels = yes;
input showArrows = yes;

# === RSI ===
def rsi = RSI(length = rsiLength);

# === Bollinger Bands ===
def basis = Average(close, bbLength);
def dev = bbMult * stdev(close, bbLength);
def upperBB = basis + dev;
def lowerBB = basis - dev;

# === Volume ===
def avgVol = Average(volume, volLength);
def relVol = if avgVol != 0 then volume / avgVol else 0;

# === Buy Condition ===
def buySignal = rsi < rsiOversold and high < basis and relVol > relVolHigh;

# === Sell Condition (Optional) ===
def sellSignal = rsi > rsiOverbought and low > basis and relVol > relVolHigh;

# === Label 1: RSI ===
def rsiSlope = rsi - rsi[1];
AddLabel(showLabels,
    "RSI: (" + Round(rsi, 1) + ", Slope: " +Round(rsiSlope, 1) +")",
    if rsiSlope > 2 then Color.GREEN
    else if rsiSlope < 2 then Color.RED
    else Color.GRAY
);

# === Label 2: Bollinger Band Position ===
AddLabel(showLabels,
    if high < basis then "BB Buy Zone"
    else if low > basis then "BB Sell Zone"
    else "Price in Range",
    if high < basis then Color.GREEN
    else if low > basis then Color.RED
    else Color.GRAY
);

# === Label 3: Relative Volume ===
AddLabel(showLabels,
    if relVol > relVolHigh then "Volume Confirms"
    else if relVol < relVolLow then "Volume Weak – Wait"
    else "Neutral Volume",
    if relVol > relVolHigh then Color.GREEN
    else if relVol < relVolLow then Color.ORANGE
    else Color.GRAY
);

# === Label 4: Confluence ===
AddLabel(showLabels,
    if buySignal then "Buy Setup Confirmed"
    else "No Setup",
    if buySignal then Color.CYAN else Color.DARK_GRAY
);

# === Arrows ===
plot buyArrow = showArrows and buySignal;
buyArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
buyArrow.SetDefaultColor(Color.CYAN);
buyArrow.SetLineWeight(3);

plot sellArrow = showArrows and sellSignal;
sellArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
sellArrow.SetDefaultColor(Color.MAGENTA);
sellArrow.SetLineWeight(3);
 

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

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
362 Online
Create Post

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