Library "COM_Scanner_Library" - A Trader's Edge (ATE)_Library was created to assist in constructing COM Scanners
TickerIDs(_string) TickerIDs: You must form this single tickerID input string exactly as described in the scripts info panel (little gray 'i' that is circled at the end of the settings in the settings/input panel that you can hover your cursor over this 'i' to read the details of that particular input). IF the string is formed correctly then it will break up this single string parameter into a total of 40 separate strings which will be all of the tickerIDs that the script is using in your COM Scanner. Parameters: _string (simple string): (string) A maximum of 40 Tickers (ALL joined as 1 string for the input parameter) that is formulated EXACTLY as described within the tooltips of the TickerID inputs in my COM Scanner scripts: assets = input.text_area(tIDs, title="TickerIDs (MUST READ TOOLTIP)", group=g2, tooltip="Accepts 40 TICKERID's for each copy of the script on the chart. \n\n*** MUST FORMAT THIS WAY ***\n\n Each FULL tickerID (ie 'Exchange:ticker') must be separated by A SINGLE BLANK SPACE for correct formatting. The blank space tells the script where to break off the ticker to assign it to a variable to be used later in the script. So this input will be a single string constructed from up to 40 tickerID's with a space between each tickerID (ie. 'BINANCE:BTCUSDT BINANCE:SXPUSDT BINANCE:XRPUSDT').", display=display.none)
Returns: Returns 40 output variables in the tuple (ie. between the '[]') with the separated TickerIDs,
Locations(_firstLocation) Locations: This function is used when there's a desire to print an assets ALERT LABELS. A set Location on the scale is assigned to each asset. This is created so that if a lot of alerts are triggered, they will stay relatively visible and not overlap each other. If you set your '_firstLocation' parameter as 1, since there are a max of 40 assets that can be scanned, the 1st asset's location is assigned the value in the '_firstLocation' parameter, the 2nd asset's location is the (1st asset's location+1)...and so on. Parameters: _firstLocation (simple int): (simple int) Optional (starts at 1 if no parameter added). Location that you want the first asset to print its label if is triggered to do so. ie. loc2=loc1+1, loc3=loc2+1, etc.
Returns: Returns 40 variables for the locations for alert labels
LabelSize(_barCnt, _lblSzRfrnce) INVALID TICKERIDs: This is to add a table in the middle right of your chart that prints all the TickerID's that were either not formulated correctly in the '_source' input or that is not a valid symbol and should be changed.
LABEL SIZES: This function sizes your Alert Trigger Labels according to the amount of Printed Bars the chart has printed within a set time period, while also keeping in mind the smallest relative reference size you input in the 'lblSzRfrnceInput' parameter of this function. A HIGHER % of Printed Bars(aka...more trades occurring for that asset on the exchange), the LARGER the Name Label will print, potentially showing you the better opportunities on the exchange to avoid exchange manipulation liquidations. *** SHOULD NOT be used as size of labels that are your asset Name Labels next to each asset's Line Plot... if your COM Scanner includes these as you want these to be the same size for every asset so the larger ones dont cover the smaller ones if the plots are all close to each other *** Parameters: _barCnt (float): (float) Get the 1st variable('barCnt') from the Security function's tuple and input it as this functions 1st input parameter which will directly affect the size of the 2nd output variable ('alertTrigLabel') that is also outputted by this function.
_lblSzRfrnce (string): (string) Optional (if parameter not included, it defaults to size.small). This will be the size of the variable outputted by this function named 'assetNameLabel' BUT also affects the size of the output variable 'alertTrigLabel' as it uses this parameter's size as the smallest size for 'alertTrigLabel' then uses the '_barCnt' parameter to determine the next sizes up depending on the "_barCnt" value.
Returns: ([string,string]) Returns 2 variables: 1st output variable ('AssetNameLabel') is assigned to the size of the 'lblSzRfrnceInput' parameter. 2nd output variable('alertTrigLabel') can be of variying sizes depending on the 'barCnt' parameter...BUT the smallest size possible for the 2nd output variable ('alertTrigLabel') will be the size set in the 'lblSzRfrnceInput' parameter.
PrintedBarCount(_time, _barCntLength, _barCntPercentMin) The Printed BarCount Filter looks back a User Defined amount of minutes and calculates the % of bars that have printed out of the TOTAL amount of bars that COULD HAVE been printed within the same amount of time. Parameters: _time (int): (int) The time associated with the chart of the particular asset that is being screened at that point.
_barCntLength (int): (int) The amount of time (IN MINUTES) that you want the logic to look back at to calculate the % of bars that have actually printed in the span of time you input into this parameter.
_barCntPercentMin (int): (int) The minimum % of Printed Bars of the asset being screened has to be GREATER than the value set in this parameter for the output variable 'bc_gtg' to be true.
Returns: ([float, bool]) Returns 2 outputs: 1st is the % of Printed Bars that have printed within the within the span of time you input in the '_barCntLength' parameter. 2nd is true/false according to if the Printed BarCount % is above the threshold that you input into the '_barCntPercentMin' parameter.
진정한 TradingView 정신에 따라, 저자는 이 파인 코드를 다른 파인 프로그래머들이 재사용할 수 있도록 오픈 소스 라이브러리로 공개했습니다. 저자에게 박수를 보냅니다! 이 라이브러리는 개인적으로 사용하거나 다른 오픈 소스 출판물에서 사용할 수 있지만, 이 코드를 출판물에서 재사용하는 것은 하우스 룰에 의해 관리됩니다.