# Exploring Scan Combining Unusual volume and near 52 weeks high ...

##### Member

https://t.co/3CeuGYZpXb

Last edited by a moderator:

#### vett007

VIP

##### Member
Disclaimer: I am not a financial advisor. This is not an investment advisory, and should not be used to make investment or trading decisions. Information provided on this communication should only be considered for informational purposes. I accept no liability whatsoever for any direct or consequential loss arising from any use of information found in this communication.
https://tos.mx/qksBhga

#### vett007

##### New member
VIP
Thanks for sharing, Appreciate it.
What is the Zscorewatch if I may ask and how do you play the data from the scan.

##### Member
1. Near 52 week high indicates strength
2. Unusual volume indicates current interest at peak
3. Sorting on Zscore or DMI oscillator --> intraday strength
4. Sustained momentum --> Daily and weekly RSI >60
5. Green on E1, E5, E15, E30, E4h --> strength
6. Chart Observations -> REGN is a good candidate at this time
7. Only possibility, it can change any time

##### Member
The basic concept of Z scorewatch is that it’s an oscillator denominated in standard deviations from the VWAP mean.

##### Member
I use 5 days for 5 min chart and 1 year for daily chart...trial and error method!

##### Member
VIP
@samiranadhikari What are those values in the watchlist? E1, E3, ... 8MAD, 21MAD..? Do you mind to share the code and I can if it can be usefukl for me.

##### Member
def a = Average(close, 8);
def d = close - a;
plot p = (d / close) * 100;
AssignBackgroundColor(if p == 0
then Color.LIGHT_GRAY
else if p < 0
then Color.RED
else color.GREEN);

#### vett007

##### New member
VIP
thanks for posting, the workspace does not get loaded, talks about an error in xml. It will be helpful if we can get this working.

R

#### Ramesh16

##### Member
VIP
How do you use the above scan query??

#### vett007

##### New member
VIP
The basic concept of Z scorewatch is that it’s an oscillator denominated in standard deviations from the VWAP mean.
Thanks for sharing, workspace does not import to be able to use, If possible can you provide code for Zscorewatch as you provided for MAD

##### Member
declare lower;

input price = close;
input length = 20;
input ZavgLength = 20;

#Initialize values
def oneSD = stdev(price,length);
def avgClose = simpleMovingAvg(price,length);
def ofoneSD = oneSD*price[1];
def Zscorevalue = ((price-avgClose)/oneSD);
def avgZv = average(Zscorevalue,20);

#Compute and plot Z-Score
plot Zscore = ((price-avgClose)/oneSD);
Zscore.setPaintingStrategy(paintingStrategy.HISTOGRAM);
Zscore.setLineWeight(2);
Zscore.assignValueColor(if Zscore > 0 then color.green else color.red);

plot avgZscore = average(Zscorevalue,ZavgLength);
avgZscore.setPaintingStrategy(paintingStrategy.LINE);

#This is an optional plot that will display the momentum of the Z-Score average
#plot momZAvg = (avgZv-avgZv[5]);

#Plot zero line and extreme bands
plot zero = 0;
plot two = 2;
plot negtwo = -2;
zero.setDefaultColor(color.black);

##### Member
input maLengthOne = 9;
input maLengthTwo = 21;
input maTypeOne = AverageType.EXPONENTIAL;
input maTypeTwo = AverageType.EXPONENTIAL;
input priceOne = close;
input priceTwo = close;
input barsPerDay = 3;
def maOne = MovingAverage(maTypeOne, priceOne, maLengthOne);
def maTwo = MovingAverage(maTypeTwo, priceTwo, maLengthTwo);
def crossAbove = maOne > maTwo and maOne[1] < maTwo[1];
def crossBelow = maOne < maTwo and maOne[1] > maTwo[1];
rec trackCrossAbove = if crossAbove then 1 else if maOne > maTwo then trackCrossAbove[1] + 1 else 0;
rec trackCrossBelow = if crossBelow then -1 else if maOne < maTwo then trackCrossBelow[1] - 1 else 0;
plot data = if trackCrossAbove > AbsValue(trackCrossBelow) then Round(trackCrossAbove / barsPerDay, 1) else Round(trackCrossBelow, barsPerDay);
data.AssignValueColor(if data > 0 or data < 0 then Color.BLACK else Color.CURRENT);
AssignBackgroundColor(if data > 0 then Color.GREEN else if data < 0 then Color.RED else Color.CURRENT);