ThinkorSwim Volume Spike Alert and Scanner

Asianraisin

New member
I am trying to set up a thinkscript study alert for high (8x higher than average) intraday volume. I'm trying to do this on the 1 min time frame. The goal is to catch the beginning of large moves like with what happened with $DIS today or with $TWLO and $BA earlier this week. What I've done so far is created a study alert (MarketWatch > study alerts) and put the following code in:

Code:
def afterStart = secondsfromtime(9000)>0;
def beforeEnd = secondstilltime(1430)>0;
def conditionTrue = volume > 8*average(volume, 390);
plot alert = afterStart and beforeEnd and conditionTrue;

I am trying to get alerted for volume 8x higher than average from the hours 9am cst to 2:30pm cst.(to avoid the early morning and late afternoon vol spikes). 390 representing the 390 mins in a trading day. Does this look right? I'm not sure if I'm doing this correctly. Is there any way to backtest this through OnDemand?

Thank you very much for taking time to look at my post.

Code:
#
# Pedro Uriarte 25 Aug 2019
# /CL 2500
#

declare lower;
declare zerobase;

input lengthAvg = 50;
input volumeAlert1 = 2500;
input volumeAlert2 = 3500;
input aggregationPeriod = AggregationPeriod.MIN;
input soundType = Sound.RING;
input alertType =  Alert.BAR;
Plot dinamicAlertLine = ((GetAggregationPeriod()/60000) - 1) * volumeAlert1;

plot Vol = volume;
plot VolAvg = Average(volume, lengthAvg);
Plot AlertLine1 = volumeAlert1;
Plot AlertLine2 = volumeAlert2;

Vol.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
Vol.SetLineWeight(3);
Vol.DefineColor("Up", Color.UPTICK);
Vol.DefineColor("Down", Color.DOWNTICK);
Vol.AssignValueColor(if close > close[1] then Vol.color("Up") else if close < close[1] then Vol.color("Down") else GetColor(1));
VolAvg.SetDefaultColor(GetColor(8));
AlertLine1.SetDefaultColor(GetColor(5));
AlertLine2.SetDefaultColor(GetColor(5));
dinamicAlertLine.SetDefaultColor(GetColor(5));

# def afterStart = SecondsFromTime(0800) > 0;
# def beforeEnd = SecondsTillTime(1530) > 0;
def alertCondition = GetAggregationPeriod() == aggregationPeriod and (volume >= volumeAlert1 or (volumeAlert2!= 0 and volume >= volumeAlert2));

Alert(alertCondition, "High volume Alert", alertType, soundType);
 
Last edited by a moderator:

azakusa

New member
@rad14733

Many thanks.

Here it is. Just a piece of code that was posted at the top of this thread.

Code:
# Volume Spike Alert
# Student
# 12.17.2016

# Fires off an alert on a 6-10X volume spike, so you can catch a rocket early

def AvgVol = Average(volume, 6);
def VolX = (volume > AvgVol[1] * 6) and (volume < AvgVol[1] * 10) and (SecondsFromTime(0930) >= 1800) and (SecondsTillTime(1600) > 900);
def VolXX = (volume > AvgVol[1] * 10) and (SecondsFromTime(0930) >= 1800) and (SecondsTillTime(1600) > 900);
def VolUP = volume > AvgVol;

Alert(VolX, GetSymbolPart() + " has a large volume spike." + volume, Alert.BAR, Sound.Bell);
Alert(VolXX, GetSymbolPart() + " has a very large volume spike." + volume, Alert.BAR, Sound.Bell);
 

rad14733

Well-known member
VIP
@azakusa What a hodgepodge of a topic... I can see what you are confused... The code you posted is not scanner code end the text that corresponds with it is not what should be there... After reviewing the entire topic, the only posts in this topic that address scans are the top portion of Post #1, which is incorrect, Post #2, Post #15, and Post #34...
 

sasank

New member
Is there a way to run a scanner to list stocks from my watchlist whose current volume bar is greater than last 2 volume bars. I'd like to run this scanner at 10:45am est.Which means the 10:30 to 10:45 volume bar should be greater than the volume bars from 10 to 10:15 and 10:15 to 10:30 (I'd like to ignore the 1st 2 volume bars from 9:30 to 10).would like to use 15 mins timeframe to run the scan.

When ever i run the scan im only expecting to see results only if current volume bar is greater than no of periods we select. if not there shouldn't be a any results

i have tried unusual volume scan where current volume bar increased by % than 6 periods with time frame as 15 mins.

Thank You
 
Last edited:

XeoNoX

Well-known member
VIP
Is there a way to run a scanner to list stocks from my watchlist whose current volume bar is greater than last 2 volume bars. I'd like to run this scanner at 10:45am est.Which means the 10:30 to 10:45 volume bar should be greater than the volume bars from 10 to 10:15 and 10:15 to 10:30 (I'd like to ignore the 1st 2 volume bars from 9:30 to 10).would like to use 15 mins timeframe to run the scan.

When ever i run the scan im only expecting to see results only if current volume bar is greater than no of periods we select. if not there shouldn't be a any results

i have tried unusual volume scan where current volume bar increased by % than 6 periods with time frame as 15 mins.

Thank You


volume bar is greater than last 2 volume bars
Code:
plot greaterthanprev2 = volume > volume[1] and volume[2];

the rest is up to you
you stated:
"I'd like to run this scanner at 10:45am"
that is up to you to run the scan at this time
 

azakusa

New member
@azakusa What a hodgepodge of a topic... I can see what you are confused... The code you posted is not scanner code end the text that corresponds with it is not what should be there... After reviewing the entire topic, the only posts in this topic that address scans are the top portion of Post #1, which is incorrect, Post #2, Post #15, and Post #34...
@rad14733
Thanks tons. Your comment helped me figure it out.
 

Jonas99

Active member
VIP
Hello everyone!!! Today i would like to share what has made me profitable in the stock market Smalls caps to Mid caps... I have had entire months green NOT a single red day if you follow what i will tell you...

1. Whole and half numbers are key areas like 1.50 2 2.50 $3 these are physiological areas where stocks top tick or go over just a bit and then come back down where you can then cover for the wash...

2. This is a SCALPING strategy NOT trend trading you are in and out short the pop cover the drop or buy the dip sell the rip.

3. We use whole and half numbers with a nice spike or huge up move within 1-2 BIG candles with volume low floats... into these areas NOT GRINDS we short then cover into the wash for 10-20 cents maybe more

4. I also use Time/Sales and level 2 you MUST have a fast tape/time & sales we must see speed on the time and sales with green green green prints then once it runs out of fuel you will see the tape pause and will see red/white prints coming through this is what we want to see along with big sellers on the level 2 again we short the pop cover the drop vise versa for long we want a huge drop and want to see the time/sales pause and want to see it speed up with green prints along with big buyers on the level 2 if you short at 5.50 and it goes past we will look to add the same share size at $6 that will give us a 5.75 average if i add to the trade i will look to cut it off for break even or a small loss YOU MUST have a big enough account to add or just get in small size...

5. I promise you if you follow this to the T the right way you will have a 90% + win rate because i do this has what worked for me i can not trade trends so i trade the pops and the drops quick in and out you short at 5.50 and it drops to 5.25 1000 shares that is $250 easy money trading does not have to be hard people make it hard..

6. What to do if the trade goes against you? I follow what i call the 3 minute rule if the stock does not do what i want in 3 min i cut it off...

7. Hope some of you can follow this and start becoming consistent i have tested so many strategy's and they did not work for me anddd i did not have a high win rate this is what works for me any questions please ask also i will post a really good script below to go with this strategy as confirmation

SCRIPT NO REPAINT PS: DO NOT USE WITH GRINDS ONLY POPS.

Code:
def agg=aggregationPeriod.FIVE_MIN;
def na = Double.NaN;
input ORBegin = 930;
input OREnd = 1600;
def ORActive = if SecondsTillTime(OREnd) > 0 and SecondsTillTime(ORBegin) <= 0 then 1 else 0;
def today = GetDay() == GetLastDay();
def numDevDn = -2.0;
def numDevUp = 2.0;
def timeFrame = 3 ;

def cap = getAggregationPeriod();
def errorInAggregation =
    timeFrame == 3 and cap >= AggregationPeriod.WEEK or
    timeFrame == 3 and cap >= AggregationPeriod.MONTH;
assert(!errorInAggregation, "timeFrame should be not less than current chart aggregation period");

def yyyyMmDd = getYyyyMmDd();
def periodIndx;
#switch (timeFrame) {
#case DAY:
    periodIndx = yyyyMmDd;
#}
#def isPeriodRolled = compoundValue(1, periodIndx != periodIndx[1], yes);

def volumeSum;
def volumeVwapSum;
def volumeVwap2Sum;

#if (isPeriodRolled) {
    volumeSum = volume;
    volumeVwapSum = volume * vwap;
    volumeVwap2Sum = volume * Sqr(vwap);

def price = volumeVwapSum / volumeSum;
def deviation = Sqrt(Max(volumeVwap2Sum / volumeSum - Sqr(price), 0));

input filterfrom_1_20= 10;
def Sover_bought = 80;
def Sover_sold = 20;
def SKPeriod = 14;
def SDPeriod = 3;
def SpriceH = high;
def SpriceL = low;
def SpriceC = close;
def SaverageType = AverageType.SIMPLE;

def SlowK = reference StochasticFull(Sover_bought, Sover_sold, SKPeriod, SDPeriod, SpriceH, SpriceL, SpriceC, 3, if (SaverageType == 1) then AverageType.SIMPLE else AverageType.EXPONENTIAL).FullK;
def SlowD = reference StochasticFull(Sover_bought, Sover_sold, SKPeriod, SDPeriod, SpriceH, SpriceL, SpriceC, 3, if (SaverageType == 1) then AverageType.SIMPLE else AverageType.EXPONENTIAL).FullD;
def SOverBought = Sover_bought;
def SOverSold = Sover_sold;

#-----------------------------------------------------MACD--------------------------------
def MfastLength = 12;
def MslowLength = 26;
def MACDLength = 9;
def MaverageType = AverageType.EXPONENTIAL;
def MshowBreakoutSignals = no;

def Value = MovingAverage(MaverageType, close, MfastLength) - MovingAverage(MaverageType, close, MslowLength);
def Avg = MovingAverage(MaverageType, Value, MACDLength);

def Diff = Value - Avg;
def ZeroLine = 0;
def hod = if today and hod[1] == 0  then Value else if ORActive and today and Value > hod[1] then Value else hod[1];
def lod = if today and lod[1] == 0  then Value else if ORActive and today and Value < lod[1] then Value else lod[1];

def prctcalc = (filterfrom_1_20/ 100);
def separation = (hod - lod) * prctcalc;
#addlabel(yes,separation,color.green);
#addlabel(yes,prctcalc);
def conditionlong1 = SlowK crosses above SlowD and SlowK < Sover_sold and SlowD < Sover_sold;
def conditionlong2 = Value < 0 and Avg < 0 and Value - Avg > separation or Value < 0 and Avg < 0 and Value - Avg < -separation;

def conditionshort1 = SlowK crosses below SlowD and SlowK > Sover_bought and SlowD > Sover_bought;
def conditionshort2 = Value > 0 and Avg > 0 and Value - Avg > separation or Value > 0 and Avg > 0 and Value - Avg < -separation;
def confirmation = Value crosses below Avg;
plot long = if SecondsFromTime(ORBegin) > 0  and SecondsFromTime(OREnd) < 0 and conditionlong1 and conditionlong2 then low else  Double.NaN;
long.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
long.SetDefaultColor(Color.GREEN);
plot short =  if SecondsFromTime(ORBegin) > 0  and SecondsFromTime(OREnd) < 0 and  conditionshort1 and conditionshort2 then high else Double.NaN;
short.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
short.SetDefaultColor(Color.RED);
thanks for sharing, can you post a chart for your setup based on this indicator?
 

offscript

New member
VIP
Hello, was hoping for some quick assistance. I am new to scripting.

I want to return results in TOS for the following.

1 minute chart
if looking at 2 volume bars, I want results returned if the 2nd volume bar is 400% higher than the 1st volume bar.

Thanks so much for any assistance!

JB
 

raghu4228

New member
VIP
Hello everyone!!! Today i would like to share what has made me profitable in the stock market Smalls caps to Mid caps... I have had entire months green NOT a single red day if you follow what i will tell you...

1. Whole and half numbers are key areas like 1.50 2 2.50 $3 these are physiological areas where stocks top tick or go over just a bit and then come back down where you can then cover for the wash...

2. This is a SCALPING strategy NOT trend trading you are in and out short the pop cover the drop or buy the dip sell the rip.

3. We use whole and half numbers with a nice spike or huge up move within 1-2 BIG candles with volume low floats... into these areas NOT GRINDS we short then cover into the wash for 10-20 cents maybe more

4. I also use Time/Sales and level 2 you MUST have a fast tape/time & sales we must see speed on the time and sales with green green green prints then once it runs out of fuel you will see the tape pause and will see red/white prints coming through this is what we want to see along with big sellers on the level 2 again we short the pop cover the drop vise versa for long we want a huge drop and want to see the time/sales pause and want to see it speed up with green prints along with big buyers on the level 2 if you short at 5.50 and it goes past we will look to add the same share size at $6 that will give us a 5.75 average if i add to the trade i will look to cut it off for break even or a small loss YOU MUST have a big enough account to add or just get in small size...

5. I promise you if you follow this to the T the right way you will have a 90% + win rate because i do this has what worked for me i can not trade trends so i trade the pops and the drops quick in and out you short at 5.50 and it drops to 5.25 1000 shares that is $250 easy money trading does not have to be hard people make it hard..

6. What to do if the trade goes against you? I follow what i call the 3 minute rule if the stock does not do what i want in 3 min i cut it off...

7. Hope some of you can follow this and start becoming consistent i have tested so many strategy's and they did not work for me anddd i did not have a high win rate this is what works for me any questions please ask also i will post a really good script below to go with this strategy as confirmation

SCRIPT NO REPAINT PS: DO NOT USE WITH GRINDS ONLY POPS.

Code:
def agg=aggregationPeriod.FIVE_MIN;
def na = Double.NaN;
input ORBegin = 930;
input OREnd = 1600;
def ORActive = if SecondsTillTime(OREnd) > 0 and SecondsTillTime(ORBegin) <= 0 then 1 else 0;
def today = GetDay() == GetLastDay();
def numDevDn = -2.0;
def numDevUp = 2.0;
def timeFrame = 3 ;

def cap = getAggregationPeriod();
def errorInAggregation =
    timeFrame == 3 and cap >= AggregationPeriod.WEEK or
    timeFrame == 3 and cap >= AggregationPeriod.MONTH;
assert(!errorInAggregation, "timeFrame should be not less than current chart aggregation period");

def yyyyMmDd = getYyyyMmDd();
def periodIndx;
#switch (timeFrame) {
#case DAY:
    periodIndx = yyyyMmDd;
#}
#def isPeriodRolled = compoundValue(1, periodIndx != periodIndx[1], yes);

def volumeSum;
def volumeVwapSum;
def volumeVwap2Sum;

#if (isPeriodRolled) {
    volumeSum = volume;
    volumeVwapSum = volume * vwap;
    volumeVwap2Sum = volume * Sqr(vwap);

def price = volumeVwapSum / volumeSum;
def deviation = Sqrt(Max(volumeVwap2Sum / volumeSum - Sqr(price), 0));

input filterfrom_1_20= 10;
def Sover_bought = 80;
def Sover_sold = 20;
def SKPeriod = 14;
def SDPeriod = 3;
def SpriceH = high;
def SpriceL = low;
def SpriceC = close;
def SaverageType = AverageType.SIMPLE;

def SlowK = reference StochasticFull(Sover_bought, Sover_sold, SKPeriod, SDPeriod, SpriceH, SpriceL, SpriceC, 3, if (SaverageType == 1) then AverageType.SIMPLE else AverageType.EXPONENTIAL).FullK;
def SlowD = reference StochasticFull(Sover_bought, Sover_sold, SKPeriod, SDPeriod, SpriceH, SpriceL, SpriceC, 3, if (SaverageType == 1) then AverageType.SIMPLE else AverageType.EXPONENTIAL).FullD;
def SOverBought = Sover_bought;
def SOverSold = Sover_sold;

#-----------------------------------------------------MACD--------------------------------
def MfastLength = 12;
def MslowLength = 26;
def MACDLength = 9;
def MaverageType = AverageType.EXPONENTIAL;
def MshowBreakoutSignals = no;

def Value = MovingAverage(MaverageType, close, MfastLength) - MovingAverage(MaverageType, close, MslowLength);
def Avg = MovingAverage(MaverageType, Value, MACDLength);

def Diff = Value - Avg;
def ZeroLine = 0;
def hod = if today and hod[1] == 0  then Value else if ORActive and today and Value > hod[1] then Value else hod[1];
def lod = if today and lod[1] == 0  then Value else if ORActive and today and Value < lod[1] then Value else lod[1];

def prctcalc = (filterfrom_1_20/ 100);
def separation = (hod - lod) * prctcalc;
#addlabel(yes,separation,color.green);
#addlabel(yes,prctcalc);
def conditionlong1 = SlowK crosses above SlowD and SlowK < Sover_sold and SlowD < Sover_sold;
def conditionlong2 = Value < 0 and Avg < 0 and Value - Avg > separation or Value < 0 and Avg < 0 and Value - Avg < -separation;

def conditionshort1 = SlowK crosses below SlowD and SlowK > Sover_bought and SlowD > Sover_bought;
def conditionshort2 = Value > 0 and Avg > 0 and Value - Avg > separation or Value > 0 and Avg > 0 and Value - Avg < -separation;
def confirmation = Value crosses below Avg;
plot long = if SecondsFromTime(ORBegin) > 0  and SecondsFromTime(OREnd) < 0 and conditionlong1 and conditionlong2 then low else  Double.NaN;
long.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
long.SetDefaultColor(Color.GREEN);
plot short =  if SecondsFromTime(ORBegin) > 0  and SecondsFromTime(OREnd) < 0 and  conditionshort1 and conditionshort2 then high else Double.NaN;
short.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
short.SetDefaultColor(Color.RED);
tc815,

Thanks a lot for sharing. I like the script very much.
Can you please help me how to get a scanner for the above script please
 

rad14733

Well-known member
VIP
Hello, was hoping for some quick assistance. I am new to scripting.

I want to return results in TOS for the following.

1 minute chart
if looking at 2 volume bars, I want results returned if the 2nd volume bar is 400% higher than the 1st volume bar.

Thanks so much for any assistance!

JB
@offscript Let's break down what it is that you want to do in a mathematically logical fashion and go from there... What is the simplest method you know to check to see of one number is 4x as big as the previous number...??? You would divide the second number by the first number, right...??? So how would you do this with volume...??? It would be volume / volume[1] > 4... So your code would resemble the following scanner code... Both variants should work...

Ruby:
plot volumeX4 = volume / volume[1] >= 4;

--OR--

plot volumeX4 = if volume / volume[1] is greater than or equal to 4 then 1 else Double.NaN;
 

offscript

New member
VIP
@offscript Let's break down what it is that you want to do in a mathematically logical fashion and go from there... What is the simplest method you know to check to see of one number is 4x as big as the previous number...??? You would divide the second number by the first number, right...??? So how would you do this with volume...??? It would be volume / volume[1] > 4... So your code would resemble the following scanner code... Both variants should work...

Ruby:
plot volumeX4 = volume / volume[1] >= 4;

--OR--

plot volumeX4 = if volume / volume[1] is greater than or equal to 4 then 1 else Double.NaN;

Many thanks! I will throw this into the TOS script editor and see what it produces.
 

rad14733

Well-known member
VIP
Many thanks! I will throw this into the TOS script editor and see what it produces.

Good luck... And if you get too many results you could narrow them with the following...

Ruby:
def lowLimit = 4;
def highLimit = 5;
def volDivAmt = volume / volume[1];

plot volumeX4 = if Between(volDivAmt, lowLimit, highLimit) then 1 else Double.NaN;

Here are filtered results for the previous code...

pJ3I9lZ.png


And here are the filtered results of the code in this post...

kFPzImg.png
 
Last edited:
  • Like
Reactions: Kaz

offscript

New member
VIP
Good luck... And if you get too many results you could narrow them with the following...

Ruby:
def lowLimit = 4;
def highLimit = 5;
def volDivAmt = volume / volume[1];

plot volumeX4 = if Between(volDivAmt, lowLimit, highLimit) then 1 else Double.NaN;

Here are filtered results for the previous code...

pJ3I9lZ.png


And here are the filtered results of the code in this post...

kFPzImg.png


You are the greatest, truly, thank you so much!
 

ronl1975

New member
Hi everybody. I am brand new here. I like using the TOS built in study RelativeVolumeStDev. However I would like to set an alert if the numDev were to hit 4.0 or higher during intraday and PM/AH. Could somebody kindly help me out. I've tried using the code from above but no luck; I have no clue what I'm doing. Please help!

Code:
#
# TD Ameritrade IP Company, Inc. (c) 2014-2021
#

declare lower;
declare zerobase;

input length = 60;
input numDev = 2.0;
input allowNegativeValues = no;

def rawRelVol = (volume - Average(volume, length)) / StDev(volume, length);
plot RelVol = if allowNegativeValues then rawRelVol else Max(0, rawRelVol);
plot StDevLevel = numDev;

RelVol.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
RelVol.SetLineWeight(3);
RelVol.DefineColor("Above", GetColor(0));
RelVol.DefineColor("Below", GetColor(2));
RelVol.AssignValueColor(if RelVol >= numDev then RelVol.Color("Above") else RelVol.Color("Below"));
StDevLevel.SetDefaultColor(GetColor(7));
StDevLevel.SetStyle(Curve.SHORT_DASH);
 
Last edited:

rad14733

Well-known member
VIP
@ronl1975 Welcome to the usethinkscript forums...

We don't generally just write code for members, especially not members who just joined to ask us to do their coding for them... That practice should be considered poor forum etiquette... If you're willing to try coding yourself, as you stated you did, we'd be willing to help you along... The first thing you need to do is establish the 4 deviations... Then you would code an Alert() based on price crossing that level... If your chart has extended hours turned on it would automagically fire alerts anytime the conditional criteria is met... The Thinkscript Learning Center is your friend and spending ample time there will help tremendously... I always have a browser tab open to it 24/7... Like I stated, we're willing to help, but we get far too many requests for coding and converting from other trading platforms...
 

mng84

New member
Try this @Asianraisin go to scan, select add filter, go to study, go to the tiny pencil on the right, hit delete, go to thinkscript editor on the top left, copy and paste the code above into it, change the aggregation to 1 minute at the very top left, hit okay, and scan, nothing will come up right now because market closed but you can now save this as a scan by ... clicking the little notebook next to "no matching symbols" click alert when scan results change, name your scan and you should be able to find it under your watchlist. In the morning things should pop up if it's working correctly. You can maybe find out early before the open if it is working by turning on the EXT next to the aggregation you've chosen.

11:45 Paris: Since there is considerable interest in volume studies in recent days, here's a volume spike alert that was posted some time back.

Code:
# Volume Spike Alert
# Student
# 12.17.2016

# Fires off an alert on a 6-10X volume spike, so you can catch a rocket early

def AvgVol = Average(volume, 6);
def VolX = (volume > AvgVol[1] * 6) and (volume < AvgVol[1] * 10) and (SecondsFromTime(0930) >= 1800) and (SecondsTillTime(1600) > 900);
def VolXX = (volume > AvgVol[1] * 10) and (SecondsFromTime(0930) >= 1800) and (SecondsTillTime(1600) > 900);
def VolUP = volume > AvgVol;

Alert(VolX, GetSymbolPart() + " has a large volume spike." + volume, Alert.BAR, Sound.Bell);
Alert(VolXX, GetSymbolPart() + " has a very large volume spike." + volume, Alert.BAR, Sound.Bell);
Hello everyone. Despite alerts with this study are great, I would like to know what would you suggest in order to have a record of the alerts triggered. If I´m in a trade and I miss the alert message, then I no longer have a chance to know what was alerted. Another useful thing would be to see some pop-ups on the charts, especially for the stocks on my watchlist. Thanks in advance for the support.
 

rad14733

Well-known member
VIP
@mng84 How long are you away between checks...??? Are you aware that the Message Center (Messages in the top of your main panel) stores all of the days alerts which can be exported...??? It can also be detached into its own window...
 

mng84

New member
@mng84 How long are you away between checks...??? Are you aware that the Message Center (Messages in the top of your main panel) stores all of the days alerts which can be exported...??? It can also be detached into its own window...
Thank you. I´m not away too long but I have to switch screens and sometimes I lose the alert. Honestly didn´t know about the message center. Too much to learn!!! Thanks again!
 

Slippage

Active member
Hello everyone. Despite alerts with this study are great, I would like to know what would you suggest in order to have a record of the alerts triggered. If I´m in a trade and I miss the alert message, then I no longer have a chance to know what was alerted. Another useful thing would be to see some pop-ups on the charts, especially for the stocks on my watchlist. Thanks in advance for the support.

You can add alerts on scans to notify you when symbols are added and/or removed. You can set those alerts to notify you via mobile push (if you have TOS mobile on your devices) or email. I'm not feeling like typing the steps to do it but I'm sure you can find it in the help or via search engine.

If you want to treat your watchlist differently than other random symbols you can create a duplicate of the scan and set the Scan In at the top to your watchlist instead of whatever you currently use, then set up whatever alerts you want on that scan.

The best you could do for "pop-ups on the charts" is write a study that shows a label when the alert condition is currently met on the stock that is already loaded in the chart. You could also have it play a sound and/or change the background color of the chart if you think the label might not get your attention. Nothing on a chart will have any knowledge of other symbols in your watchlist.
 

prap4trading

New member
Hello All,

I modified little bit of code posted by XeoNoX please let me know your opinions on this
Code:
#Unusual volume scanner by XeoNoX
#Via usethinkscript.com
#Volume in the last 5 minutes is atleast 2000% of the average 50 bars
#set for 5 minute agreggation
#raw percent value
#def percentage = 2000;
#percent in decimal format
def percent_as_decimal = 2000*.01;
#average of last 50 bars
def avgvol =  average(volume,50);
#total volume of last bar
def lastmins = volume;
#average volume multiplied by desired percentage
def percent_of_avg = avgvol*percent_as_decimal;
# scans for volume is greater than than then 50 minute average by over 2000%
def afterStart = secondsfromtime(0945)>=0;
def beforeEnd = secondstilltime(1545)>=0;
def conditionTrue = lastmins>percent_of_avg;

plot alert = afterStart and beforeEnd and conditionTrue;
 

Similar threads

Top