TradingView
A_Traders_Edge
2021년 11월 22일 오전 4시 31분

40+ Coin Screener (workaround to 40 Security Limit Per Script) 

Oasis Network / TetherKuCoin

설명

This is a far inferior method for a screener/scanner (compared to my first publication) but after looking at that script from a noobs eyes again, I could see how this form would be a lot easier to take in/understand so wanted to publish it. Everything that I could think of to mention about this is in my 1st pub so ill leave it to you to check it out...though I did include some comments in the script. It is pretty straight forward but if you have any questions don't hold them in. I'll answer them if I can. The only thing that is not in this one is setting up the alert feature so that you only have to create 1 alert per iteration of the script and it takes care of all of the coins for that iteration/set that is chosen in the settings (so please see previous script if would like to do this for your screener/scanner).

To be PERFECTLY CLEAR, the workaround is to the issue of not being able to scan but only 40 coins per script. You can scan more than 40 per script but only if you create "batches" or "sets" that the user can select within the settings which set to use for each iteration of the script on the chart. That being, you have to the script multiple times to the chart and merge them into 1 window and merge the scales (instructions in first publications). Here in this script I am scanning 72 different coins that are the Margin Coins on KUCOIN. I have split them up into 3 sets (24 coins per set). I could have made 2 sets but the script will be slower to load and to respond (like, when it comes to receiving alerts), thus I split them up the way I did. If you want to change any of this there are slightly more details in the previous script.

One great use-case that I LOVE about this particular version (and the way I use it) is right at the end of when I see a whole market dump/pump coming to an end and want to know which horse to bet on. Used to think whichever coin come out the fastest from the dump was the one to bet on but quickly learned that 1-2 (or even a few) hrs needs to go by first bc the ones that look the strongest in the beginning are NOT the ones to have performed the best when viewing the results 12 hrs later. IN FACT, many instances of using this exact script for reasons as such has taught me that the manipulators (I believe this to be the case as least) WANT everyone to bet on these that come out the gate the hardest and thus they make them move REALLY hard in the beginning then they QUICKLY become stagnant (moreso, they become WORSE than stagnant, they actually quickly retrace to put you into the negative so that you get out to get into the others now moving (to provide the market with more liquidity. They WANT you to get into a coin thats moving crazy hard so that they can then cease that movement once many fall for the trick just to then make that once strong looking coin now stagnant and make others move crazy hard. They wait for you to get out of the 1st and into the next set of movers just to do this time and time again bc hey, what are we sheep good for other than to provide the big guns with liquidity, am I right? Thats rhetorical, which you would know if you've ever had this happen to you (without a doubt MANY of you have). Let this script (above all other things) provide good evidence to back up this cynical way of viewing the markets to anyone that is questioning it.

This prolonged time between when the dump is over and when the ACTUAL movers REALLY start moving can actually be of great benefit to us sheep if used correctly, Firstly, it gives us some time to determine if when we thought was the bottom, ACTUALLY was the bottom. That bottom is easily determined if there are no (or very few) coins that went any lower than the point in time that the script began calculating on. Secondly, it allows us time to wait for the REAL movers and shakers to start moving and shaking.

One new feature that I LOVE that TV has implemented is the ability (once the script is added to the chart) to be able to click a point in time on the chart where you want the script to begin its calculations. If this point needs to be changed at any point in time then you can either go into the setting and input the time you wish or simply remove the script and add it again so that you are prompted to select another point in time. Ok, I think that everything I wanted to say. The next version that I will add will be probably my favorite and most used by yours truly...not to mention unique in a way that I have yet to see an implementation anything like it in all of TV's public library. Not to say its not there, but I have yet to come across it and I have DEFINITELY done my fair share of searching for it when I couldn't figure out how to code it for the longest time (though, I was and still am a noob so might get some great feedback on better ways to approach it, but we'll save that jabbering for the next of the publications.

I hope each and every one of ya'll (yes, Im from the South) have the GREATEST of Thanksgivings (if in the US that is...I graced my parents with the best gift anyone could have given them 35 years ago on Thanksgiving....MEEEE ;) So I will sure as hell be having a great holiday. Thanks for checking out my script...you can "like" and leave a comment if you so feel the urge to...or not. Im not doing this for me, but rather to stretch my arms out as far as possible to benefit the most people as possible and more people would see the script if it has more likes/comments/traffic pointing towards it...not to mention as other publishers have...it IS gratifying to see a few likes in my side window, which btw, I have MANY more variations and completely diff types of scanners/screeners Ill be publishing in the future and to know that they've become of use....I"VE become of use to the community is very....pleasing to me and does (as I've also seen many publishers mention as well) drive me to want to publish ones that I originally thought I would keep for myself. Peace out people.
코멘트
million1treding
هل يمكنك انشاء مؤشر يعمل للفئات الرقميه ساكون ممتننا لك بانتظار ردك
cyroblazer
Very nice logic for 40+ securities call. Fellow newbie pine scripter here and i chose this as my first after seeing quantmod's template and personal need for it now i am stuck with the memory allotment threshold error 🥲 maybe i will remove unnecessay functions which community requested or find some way to only those functions according to the input provided in settings.
Anyways Thanks For your Contributions and maybe i will be using some hybrid logic for your time function for tabling 40 + 40 securities if i will manage reducing the calculation overload.
Good Luck Mate !!!!
A_Traders_Edge
@cyroblazer, Ive fought with this a TON while really stretching the limits TV puts in place. Find me on telegram (with the same username) and id be happy to help you get through it by sharing anything I've learned in that regard....and i've learned a TON since this script. Perhaps we could both benefit from this as im working on a template and starting a youtube channel teaching others how to create their own edge by custom making their own Market Overview type of scripts. Could use some advice on best ways to go about things so come find me please....and thanks for the kind words. It really means a lot to know anyone has benefitted from anything I've shared.
jmnz1988
H= high
L = low
C=close
Spread = (H-L)
Avgspread = sma(spread, 40)
wideRangeBar = spread >(1.5 *Avgspread)
downclose = C<=((spread*0.3)+L)
Upthrust = wideRangeBar and downclose and H>H
How to create screenerfunc ()=> for Upthrust
A_Traders_Edge
@jmnz1988, Hi my friend, Im seeing mult issues with the code you presented. Why dont you tell me l what it is that your trying to screen for. Like, tell me the order flow of events. BTW was about to post a new scanner format that would work very well in your instance(not needing to have a buncha line plots on the screen.) Ill do it now but you should check it out later. Think youll like it.
jmnz1988
@chasinalts, it's VPA 5.0 INDICATOR (Karthikmarar)
first vsa signal for Upthrust I just need screener func code for Upthrust that's all I need
A_Traders_Edge
A_Traders_Edge
@jmnz1988, As per your request (as long as your scanning for coins on TFs the same as the chart is on then this will work)
//== INPUTS ==\\
len_sma = input.int(40, title="Avg Spread Smoothing Factor")
wr_mult = input.float(1.5, step=0.25, title="Wide Range Multiplier")
dc_mult = input.float(0.3, step=0.1, title="Downclose Multiplier")

//== FUNCTION ==\\
f_upThrust(h,l,c) =>
spread = h-l
avgSpread = ta.sma(spread, len_sma)
wideRangeBar = spread > (wr_mult*avgSpread)
downClose = c <= ((spread*dc_mult)+l)
Upthrust = wideRangeBar and downClose and h>h{1}

security(tID, timeframe.period, f_upThrust(high,low,close), barmerge.gaps_off, barmerge.lookahead_on, ignore_invalid_symbol=true)

oh and btw, the comments section always messes with indentation. so the 5 lines under "f_upThrust(h,l,c) =>" needs to indented with 4 spaces.

****And I see the issue with the h>h thing. the comment section also doesnt include the brackets that you type and excludes anything that were within the brackets. I will retype it with squiggly brackets but just know that you must convert them to regular brackets when you use the code. ALso make sure that the number between the brackets in the VSA code is 1 as I have put or change it to whatever else is in the original code.
jmnz1988
@chasinalts, very thanks bro I just need one more help
You were defined ' Upthrust ' bar and I also created same opposite logic to create ' No demand ' bar
When The real signal is generated
If detect NoDemand bar was detected the logic is also detect in previous 60 bars have Upthrust if not no demand is not valid
Can you please tell me how to create script ?
Will_And_Power
Hi @chasinalts I understand that %age change is based on under lying chart on tradingview. The script being screened show a different Pchnge with different scripts charts. How to ensure percent change happen on close and low of each coin/script? I tried adding other variables for close and low for function like below. But those may leads to more complexities.

_l_tID01=float(na)
_close_tID01=float(na)

Not sure if there could be a loop to call close(i),low(i),change(i) in a function. Let me know, if you have some idea, as I am not aware of clear syntax.
더보기