MichaelGLamothe

Auto Flag Distribution Days

2351 views
190
2351 3
This script automatically flags distribution days. Distribution days are defined as any day that is down -0.2% or greater on heavier volume than the previous day. Distribution days are counted on the major indexes ( S&P 500 , NASDAQ, NYSE, etc...) within the CANSLIM methodology.
Remove from Favorite Scripts Add to Favorite Scripts
//@version=2
study("My Script", overlay=true)
is_down_bar = change(close) < (close[1] * -0.002) ? true : false
is_volume_up = change(volume) > 0 ? true : false
is_distribution = is_down_bar and is_volume_up ? true : false
plotshape(series=is_distribution)
nice !
Reply
Thanks for the Template.
I added something.
Now it also shows the amount of distribution days within a certain period(days)


//@version=3
study("Distribution Days", overlay=true)
len = input(25, minval=1, title="Days")
is_down_bar = change(close) < (close * -0.002) ? true : false
is_volume_up = change(volume) > 0 ? true : false
is_distribution = is_down_bar and is_volume_up ? true : false

cnt = 0
for i = 0 to len
if(is_distribution)
cnt := cnt + 1

plotshape(series=((cnt>cnt)?cnt:false))
+5 Reply
d.nelle kalle2017
@kalle2017, your script does not work for me. It does not stop after 25 days.
+1 Reply
Home Stock Screener Forex Screener Crypto Screener Economic Calendar Shows How It Works Chart Features Pricing House Rules Moderators Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Help Center Refer a friend Feature Request Blog & News FAQ Wiki Twitter
Profile Profile Settings Account and Billing Refer a friend My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out