Add a scanner to Accumulation/ distribution indicator

N

nemg28

New member
VIP
I was looking for an indicator that would let me know when a stock would take off the next day or at least give me a warning sign, which is why I started to look for accumulation/ distribution indicator. I found this indicator called the major_accumulation_distribution_days 15 minute timeframe indicator on a website called easycators.com.

I noticed a pattern with the indicator, every time most of the bars crossed over or touched the 1.8 baseline (the baseline was originally higher but I changed it down to 1.8), the next day the stock would either jump up or down in price.

Here is an example of what I am noticing.


I am hoping someone will be able to create a scanner that scans for the days that most of the bars touch or crossover the 1.8 baseline from the code below.

Code:
declare lower;

input max_distday = 9;
input accumulation_or_distribution = {"accum", default "dist"};

def uVolume = close("$UVOL");
def dVolume = close("$DVOL");

plot baseline = 1.8;
plot distribution_day = max_distday;

plot volume;

switch(accumulation_or_distribution){
case accum:
volume = uVolume / dVolume;
default:
volume = dVolume / uVolume;
}

volume.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
volume.DefineColor("Positive", Color.UPTICK);
volume.DefineColor("Negative", Color.DOWNTICK);
volume.AssignValueColor(if volume >= max_distday then volume.color("Positive") else volume.color("Negative"));

I also noticed on some days that if the bars accumulate and pass the 1.8 baseline. If the next day doesn't show any price movement, then typically that is showing that the stock is still consolidating and will breakout or down the next day.

Here are a few examples:


It would be much appreciated is someone could create a scanner for what I am trying to accomplish. Also let me know what you think about the pattern I recognized. I am still trying to find an indicator to let me know what direction the price will move the next day, so if anybody has any ideas, let me know and thank you!
 
Last edited by a moderator:
T

tomsk

Well-known member
VIP
Here's the conversion of your study to a scan. Note that a scan only accepts a single plot statement

input accumulation_or_distribution = {"accum", default "dist"};

def uVolume = close("$UVOL");
def dVolume = close("$DVOL");

def baseline = 1.8;
def v;

switch(accumulation_or_distribution){
case accum:
v = uVolume / dVolume;
default:
v = dVolume / uVolume;
}

plot scan = v >= baseline;
 
N

nemg28

New member
VIP
Here's the conversion of your study to a scan. Note that a scan only accepts a single plot statement

input accumulation_or_distribution = {"accum", default "dist"};

def uVolume = close("$UVOL");
def dVolume = close("$DVOL");

def baseline = 1.8;
def v;

switch(accumulation_or_distribution){
case accum:
v = uVolume / dVolume;
default:
v = dVolume / uVolume;
}

plot scan = v >= baseline;

Thank you @tomsk did you get any results from the scan? I have tried multiple times and haven't gotten any results. I don't really know much about coding so im guessing I have set up wrong. When I am adding in the study to scan, do I need to leave the scan as value or as true? Thank you again.
 
MBF

MBF

Active member
2019 Donor
Thank you @tomsk did you get any results from the scan? I have tried multiple times and haven't gotten any results. I don't really know much about coding so im guessing I have set up wrong. When I am adding in the study to scan, do I need to leave the scan as value or as true? Thank you again.
Try is true within however many bars
 
T

tomsk

Well-known member
VIP
The conversion was based upon the study you supplied. Perhaps there may be some matches on some other days. In other words you may not get a high number of matches every day
 

Similar threads

Top