Mastering Market Pullbacks: Volume Spikes, Moving Averages, Pull Backs and Crossovers For ThinkOrSwim

UpTwoBucks

EDUCATOR

To Install: Copy link below, Click Setup Top right, Open Shared Item, "CTRL V" to paste, Preview, Import. Move it over to your chart if not there.

Updated Version 2 Pull Back Indicator: https://tos.mx/eZnhche
Custom Volume Label: https://tos.mx/4vIM0Zz
Bid Ask Spread: https://tos.mx/Hz4C0iC
My Desk Top: https://tos.mx/ysvL8jE
1 Min Pull Back Scan: https://tos.mx/Mri5Hvh
5 Min Pull Back Scan; https://tos.mx/Xcb7QSw
15 Min Pull Back Scan; https://tos.mx/q2C8jaS

If you imported the links above, you do not need to copy and paste the code below.
Ruby:
#Pull Back Indicator. created by Ricky Gaspard 4/2/2023

#Pull Back Arrows V2

# Green Arrow = Possible Buy
# Yellow Arrow = Possible Sell
# Red Arrow Possible Short

input length = 50;
input multiplier = 1.5;
input emaLength = 8;
input emaLengthSell = 8;

def ma = MovingAverage(AverageType.SIMPLE, close, length);
def pullbackValue = ma - multiplier * Average(TrueRange(high, close, low), length);
def isPullback = close < pullbackValue;

def ema = ExpAverage(close, emaLength);
def isFirstGreenCandle = !isPullback and close > open and close[1] <= open[1] and close > ema;
def isFirstRedCandle = isPullback and close < open and close[1] >= open[1];

def isFirstGreenAfterRed = Sum(isFirstGreenCandle, 1) == 1;
def isFirstRedAfterGreen = Sum(isFirstRedCandle, 1) == 1;

def priceCrossesBelowEMA = close crosses below ExpAverage(close, emaLengthSell);

plot PullbackIndicator = isFirstGreenAfterRed;
PullbackIndicator.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
PullbackIndicator.SetLineWeight(2);
PullbackIndicator.SetDefaultColor(Color.GREEN);

plot PullbackRedIndicator = isFirstRedAfterGreen;
PullbackRedIndicator.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
PullbackRedIndicator.SetLineWeight(2);
PullbackRedIndicator.SetDefaultColor(Color.RED);


#Volume Spike

# 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;

plot arrowDown = if priceCrossesBelowEMA then low else Double.NaN;
arrowDown.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
arrowDown.SetLineWeight(1);
arrowDown.SetDefaultColor(Color.YELLOW);

# Add the label to the watch list
AddLabel(yes,
if is_spike and is_bullish then Concat(AsPercent(vol_change_pct / 10000.0), " - BULLISH SPIKE" + " ")
else if is_spike and is_bearish then Concat(AsPercent(vol_change_pct / 10000.0), " - BEARISH SPIKE" + " ")
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 ###
 
Last edited:

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


CODE UPDATE: I have updated the code, both shared link and script. Remove Version 3 and install Version 4.

Important Note: Not all stocks perform like the one in this video. Don't just buy the first green arrow unless you are certain of your decision. Wait for a possible pull back and the 8 moving average to cross or is above the 21 moving average before making a decision to enter.

Welcome to our game-changing YouTube video on an incredibly effective pullback indication strategy that harnesses the power of volume spikes, moving averages, crossovers, and color indicators! If you're a trader or investor seeking to boost your profits and enhance your market timing, this video is a must-watch. Our proven technique boasts an impressive accuracy rate of around 80%, making it a game-changer for identifying lucrative pullback opportunities in various markets.In this comprehensive tutorial, we'll walk you through step-by-step on how to apply this high-probability strategy to your trading arsenal. You'll learn how to interpret volume spikes as a signal for potential reversals, leverage the versatility of moving averages and crossovers to pinpoint the ideal entry and exit points, and how our unique color indicators provide added precision to your decision-making process.Whether you're a seasoned trader or a newcomer to the world of finance, our pullback indicator strategy can help you gain an edge in the markets. Join us now and take your trading to new heights!

This indicator was Featured Live on TD Ameritrade on 7/28/2023. 6 out of 7 trades successful. They will continue to test! Incredible Results.

https://www.youtube.com/live/6v6CwkZW6Zc?feature=share

Code:
# My Brain in an Indicator, Created From A Life Time Of Trading by Ricky Gaspard on 7-22-2023

# This section defines the input parameters that users can customize when applying the indicator to a chart.

input length = 50;
input multiplier = 1.5;
input emaLengthBuy = 8;
input emaLengthSell = 8;
input vol_change_pct_threshold_up = 100.0;
input vol_change_pct_threshold_down = 100.0;

# This section calculates and displays the Bid and Ask prices on the chart, as well as the spread (Ask - Bid) between them. If the spread is greater than the Spread_limit parameter, the spread label is displayed in light red; otherwise, it is displayed in green.

#Bid, Ask, Spreads Label
input Spread_limit = 0.09;
def priceB = close(priceType = PriceType.BID);
def priceA = close(priceType = PriceType.ASK);
AddLabel(yes, Concat(" Bid: ", priceB  + "   "), Color.WHITE);
AddLabel(yes, Concat("  Ask: ", priceA + "   "), Color.WHITE);
AddLabel(yes, Concat("  Spread: ", priceA - priceB + "   "), if priceA - priceB > Spread_limit then Color.LIGHT_RED else Color.GREEN);

#  This section calculates a simple moving average (MA) of the closing price over the specified length. It calculates the pullbackValue, which is the moving average minus a multiple of the True Range over the same length. The True Range is the greatest of the following: the difference between the high and low, the absolute value of the difference between the high and the previous close, and the absolute value of the difference between the low and the previous close.
# The boolean variable isPullback is set to true when the closing price is below the pullbackValue.
# The script checks for various conditions involving the previous candle's state and the EMAs (Exponential Moving Averages) to identify potential bullish and bearish signals related to pullbacks.

# Pullback Indicator
def ma = MovingAverage(AverageType.SIMPLE, close, length);
def pullbackValue = ma - multiplier * Average(TrueRange(high, close, low), length);
def isPullback = close < pullbackValue;
def ema = ExpAverage(close, emaLengthBuy);
def isFirstGreenCandle = !isPullback and close > open and close[1] <= open[1] and close > ema;
def isFirstRedCandle = isPullback and close < open and close[1] >= open[1];
def isFirstGreenAfterRed = Sum(isFirstGreenCandle, 1) == 1;
def isFirstRedAfterGreen = Sum(isFirstRedCandle, 1) == 1;
def emaconfirmation = MovAvgExponential("length" = 8)."AvgExp" is greater than MovAvgExponential("length" = 21)."AvgExp";

# This section calculates the relative volume (rel_vol) by dividing the current volume by the 50-day average volume.
# It calculates the percentage change in volume (vol_change_pct) compared to the average volume.
# Two boolean variables are defined:
# is_spike: It is set to true when the percentage change in volume (vol_change_pct) is greater than or equal to the vol_change_pct_threshold_up.
# is_spike_down: It is set to true when the percentage change in volume (vol_change_pct) is greater than or equal to the vol_change_pct_threshold_down.

# Volume Spike Indicator
def rel_vol = volume / Average(volume, 50);
def vol_change_pct = (rel_vol - 1.0) * 100.0;
def is_spike = vol_change_pct >= vol_change_pct_threshold_up;
def is_spike_down = vol_change_pct >= vol_change_pct_threshold_down;

# Condition for Pullback Arrow Down
def label_value = if is_spike then vol_change_pct else Double.NaN;
def is_bullish = close > open;
def is_bearish = close < open;
def ema_sell = ExpAverage(close, emaLengthSell);

# A downward-pointing arrow (arrowDown) is plotted on the chart when the following conditions are met:

# There is a volume spike (is_spike_down).
# The candle is bearish (is_bearish).
# The low of the candle is below the value of the ema_sell Exponential Moving Average.

# Pullback Arrow Down
def arrowDownCondition = is_spike_down and is_bearish and low < ema_sell;
plot arrowDown = if arrowDownCondition then low else Double.NaN;
arrowDown.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
arrowDown.SetLineWeight(2);
arrowDown.SetDefaultColor(Color.light_Red);

# An upward-pointing arrow (arrowUp) is plotted on the chart when the following conditions are met:

# There is a volume spike (is_spike).
# The candle is bullish (is_bullish).
# The high of the candle is above the value of the ema Exponential Moving Average.

# Pullback Arrow Up
def arrowUpCondition = is_spike and is_bullish and emaconfirmation and high > ema;
plot arrowUp = if arrowUpCondition then high else Double.NaN;
arrowUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
arrowUp.SetLineWeight(2);
arrowUp.SetDefaultColor(Color.GREEN);

# If the show_label input parameter is set to yes, this section adds labels to the chart indicating whether the volume spike is bullish or bearish.
# The label also displays the percentage change in volume relative to the average volume.
# The labels are colored green for bullish volume spikes, light red for bearish volume spikes, and black otherwise.

# Volume Spike Labels:
# Show/hide volume spike labels
input show_label = yes;
AddLabel(show_label,
         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);

# Plot EMA 8 and EMA 21
plot ema8 = ExpAverage(close, 8);
plot ema21 = ExpAverage(close, 21);

ema8.SetLineWeight(2);
ema21.SetLineWeight(2);

ema8.SetDefaultColor(Color.YELLOW);
ema21.SetDefaultColor(Color.BLUE);

Shared Links:
Pull Back Indicator: http://tos.mx/0zhnS53
Volume Label: http://tos.mx/sozDAGi
My Desk Top: http://tos.mx/Xz58XxI
 
Last edited:
Ricky, Does the .5% option to get out of trade only work for calls? It seems as though it is only for selling volume.
It is only to measure the percentage of selling volume. Setting it to 5% will trigger sooner. 1% requires more volume to trigger. There are two directions upward or downward so two adjustments are require. Start at 0.0 on both then adjust to your trading preferences. Setting this determines how soon you want to enter or exit.
 
It is only to measure the percentage of selling volume. Setting it to 5% will trigger sooner. 1% requires more volume to trigger.
Maybe we can add 4 of these options instead of only two, that way we can scalp up and down without having to adjust the buy/sell every time. For example, If I am watching a stock and have both set to 100, Say I get a down arrow and want to get out at 50%, I would have to change that setting from 100 to 50. What if we had two for Buy/Sell and two more set at BuyExit/SellExit 50%. (or what ever you want to get out. Does that make sense?
 
Maybe we can add 4 of these options instead of only two, that way we can scalp up and down without having to adjust the buy/sell every time. For example, If I am watching a stock and have both set to 100, Say I get a down arrow and want to get out at 50%, I would have to change that setting from 100 to 50. What if we had two for Buy/Sell and two more set at BuyExit/SellExit 50%. (or what ever you want to get out. Does that make sense?
I didn't want to include buy and sell enteries and exits because these indicators like all indicators are really assumptions of what "May happen Next". If I try to predict buy and sell entries and exits or giving the option to adjust those exact entry or exit points it may cause disappointment to some traders if not exactly accurate.
 
I had Chat GPT do it. Here is what to add if you want it. Please look at it and make sure it will work correctly with your code. It appears to work fine at first glance.

Code:
# Input for BuyExit and SellExit volume change percentage thresholds
input vol_change_pct_threshold_sellexit = 100.0;
input vol_change_pct_threshold_buyexit = 100.0;

# BuyExit Arrow Down
plot buyExitArrowDown = if !is_spike_down and is_bearish and low < ema_sell and vol_change_pct >= vol_change_pct_threshold_buyexit then low else Double.NaN;
buyExitArrowDown.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
buyExitArrowDown.SetLineWeight(2);
buyExitArrowDown.SetDefaultColor(Color.CYAN);

# SellExit Arrow Up
plot sellExitArrowUp = if !is_spike and is_bullish and high > ema and vol_change_pct >= vol_change_pct_threshold_sellexit then high else Double.NaN;
sellExitArrowUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
sellExitArrowUp.SetLineWeight(2);
sellExitArrowUp.SetDefaultColor(Color.MAGENTA);
I didn't want to include buy and sell enteries and exits because these indicators like all indicators are really assumptions of what "May happen Next". If I try to predict buy and sell entries and exits or giving the option to adjust those exact entry or exit points it may cause disappointment to some traders if not exactly accurate.
I agree with that thought process. I am simply trying to keep from needing to change my exit percentage ech time I enter a trade. Unless I am missing something here. I need to wait or an up or down signal (Using the 100) as the option either way, Say I enter a put/short, then I would need to change the vol_change_pct_threshold_up to the percentage that I would like it to provide and exit. What I just had Chat GPT do is allow me to keep the BUY/Sell up downs at say 100 and then I can have the BuyExit/SellExit set to say 50. Just as in your video, you had mentioned that we could change those to whatever we wanted to get the early warning. Do I have this correct or am I off track?
 

Attachments

  • Screenshot 2023-07-29 155228.jpg
    Screenshot 2023-07-29 155228.jpg
    191.3 KB · Views: 396
I had Chat GPT do it. Here is what to add if you want it. Please look at it and make sure it will work correctly with your code. It appears to work fine at first glance.

Code:
# Input for BuyExit and SellExit volume change percentage thresholds
input vol_change_pct_threshold_sellexit = 100.0;
input vol_change_pct_threshold_buyexit = 100.0;

# BuyExit Arrow Down
plot buyExitArrowDown = if !is_spike_down and is_bearish and low < ema_sell and vol_change_pct >= vol_change_pct_threshold_buyexit then low else Double.NaN;
buyExitArrowDown.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
buyExitArrowDown.SetLineWeight(2);
buyExitArrowDown.SetDefaultColor(Color.CYAN);

# SellExit Arrow Up
plot sellExitArrowUp = if !is_spike and is_bullish and high > ema and vol_change_pct >= vol_change_pct_threshold_sellexit then high else Double.NaN;
sellExitArrowUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
sellExitArrowUp.SetLineWeight(2);
sellExitArrowUp.SetDefaultColor(Color.MAGENTA);

I agree with that thought process. I am simply trying to keep from needing to change my exit percentage ech time I enter a trade. Unless I am missing something here. I need to wait or an up or down signal (Using the 100) as the option either way, Say I enter a put/short, then I would need to change the vol_change_pct_threshold_up to the percentage that I would like it to provide and exit. What I just had Chat GPT do is allow me to keep the BUY/Sell up downs at say 100 and then I can have the BuyExit/SellExit set to say 50. Just as in your video, you had mentioned that we could change those to whatever we wanted to get the early warning. Do I have this correct or am I off tra

I had Chat GPT do it. Here is what to add if you want it. Please look at it and make sure it will work correctly with your code. It appears to work fine at first glance.

Code:
# Input for BuyExit and SellExit volume change percentage thresholds
input vol_change_pct_threshold_sellexit = 100.0;
input vol_change_pct_threshold_buyexit = 100.0;

# BuyExit Arrow Down
plot buyExitArrowDown = if !is_spike_down and is_bearish and low < ema_sell and vol_change_pct >= vol_change_pct_threshold_buyexit then low else Double.NaN;
buyExitArrowDown.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
buyExitArrowDown.SetLineWeight(2);
buyExitArrowDown.SetDefaultColor(Color.CYAN);

# SellExit Arrow Up
plot sellExitArrowUp = if !is_spike and is_bullish and high > ema and vol_change_pct >= vol_change_pct_threshold_sellexit then high else Double.NaN;
sellExitArrowUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
sellExitArrowUp.SetLineWeight(2);
sellExitArrowUp.SetDefaultColor(Color.MAGENTA);

I agree with that thought process. I am simply trying to keep from needing to change my exit percentage ech time I enter a trade. Unless I am missing something here. I need to wait or an up or down signal (Using the 100) as the option either way, Say I enter a put/short, then I would need to change the vol_change_pct_threshold_up to the percentage that I would like it to provide and exit. What I just had Chat GPT do is allow me to keep the BUY/Sell up downs at say 100 and then I can have the BuyExit/SellExit set to say 50. Just as in your video, you had mentioned that we could change those to whatever we wanted to get the early warning. Do I have this correct or am I off track?
i have not had any luck with chatgpt successfully writing code outside of common thinkscript language. You don't need to change the percentages but once. You either like 0%, 1% or 2%. Once you find your number, your done. I'm done coding for today so i can't run your code. If this works for you try it. we all have our own preferences.
 
Hi UpTwoBucks, Thank you for posting. I just have two questions. Do you have a great scan to find good stocks for this indicator? 2nd question: Does this do auto trading? Or do I have to hit the buy and sell button.

Thank you
 
Last edited by a moderator:
Hi UpTwoBucks, Thank you for posting. I just have two questions. Do you have a great scan to find good stocks for this indicator? 2nd question: Does this do auto trading? Or do I have to hit the buy and sell button.

Thank you
See the videos on the youtube channel for scans. I have never used auto trading so can't offer a response.
 

Important Note: Not all stocks perform like the one in this video. Don't just buy the first green arrow unless you are certain of your decision. Wait for a possible pull back and the 8 moving average to cross or is above the 21 moving average before making a decision to enter.

Welcome to our game-changing YouTube video on an incredibly effective pullback indication strategy that harnesses the power of volume spikes, moving averages, crossovers, and color indicators! If you're a trader or investor seeking to boost your profits and enhance your market timing, this video is a must-watch. Our proven technique boasts an impressive accuracy rate of around 80%, making it a game-changer for identifying lucrative pullback opportunities in various markets.In this comprehensive tutorial, we'll walk you through step-by-step on how to apply this high-probability strategy to your trading arsenal. You'll learn how to interpret volume spikes as a signal for potential reversals, leverage the versatility of moving averages and crossovers to pinpoint the ideal entry and exit points, and how our unique color indicators provide added precision to your decision-making process.Whether you're a seasoned trader or a newcomer to the world of finance, our pullback indicator strategy can help you gain an edge in the markets. Join us now and take your trading to new heights!

This indicator was Featured Live on TD Ameritrade on 7/28/2023. 6 out of 7 trades successful. They will continue to test! Incredible Results.

https://www.youtube.com/live/6v6CwkZW6Zc?feature=share

Code:
# My Brain in an Indicator, Creator From A Life Time Of Trading by Ricky Gaspard on 7-22-2023

# This section defines the input parameters that users can customize when applying the indicator to a chart.

input length = 50;
input multiplier = 1.5;
input emaLengthBuy = 8;
input emaLengthSell = 8;
input vol_change_pct_threshold_up = 100.0;
input vol_change_pct_threshold_down = 100.0;

# This section calculates and displays the Bid and Ask prices on the chart, as well as the spread (Ask - Bid) between them. If the spread is greater than the Spread_limit parameter, the spread label is displayed in light red; otherwise, it is displayed in green.

#Bid, Ask, Spreads Label
input Spread_limit = 0.09;
def priceB = close(priceType = PriceType.BID);
def priceA = close(priceType = PriceType.ASK);
AddLabel(yes, Concat(" Bid: ", priceB  + "   "), Color.WHITE);
AddLabel(yes, Concat("  Ask: ", priceA + "   "), Color.WHITE);
AddLabel(yes, Concat("  Spread: ", priceA - priceB + "   "), if priceA - priceB > Spread_limit then Color.LIGHT_RED else Color.GREEN);

#  This section calculates a simple moving average (MA) of the closing price over the specified length. It calculates the pullbackValue, which is the moving average minus a multiple of the True Range over the same length. The True Range is the greatest of the following: the difference between the high and low, the absolute value of the difference between the high and the previous close, and the absolute value of the difference between the low and the previous close.
# The boolean variable isPullback is set to true when the closing price is below the pullbackValue.
# The script checks for various conditions involving the previous candle's state and the EMAs (Exponential Moving Averages) to identify potential bullish and bearish signals related to pullbacks.

# Pullback Indicator
def ma = MovingAverage(AverageType.SIMPLE, close, length);
def pullbackValue = ma - multiplier * Average(TrueRange(high, close, low), length);
def isPullback = close < pullbackValue;
def ema = ExpAverage(close, emaLengthBuy);
def isFirstGreenCandle = !isPullback and close > open and close[1] <= open[1] and close > ema;
def isFirstRedCandle = isPullback and close < open and close[1] >= open[1];
def isFirstGreenAfterRed = Sum(isFirstGreenCandle, 1) == 1;
def isFirstRedAfterGreen = Sum(isFirstRedCandle, 1) == 1;

# This section calculates the relative volume (rel_vol) by dividing the current volume by the 50-day average volume.
# It calculates the percentage change in volume (vol_change_pct) compared to the average volume.
# Two boolean variables are defined:
# is_spike: It is set to true when the percentage change in volume (vol_change_pct) is greater than or equal to the vol_change_pct_threshold_up.
# is_spike_down: It is set to true when the percentage change in volume (vol_change_pct) is greater than or equal to the vol_change_pct_threshold_down.

# Volume Spike Indicator
def rel_vol = volume / Average(volume, 50);
def vol_change_pct = (rel_vol - 1.0) * 100.0;
def is_spike = vol_change_pct >= vol_change_pct_threshold_up;
def is_spike_down = vol_change_pct >= vol_change_pct_threshold_down;

# Condition for Pullback Arrow Down
def label_value = if is_spike then vol_change_pct else Double.NaN;
def is_bullish = close > open;
def is_bearish = close < open;
def ema_sell = ExpAverage(close, emaLengthSell);

# A downward-pointing arrow (arrowDown) is plotted on the chart when the following conditions are met:

# There is a volume spike (is_spike_down).
# The candle is bearish (is_bearish).
# The low of the candle is below the value of the ema_sell Exponential Moving Average.

# Pullback Arrow Down
plot arrowDown = if is_spike_down and is_bearish and low < ema_sell then low else Double.NaN;
arrowDown.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
arrowDown.SetLineWeight(2);
arrowDown.SetDefaultColor(Color.light_Red);

# An upward-pointing arrow (arrowUp) is plotted on the chart when the following conditions are met:

# There is a volume spike (is_spike).
# The candle is bullish (is_bullish).
# The high of the candle is above the value of the ema Exponential Moving Average.

# Pullback Arrow Up
plot arrowUp = if is_spike and is_bullish and high > ema then high else Double.NaN;
arrowUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
arrowUp.SetLineWeight(2);
arrowUp.SetDefaultColor(Color.GREEN);

# If the show_label input parameter is set to yes, this section adds labels to the chart indicating whether the volume spike is bullish or bearish.
# The label also displays the percentage change in volume relative to the average volume.
# The labels are colored green for bullish volume spikes, light red for bearish volume spikes, and black otherwise.

# Volume Spike Labels:
# Show/hide volume spike labels
input show_label = yes;
AddLabel(show_label,
         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);

# Plot EMA 8 and EMA 21
plot ema8 = ExpAverage(close, 8);
plot ema21 = ExpAverage(close, 21);

ema8.SetLineWeight(2);
ema21.SetLineWeight(2);

ema8.SetDefaultColor(Color.YELLOW);
ema21.SetDefaultColor(Color.BLUE);

Shared Links:
Pull Back Indicator: http://tos.mx/AfvCTjg
Volume Label: http://tos.mx/sozDAGi
My Desk Top: http://tos.mx/Xz58XxI
Saw Ken Rose's on TOS and loved your indicator. I've watched all your video's. Can't wait till Monday to paper trade.
 

CODE UPDATE: I have updated the code, both shared link and script. Remove Version 3 and install Version 4.

Important Note: Not all stocks perform like the one in this video. Don't just buy the first green arrow unless you are certain of your decision. Wait for a possible pull back and the 8 moving average to cross or is above the 21 moving average before making a decision to enter.

Welcome to our game-changing YouTube video on an incredibly effective pullback indication strategy that harnesses the power of volume spikes, moving averages, crossovers, and color indicators! If you're a trader or investor seeking to boost your profits and enhance your market timing, this video is a must-watch. Our proven technique boasts an impressive accuracy rate of around 80%, making it a game-changer for identifying lucrative pullback opportunities in various markets.In this comprehensive tutorial, we'll walk you through step-by-step on how to apply this high-probability strategy to your trading arsenal. You'll learn how to interpret volume spikes as a signal for potential reversals, leverage the versatility of moving averages and crossovers to pinpoint the ideal entry and exit points, and how our unique color indicators provide added precision to your decision-making process.Whether you're a seasoned trader or a newcomer to the world of finance, our pullback indicator strategy can help you gain an edge in the markets. Join us now and take your trading to new heights!

This indicator was Featured Live on TD Ameritrade on 7/28/2023. 6 out of 7 trades successful. They will continue to test! Incredible Results.

https://www.youtube.com/live/6v6CwkZW6Zc?feature=share

Code:
# My Brain in an Indicator, Creator From A Life Time Of Trading by Ricky Gaspard on 7-22-2023

# This section defines the input parameters that users can customize when applying the indicator to a chart.

# My Brain in an Indicator, Creator From A Life Time Of Trading by Ricky Gaspard on 7-22-2023

# This section defines the input parameters that users can customize when applying the indicator to a chart.

input length = 50;
input multiplier = 1.5;
input emaLengthBuy = 8;
input emaLengthSell = 8;
input vol_change_pct_threshold_up = 100.0; 
input vol_change_pct_threshold_down = 100.0; 

# This section calculates and displays the Bid and Ask prices on the chart, as well as the spread (Ask - Bid) between them. If the spread is greater than the Spread_limit parameter, the spread label is displayed in light red; otherwise, it is displayed in green.

#Bid, Ask, Spreads Label
input Spread_limit = 0.09;
def priceB = close(priceType = PriceType.BID);
def priceA = close(priceType = PriceType.ASK);
AddLabel(yes, Concat(" Bid: ", priceB  + "   "), Color.WHITE);
AddLabel(yes, Concat("  Ask: ", priceA + "   "), Color.WHITE);
AddLabel(yes, Concat("  Spread: ", priceA - priceB + "   "), if priceA - priceB > Spread_limit then Color.LIGHT_RED else Color.GREEN);

#  This section calculates a simple moving average (MA) of the closing price over the specified length. It calculates the pullbackValue, which is the moving average minus a multiple of the True Range over the same length. The True Range is the greatest of the following: the difference between the high and low, the absolute value of the difference between the high and the previous close, and the absolute value of the difference between the low and the previous close.
# The boolean variable isPullback is set to true when the closing price is below the pullbackValue.
# The script checks for various conditions involving the previous candle's state and the EMAs (Exponential Moving Averages) to identify potential bullish and bearish signals related to pullbacks.

# Pullback Indicator
def ma = MovingAverage(AverageType.SIMPLE, close, length);
def pullbackValue = ma - multiplier * Average(TrueRange(high, close, low), length);
def isPullback = close < pullbackValue;
def ema = ExpAverage(close, emaLengthBuy);
def isFirstGreenCandle = !isPullback and close > open and close[1] <= open[1] and close > ema;
def isFirstRedCandle = isPullback and close < open and close[1] >= open[1];
def isFirstGreenAfterRed = Sum(isFirstGreenCandle, 1) == 1;
def isFirstRedAfterGreen = Sum(isFirstRedCandle, 1) == 1;
def emaconfirmation = MovAvgExponential("length" = 8)."AvgExp" is greater than MovAvgExponential("length" = 21)."AvgExp";

# This section calculates the relative volume (rel_vol) by dividing the current volume by the 50-day average volume.
# It calculates the percentage change in volume (vol_change_pct) compared to the average volume.
# Two boolean variables are defined:
# is_spike: It is set to true when the percentage change in volume (vol_change_pct) is greater than or equal to the vol_change_pct_threshold_up.
# is_spike_down: It is set to true when the percentage change in volume (vol_change_pct) is greater than or equal to the vol_change_pct_threshold_down.

# Volume Spike Indicator
def rel_vol = volume / Average(volume, 50);
def vol_change_pct = (rel_vol - 1.0) * 100.0;
def is_spike = vol_change_pct >= vol_change_pct_threshold_up;
def is_spike_down = vol_change_pct >= vol_change_pct_threshold_down;

# Condition for Pullback Arrow Down
def label_value = if is_spike then vol_change_pct else Double.NaN;
def is_bullish = close > open;
def is_bearish = close < open;
def ema_sell = ExpAverage(close, emaLengthSell);

# A downward-pointing arrow (arrowDown) is plotted on the chart when the following conditions are met:

# There is a volume spike (is_spike_down).
# The candle is bearish (is_bearish).
# The low of the candle is below the value of the ema_sell Exponential Moving Average.

# Pullback Arrow Down
def arrowDownCondition = is_spike_down and is_bearish and low < ema_sell;
plot arrowDown = if arrowDownCondition then low else Double.NaN;
arrowDown.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
arrowDown.SetLineWeight(2);
arrowDown.SetDefaultColor(Color.light_Red);

# An upward-pointing arrow (arrowUp) is plotted on the chart when the following conditions are met:

# There is a volume spike (is_spike).
# The candle is bullish (is_bullish).
# The high of the candle is above the value of the ema Exponential Moving Average.

# Pullback Arrow Up
def arrowUpCondition = is_spike and is_bullish and emaconfirmation and high > ema;
plot arrowUp = if arrowUpCondition then high else Double.NaN;
arrowUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
arrowUp.SetLineWeight(2);
arrowUp.SetDefaultColor(Color.GREEN);

# If the show_label input parameter is set to yes, this section adds labels to the chart indicating whether the volume spike is bullish or bearish.
# The label also displays the percentage change in volume relative to the average volume.
# The labels are colored green for bullish volume spikes, light red for bearish volume spikes, and black otherwise.

# Volume Spike Labels:
# Show/hide volume spike labels
input show_label = yes; 
AddLabel(show_label,
         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);

# Plot EMA 8 and EMA 21
plot ema8 = ExpAverage(close, 8);
plot ema21 = ExpAverage(close, 21);

ema8.SetLineWeight(2);
ema21.SetLineWeight(2);

ema8.SetDefaultColor(Color.YELLOW);
ema21.SetDefaultColor(Color.BLUE);

Shared Links:
Pull Back Indicator: http://tos.mx/0zhnS53
Volume Label: http://tos.mx/sozDAGi
My Desk Top: http://tos.mx/Xz58XxI
Urgent Update: This code has been updated to Version 4. You no longer need to confirm the ema8 is above the ema21. remove V3.
 
Hi UpTwoBucks, Thank you for posting. I just have two questions. Do you have a great scan to find good stocks for this indicator? 2nd question: Does this do auto trading? Or do I have to hit the buy and sell button.

Thank you
This indicator makes a decision from the activity of the current candle when in a live market. Unfortunately we can't scan for what has not yet happened. Most all users are monitoring the %VolSpike indicator in a watch list and when the spike occurs they continue monitoring it on the chart. If you watch the other videos on the youtube channel, it will be easier to understand. Whatever I post here is posted there.
 
Last edited:

Week 1 Testing:
Week 2 Testing:


Code:
# My Brain in an Indicator, Created From A Life Time Of Trading by Ricky Gaspard on 7-22-2023

# This section defines the input parameters that users can customize when applying the indicator to a chart.

input length = 50;
input multiplier = 1.5;
input emaLengthBuy = 8;
input emaLengthSell = 8;
input vol_change_pct_threshold_up = 100.0;
input vol_change_pct_threshold_down = 100.0;

# This section calculates and displays the Bid and Ask prices on the chart, as well as the spread (Ask - Bid) between them. If the spread is greater than the Spread_limit parameter, the spread label is displayed in light red; otherwise, it is displayed in green.

#Bid, Ask, Spreads Label
input Spread_limit = 0.09;
def priceB = close(priceType = PriceType.BID);
def priceA = close(priceType = PriceType.ASK);
AddLabel(yes, Concat(" Bid: ", priceB  + "   "), Color.WHITE);
AddLabel(yes, Concat("  Ask: ", priceA + "   "), Color.WHITE);
AddLabel(yes, Concat("  Spread: ", priceA - priceB + "   "), if priceA - priceB > Spread_limit then Color.LIGHT_RED else Color.GREEN);

#  This section calculates a simple moving average (MA) of the closing price over the specified length. It calculates the pullbackValue, which is the moving average minus a multiple of the True Range over the same length. The True Range is the greatest of the following: the difference between the high and low, the absolute value of the difference between the high and the previous close, and the absolute value of the difference between the low and the previous close.
# The boolean variable isPullback is set to true when the closing price is below the pullbackValue.
# The script checks for various conditions involving the previous candle's state and the EMAs (Exponential Moving Averages) to identify potential bullish and bearish signals related to pullbacks.

# Pullback Indicator
def ma = MovingAverage(AverageType.SIMPLE, close, length);
def pullbackValue = ma - multiplier * Average(TrueRange(high, close, low), length);
def isPullback = close < pullbackValue;
def ema = ExpAverage(close, emaLengthBuy);
def isFirstGreenCandle = !isPullback and close > open and close[1] <= open[1] and close > ema;
def isFirstRedCandle = isPullback and close < open and close[1] >= open[1];
def isFirstGreenAfterRed = Sum(isFirstGreenCandle, 1) == 1;
def isFirstRedAfterGreen = Sum(isFirstRedCandle, 1) == 1;
def emaconfirmation = MovAvgExponential("length" = 8)."AvgExp" is greater than MovAvgExponential("length" = 21)."AvgExp";

# This section calculates the relative volume (rel_vol) by dividing the current volume by the 50-day average volume.
# It calculates the percentage change in volume (vol_change_pct) compared to the average volume.
# Two boolean variables are defined:
# is_spike: It is set to true when the percentage change in volume (vol_change_pct) is greater than or equal to the vol_change_pct_threshold_up.
# is_spike_down: It is set to true when the percentage change in volume (vol_change_pct) is greater than or equal to the vol_change_pct_threshold_down.

# Volume Spike Indicator
def rel_vol = volume / Average(volume, 50);
def vol_change_pct = (rel_vol - 1.0) * 100.0;
def is_spike = vol_change_pct >= vol_change_pct_threshold_up;
def is_spike_down = vol_change_pct >= vol_change_pct_threshold_down;

# Condition for Pullback Arrow Down
def label_value = if is_spike then vol_change_pct else Double.NaN;
def is_bullish = close > open;
def is_bearish = close < open;
def ema_sell = ExpAverage(close, emaLengthSell);

# A downward-pointing arrow (arrowDown) is plotted on the chart when the following conditions are met:

# There is a volume spike (is_spike_down).
# The candle is bearish (is_bearish).
# The low of the candle is below the value of the ema_sell Exponential Moving Average.

# Pullback Arrow Down
def arrowDownCondition = is_spike_down and is_bearish and low < ema_sell;
plot arrowDown = if arrowDownCondition then low else Double.NaN;
arrowDown.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
arrowDown.SetLineWeight(2);
arrowDown.SetDefaultColor(Color.light_Red);

# An upward-pointing arrow (arrowUp) is plotted on the chart when the following conditions are met:

# There is a volume spike (is_spike).
# The candle is bullish (is_bullish).
# The high of the candle is above the value of the ema Exponential Moving Average.

# Pullback Arrow Up
def arrowUpCondition = is_spike and is_bullish and emaconfirmation and high > ema;
plot arrowUp = if arrowUpCondition then high else Double.NaN;
arrowUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
arrowUp.SetLineWeight(2);
arrowUp.SetDefaultColor(Color.GREEN);

# If the show_label input parameter is set to yes, this section adds labels to the chart indicating whether the volume spike is bullish or bearish.
# The label also displays the percentage change in volume relative to the average volume.
# The labels are colored green for bullish volume spikes, light red for bearish volume spikes, and black otherwise.

# Volume Spike Labels:
# Show/hide volume spike labels
input show_label = yes;
AddLabel(show_label,
         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);

# Plot EMA 8 and EMA 21
plot ema8 = ExpAverage(close, 8);
plot ema21 = ExpAverage(close, 21);

ema8.SetLineWeight(2);
ema21.SetLineWeight(2);

ema8.SetDefaultColor(Color.YELLOW);
ema21.SetDefaultColor(Color.BLUE);
 

CODE UPDATE: I have updated the code, both shared link and script. Remove Version 3 and install Version 4.

Important Note: Not all stocks perform like the one in this video. Don't just buy the first green arrow unless you are certain of your decision. Wait for a possible pull back and the 8 moving average to cross or is above the 21 moving average before making a decision to enter.

Welcome to our game-changing YouTube video on an incredibly effective pullback indication strategy that harnesses the power of volume spikes, moving averages, crossovers, and color indicators! If you're a trader or investor seeking to boost your profits and enhance your market timing, this video is a must-watch. Our proven technique boasts an impressive accuracy rate of around 80%, making it a game-changer for identifying lucrative pullback opportunities in various markets.In this comprehensive tutorial, we'll walk you through step-by-step on how to apply this high-probability strategy to your trading arsenal. You'll learn how to interpret volume spikes as a signal for potential reversals, leverage the versatility of moving averages and crossovers to pinpoint the ideal entry and exit points, and how our unique color indicators provide added precision to your decision-making process.Whether you're a seasoned trader or a newcomer to the world of finance, our pullback indicator strategy can help you gain an edge in the markets. Join us now and take your trading to new heights!

This indicator was Featured Live on TD Ameritrade on 7/28/2023. 6 out of 7 trades successful. They will continue to test! Incredible Results.

https://www.youtube.com/live/6v6CwkZW6Zc?feature=share

Code:
# My Brain in an Indicator, Created From A Life Time Of Trading by Ricky Gaspard on 7-22-2023

# This section defines the input parameters that users can customize when applying the indicator to a chart.

input length = 50;
input multiplier = 1.5;
input emaLengthBuy = 8;
input emaLengthSell = 8;
input vol_change_pct_threshold_up = 100.0;
input vol_change_pct_threshold_down = 100.0;

# This section calculates and displays the Bid and Ask prices on the chart, as well as the spread (Ask - Bid) between them. If the spread is greater than the Spread_limit parameter, the spread label is displayed in light red; otherwise, it is displayed in green.

#Bid, Ask, Spreads Label
input Spread_limit = 0.09;
def priceB = close(priceType = PriceType.BID);
def priceA = close(priceType = PriceType.ASK);
AddLabel(yes, Concat(" Bid: ", priceB  + "   "), Color.WHITE);
AddLabel(yes, Concat("  Ask: ", priceA + "   "), Color.WHITE);
AddLabel(yes, Concat("  Spread: ", priceA - priceB + "   "), if priceA - priceB > Spread_limit then Color.LIGHT_RED else Color.GREEN);

#  This section calculates a simple moving average (MA) of the closing price over the specified length. It calculates the pullbackValue, which is the moving average minus a multiple of the True Range over the same length. The True Range is the greatest of the following: the difference between the high and low, the absolute value of the difference between the high and the previous close, and the absolute value of the difference between the low and the previous close.
# The boolean variable isPullback is set to true when the closing price is below the pullbackValue.
# The script checks for various conditions involving the previous candle's state and the EMAs (Exponential Moving Averages) to identify potential bullish and bearish signals related to pullbacks.

# Pullback Indicator
def ma = MovingAverage(AverageType.SIMPLE, close, length);
def pullbackValue = ma - multiplier * Average(TrueRange(high, close, low), length);
def isPullback = close < pullbackValue;
def ema = ExpAverage(close, emaLengthBuy);
def isFirstGreenCandle = !isPullback and close > open and close[1] <= open[1] and close > ema;
def isFirstRedCandle = isPullback and close < open and close[1] >= open[1];
def isFirstGreenAfterRed = Sum(isFirstGreenCandle, 1) == 1;
def isFirstRedAfterGreen = Sum(isFirstRedCandle, 1) == 1;
def emaconfirmation = MovAvgExponential("length" = 8)."AvgExp" is greater than MovAvgExponential("length" = 21)."AvgExp";

# This section calculates the relative volume (rel_vol) by dividing the current volume by the 50-day average volume.
# It calculates the percentage change in volume (vol_change_pct) compared to the average volume.
# Two boolean variables are defined:
# is_spike: It is set to true when the percentage change in volume (vol_change_pct) is greater than or equal to the vol_change_pct_threshold_up.
# is_spike_down: It is set to true when the percentage change in volume (vol_change_pct) is greater than or equal to the vol_change_pct_threshold_down.

# Volume Spike Indicator
def rel_vol = volume / Average(volume, 50);
def vol_change_pct = (rel_vol - 1.0) * 100.0;
def is_spike = vol_change_pct >= vol_change_pct_threshold_up;
def is_spike_down = vol_change_pct >= vol_change_pct_threshold_down;

# Condition for Pullback Arrow Down
def label_value = if is_spike then vol_change_pct else Double.NaN;
def is_bullish = close > open;
def is_bearish = close < open;
def ema_sell = ExpAverage(close, emaLengthSell);

# A downward-pointing arrow (arrowDown) is plotted on the chart when the following conditions are met:

# There is a volume spike (is_spike_down).
# The candle is bearish (is_bearish).
# The low of the candle is below the value of the ema_sell Exponential Moving Average.

# Pullback Arrow Down
def arrowDownCondition = is_spike_down and is_bearish and low < ema_sell;
plot arrowDown = if arrowDownCondition then low else Double.NaN;
arrowDown.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
arrowDown.SetLineWeight(2);
arrowDown.SetDefaultColor(Color.light_Red);

# An upward-pointing arrow (arrowUp) is plotted on the chart when the following conditions are met:

# There is a volume spike (is_spike).
# The candle is bullish (is_bullish).
# The high of the candle is above the value of the ema Exponential Moving Average.

# Pullback Arrow Up
def arrowUpCondition = is_spike and is_bullish and emaconfirmation and high > ema;
plot arrowUp = if arrowUpCondition then high else Double.NaN;
arrowUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
arrowUp.SetLineWeight(2);
arrowUp.SetDefaultColor(Color.GREEN);

# If the show_label input parameter is set to yes, this section adds labels to the chart indicating whether the volume spike is bullish or bearish.
# The label also displays the percentage change in volume relative to the average volume.
# The labels are colored green for bullish volume spikes, light red for bearish volume spikes, and black otherwise.

# Volume Spike Labels:
# Show/hide volume spike labels
input show_label = yes;
AddLabel(show_label,
         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);

# Plot EMA 8 and EMA 21
plot ema8 = ExpAverage(close, 8);
plot ema21 = ExpAverage(close, 21);

ema8.SetLineWeight(2);
ema21.SetLineWeight(2);

ema8.SetDefaultColor(Color.YELLOW);
ema21.SetDefaultColor(Color.BLUE);

Shared Links:
Pull Back Indicator: http://tos.mx/0zhnS53
Volume Label: http://tos.mx/sozDAGi
My Desk Top: http://tos.mx/Xz58XxI
is there a way to alert when "Market timing and forecast" hit 0 or 100 level..
 
In this informative video, we look into the world of tick charts using pull backs, Order Spikes and how they can revolutionize your trading game. Discover the unique advantages of using tick charts, from enhanced price clarity to improved market analysis. Learn valuable tips and strategies to harness tick charts effectively, empowering you to make smarter trading decisions. Whether you're a beginner or an experienced trader, this video is your key to unlocking the potential of tick charts for a more profitable trading journey.


Shared Link Pull Back Version 2: http://tos.mx/OTFVhyV
Shared Link Volume Label: http://tos.mx/uTfCg3Q
Shared Desktop: https://tos.mx/yY8kdIL

Code:
#Pull Back Arrows V2 Created by Ricky Gaspard
# This version modified to work with Tick charts

# Green Arrow = Possible Buy
# Yellow Arrow = Possible Sell
# Red Arrow Possible Short

input length = 50;
input multiplier = 1.5;
input emaLength = 8;
input emaLengthSell = 8;

def ma = MovingAverage(AverageType.SIMPLE, close, length);
def pullbackValue = ma - multiplier * Average(TrueRange(high, close, low), length);
def isPullback = close < pullbackValue;

def ema = ExpAverage(close, emaLength);
def isFirstGreenCandle = !isPullback and close > open and close[1] <= open[1] and close > ema;
def isFirstRedCandle = isPullback and close < open and close[1] >= open[1];

def isFirstGreenAfterRed = Sum(isFirstGreenCandle, 1) == 1;
def isFirstRedAfterGreen = Sum(isFirstRedCandle, 1) == 1;

def priceCrossesBelowEMA = close crosses below ExpAverage(close, emaLengthSell);

plot PullbackIndicator = isFirstGreenAfterRed;
PullbackIndicator.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
PullbackIndicator.SetLineWeight(2);
PullbackIndicator.SetDefaultColor(Color.GREEN);

#Volume Spike

# Set the percentage threshold for the spike
def spike_percentage_threshold = 100.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;

plot arrowDown = if priceCrossesBelowEMA then low else Double.NaN;
arrowDown.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
arrowDown.SetLineWeight(2);
arrowDown.SetDefaultColor(Color.YELLOW);

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

# Plot EMA 8 and EMA 21
plot ema8 = ExpAverage(close, 8);
plot ema21 = ExpAverage(close, 21);

ema8.SetLineWeight(2);
ema21.SetLineWeight(2);

ema8.SetDefaultColor(Color.YELLOW);
ema21.SetDefaultColor(Color.BLUE);
 

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
355 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