AI Adaptive Oscillator [PhenLabs]📊 Algorithmic Adaptive Oscillator    
 Version: PineScript™ v6   
 📌 Description   
The AI Adaptive Oscillator is a sophisticated technical indicator that employs ensemble learning and adaptive weighting techniques to analyze market conditions. This innovative oscillator combines multiple traditional technical indicators through an AI-driven approach that continuously evaluates and adjusts component weights based on historical performance. By integrating statistical modeling with machine learning principles, the indicator adapts to changing market dynamics, providing traders with a responsive and reliable tool for market analysis.  
 🚀 Points of Innovation:   
   
  Ensemble learning framework with adaptive component weighting  
  Performance-based scoring system using directional accuracy  
  Dynamic volatility-adjusted smoothing mechanism  
  Intelligent signal filtering with cooldown and magnitude requirements  
  Signal confidence levels based on multi-factor analysis  
   
 🔧 Core Components   
 Ensemble Framework : Combines up to five technical indicators with performance-weighted integration  
 Adaptive Weighting : Continuous performance evaluation with automated weight adjustment  
 Volatility-Based Smoothing : Adapts sensitivity based on current market volatility  
 Pattern Recognition : Identifies potential reversal patterns with signal qualification criteria  
 Dynamic Visualization : Professional color schemes with gradient intensity representation  
 Signal Confidence : Three-tiered confidence assessment for trading signals  
 🔥 Key Features   
The indicator provides comprehensive market analysis through:  
 Multi-Component Ensemble : Integrates RSI, CCI, Stochastic, MACD, and Volume-weighted momentum  
 Performance Scoring : Evaluates each component based on directional prediction accuracy  
 Adaptive Smoothing : Automatically adjusts based on market volatility  
 Pattern Detection : Identifies potential reversal patterns in overbought/oversold conditions  
 Signal Filtering : Prevents excessive signals through cooldown periods and minimum change requirements  
 Confidence Assessment : Displays signal strength through intuitive confidence indicators (average, above average, excellent)  
 🎨 Visualization   
 Gradient-Filled Oscillator : Color intensity reflects strength of market movement  
 Clear Signal Markers : Distinct bullish and bearish pattern signals with confidence indicators  
 Range Visualization : Clean representation of oscillator values from -6 to 6  
 Zero Line : Clear demarcation between bullish and bearish territory  
 Customizable Colors : Color schemes that can be adjusted to match your chart style  
 Confidence Symbols : Intuitive display of signal confidence (no symbol, +, or ++) alongside direction markers  
 📖 Usage Guidelines   
 ⚙️ Settings Guide   
 Color Settings   
 Bullish Color   
Default: #2b62fa (Blue)  
This setting controls the color representation for bullish movements in the oscillator. The color appears when the oscillator value is positive (above zero), with intensity indicating the strength of the bullish momentum. A brighter shade indicates stronger bullish pressure.  
 Bearish Color   
Default: #ce9851 (Amber)  
This setting determines the color representation for bearish movements in the oscillator. The color appears when the oscillator value is negative (below zero), with intensity reflecting the strength of the bearish momentum. A more saturated shade indicates stronger bearish pressure.  
 Signal Settings   
 Signal Cooldown (bars)   
Default: 10  
Range: 1-50  
This parameter sets the minimum number of bars that must pass before a new signal of the same type can be generated. Higher values reduce signal frequency and help prevent overtrading during choppy market conditions. Lower values increase signal sensitivity but may generate more false positives.  
 Min Change For New Signal   
Default: 1.5  
Range: 0.5-3.0  
This setting defines the minimum required change in oscillator value between consecutive signals of the same type. It ensures that new signals represent meaningful changes in market conditions rather than minor fluctuations. Higher values produce fewer but potentially higher-quality signals, while lower values increase signal frequency.  
 AI Core Settings   
 Base Length   
Default: 14  
Minimum: 2  
This fundamental setting determines the primary calculation period for all technical components in the ensemble (RSI, CCI, Stochastic, etc.). It represents the lookback window for each component’s base calculation. Shorter periods create a more responsive but potentially noisier oscillator, while longer periods produce smoother signals with potential lag.  
 Adaptive Speed   
Default: 0.1  
Range: 0.01-0.3  
Controls how quickly the oscillator adapts to new market conditions through its volatility-adjusted smoothing mechanism. Higher values make the oscillator more responsive to recent price action but potentially more erratic. Lower values create smoother transitions but may lag during rapid market changes. This parameter directly influences the indicator’s adaptiveness to market volatility.  
 Learning Lookback Period   
Default: 150  
Minimum: 10  
Determines the historical data range used to evaluate each ensemble component’s performance and calculate adaptive weights. This setting controls how far back the AI “learns” from past performance to optimize current signals. Longer periods provide more stable weight distribution but may be slower to adapt to regime changes. Shorter periods adapt more quickly but may overreact to recent anomalies.  
 Ensemble Size   
Default: 5  
Range: 2-5  
Specifies how many technical components to include in the ensemble calculation.   
 Understanding The Interaction Between Settings   
 Base Length and Learning Lookback : The base length determines the reactivity of individual components, while the lookback period determines how their weights are adjusted. These should be balanced according to your timeframe - shorter timeframes benefit from shorter base lengths, while the lookback should generally be 10-15 times the base length for optimal learning.  
 Adaptive Speed and Signal Cooldown : These settings control sensitivity from different angles. Increasing adaptive speed makes the oscillator more responsive, while reducing signal cooldown increases signal frequency. For conservative trading, keep adaptive speed low and cooldown high; for aggressive trading, do the opposite.  
 Ensemble Size and Min Change : Larger ensembles provide more stable signals, allowing for a lower minimum change threshold. Smaller ensembles might benefit from a higher threshold to filter out noise.  
 Understanding Signal Confidence Levels   
The indicator provides three distinct confidence levels for both bullish and bearish signals:  
 Average Confidence (▲ or ▼) : Basic signal that meets the minimum pattern and filtering criteria. These signals indicate potential reversals but with moderate confidence in the prediction. Consider using these as initial alerts that may require additional confirmation.  
 Above Average Confidence (▲+ or ▼+) : Higher reliability signal with stronger underlying metrics. These signals demonstrate greater consensus among the ensemble components and/or stronger historical performance. They offer increased probability of successful reversals and can be traded with less additional confirmation.  
 Excellent Confidence (▲++ or ▼++) : Highest quality signals with exceptional underlying metrics. These signals show strong agreement across oscillator components, excellent historical performance, and optimal signal strength. These represent the indicator’s highest conviction trade opportunities and can be prioritized in your trading decisions.  
Confidence assessment is calculated through a multi-factor analysis including:  
   
  Historical performance of ensemble components  
  Degree of agreement between different oscillator components  
  Relative strength of the signal compared to historical thresholds  
   
 ✅ Best Use Cases:   
   
  Identify potential market reversals through oscillator extremes  
  Filter trade signals based on AI-evaluated component weights  
  Monitor changing market conditions through oscillator direction and intensity  
  Confirm trade signals from other indicators with adaptive ensemble validation  
  Detect early momentum shifts through pattern recognition  
  Prioritize trading opportunities based on signal confidence levels  
  Adjust position sizing according to signal confidence (larger for ++ signals, smaller for standard signals)  
   
 ⚠️ Limitations   
   
  Requires sufficient historical data for accurate performance scoring  
  Ensemble weights may lag during dramatic market condition changes  
  Higher ensemble sizes require more computational resources  
  Performance evaluation quality depends on the learning lookback period length  
  Even high confidence signals should be considered within broader market context  
   
 💡 What Makes This Unique   
 Adaptive Intelligence : Continuously adjusts component weights based on actual performance  
 Ensemble Methodology : Combines strength of multiple indicators while minimizing individual weaknesses  
 Volatility-Adjusted Smoothing : Provides appropriate sensitivity across different market conditions  
 Performance-Based Learning : Utilizes historical accuracy to improve future predictions  
 Intelligent Signal Filtering : Reduces noise and false signals through sophisticated filtering criteria  
 Multi-Level Confidence Assessment : Delivers nuanced signal quality information for optimized trading decisions  
 🔬 How It Works   
The indicator processes market data through five main components:  
 Ensemble Component Calculation :  
   
  Normalizes traditional indicators to consistent scale  
  Includes RSI, CCI, Stochastic, MACD, and volume components  
  Adapts based on the selected ensemble size  
   
 Performance Evaluation :  
   
  Analyzes directional accuracy of each component  
  Calculates continuous performance scores  
  Determines adaptive component weights  
   
 Oscillator Integration :  
   
  Combines weighted components into unified oscillator  
  Applies volatility-based adaptive smoothing  
  Scales final values to -6 to 6 range  
   
 Signal Generation :  
   
  Detects potential reversal patterns  
  Applies cooldown and magnitude filters  
  Generates clear visual markers for qualified signals  
   
 Confidence Assessment :  
   
  Evaluates component agreement, historical accuracy, and signal strength  
  Classifies signals into three confidence tiers (average, above average, excellent)  
  Displays intuitive confidence indicators (no symbol, +, ++) alongside direction markers  
   
 💡 Note:   
The AI Adaptive Oscillator performs optimally when used with appropriate timeframe selection and complementary indicators. Its adaptive nature makes it particularly valuable during changing market conditions, where traditional fixed-weight indicators often lose effectiveness. The ensemble approach provides a more robust analysis by leveraging the collective intelligence of multiple technical methodologies. Pay special attention to the signal confidence indicators to optimize your trading decisions - excellent (++) signals often represent the most reliable trade opportunities.   
Ensemble
Alerts█  OVERVIEW 
This library is a Pine Script™ programmers tool that provides functions to simplify the creation of compound conditions and alert messages. With these functions, scripts can use comma-separated "string" lists to specify condition groups from arbitrarily large "bool"  arrays , offering a convenient way to provide highly flexible alert creation to script users without requiring numerous inputs in the "Settings/Inputs" menu. 
 █  CONCEPTS 
 Compound conditions 
 Compound conditions  are essentially groups of two or more conditions, where each required condition must occur to produce a `true` result. Traders often combine conditions, including signals from various indicators, to drive and reinforce trade decisions. Similarly, programmers use compound conditions in logical operations to create scripts that respond dynamically to groups of events. 
 Condition conundrum 
Providing flexible condition combinations to script users for signals and alerts often poses a significant challenge:  input complexity . Conventionally, such flexibility comes at the cost of an extensive list of separate inputs for toggling individual conditions and customizing their properties, often resulting in complicated input menus that are difficult for users to navigate effectively. Furthermore, managing all those inputs usually entails tediously handling many extra variables and logical expressions, making such projects more complex for programmers. 
 Condensing complexity 
This library introduces a technique using parsed strings to reference groups of elements from "bool"  arrays , helping to simplify and streamline the construction of compound conditions and alert messages. With this approach, programmers can provide one or more "string" inputs in their scripts where users can  list numbers  corresponding to the conditions they want to combine. 
For example, suppose you have a script that creates alert triggers based on a combination of up to 20 individual conditions, and you want to make inputs for users to choose which conditions to combine. Instead of creating 20 separate checkboxes in the "Settings/Inputs" tab and manually adding associated logic for each one, you can store the conditional values in arrays, make one or more "string" inputs that accept values listing the array item locations (e.g., "1,4,8,11"), and then pass the inputs to these functions to determine the compound conditions formed by the specified groups. 
This approach condenses the input space, improving navigability and utility. Additionally, it helps provide high-level simplicity to complex conditional code, making it easier to maintain and expand over time. 
 █  CALCULATIONS AND USE 
This library contains three functions for evaluating compound conditions: `getCompoundConditon()`, `getCompoundConditionsArray()`, and `compoundAlertMessage()`. Each function has two overloads that evaluate compound conditions based on groups of items from one or two "bool"  arrays . The sections below explain the functions' calculations and how to use them. 
 Referencing conditions using "string" index lists 
Each function processes "string" values containing comma-separated lists of  numerals  representing the  indices  of the "bool" array items to use in its calculations (e.g., "4, 8, 12"). The functions split each supplied "string" list by its commas, then iterate over those specified indices in the "bool" arrays to determine each group's combined `true` or `false` state. 
For convenience, the numbers in the "string" lists can represent  zero-based  indices (where the first item is at index 0) or  one-based  indices (where the first item is at index 1), depending on the function's `zeroIndex` parameter. For example, an index list of "0, 2, 4" with a `zeroIndex` value of `true` specifies that the condition group uses the  first ,  third , and  fifth  "bool" values in the array, ignoring all others. If the `zeroIndex` value is `false`, the list "1, 3, 5" also refers to those same elements.
Zero-based indexing is convenient for programmers because Pine arrays always use this index format. However, one-based indexing is often more convenient and familiar for script users, especially non-programmers.
 Evaluating one or many condition groups 
The `getCompoundCondition()` function evaluates  singular  condition groups determined by its `indexList` parameter, returning `true` values whenever the specified array elements are `true`. This function is helpful when a script has to evaluate specific groups of conditions and does not require many combinations. 
In contrast, the `getCompoundConditionsArray()` function can evaluate  numerous  condition groups, one for each "string" included in its `indexLists` argument. It returns arrays containing `true` or `false` states for each listed group. This function is helpful when a script requires multiple condition combinations in additional calculations or logic. 
The `compoundAlertMessage()` function is similar to the `getCompoundConditionsArray()` function. It also evaluates a separate compound condition group for each "string" in its `indexLists` array, but it returns "string" values containing the  marker (name)  of each group with a `true` result. You can use these returned values as the `message` argument in  alert()  calls, display them in  labels  and other drawing objects, or even use them in additional calculations and logic.  
 Directional condition pairs 
The first overload of each function operates on a single `conditions` array, returning values representing one or more compound conditions from groups in that array. These functions are ideal for general-purpose condition groups that may or may not represent direction information. 
The second overloads accept  two  arrays representing upward and downward conditions separately: `upConditions` and `downConditions`. These overloads evaluate opposing directional conditions in  pairs  (e.g., RSI is above/below a level) and return upward and downward condition information separately in a  tuple . 
When using the directional overloads, ensure the `upConditions` and `downConditions` arrays are the same size, with the intended condition pairs at the  same indices . For instance, if you have a specific upward RSI condition's value at the first index in the `upConditions` array, include the opposing downward RSI condition's value at that same index in the `downConditions` array. If a condition can apply to  both  directions (e.g., rising volume), include its value at the same index in both arrays. 
 Group markers 
To simplify the generation of informative alert messages, the `compoundAlertMessage()` function assigns "string"  markers  to each condition group, where "marker" refers to the group's name. The `groupMarkers` parameter allows you to assign custom markers to each listed group. If not specified, the function generates default group markers in the format "M", where "M" is short for "Marker" and "" represents the  group number  starting from 1. For example, the default marker for the first group specified in the `indexLists` array is "M1". 
The function's returned "string" values contain a comma-separated list with markers for each activated condition group (e.g., "M1, M4"). The function's second overload, which processes directional pairs of conditions, also appends  extra  characters to the markers to signify the direction. The default for upward groups is "▲" (e.g., "M1▲") and the default for downward ones is "▼" (e.g., "M1▼"). You can customize these appended characters with the `upChar` and `downChar` parameters. 
 Designing customizable alerts 
We recommend following these primary steps when using this library to design flexible alerts for script users:
 1. Create text inputs for users to specify comma-separated lists of conditions with the  input.string()  or  input.text_area()  functions, and then collect all the input values in a "string"  array . Note that each separate "string" in the array will represent a  distinct  condition group. 
 2. Create arrays of "bool" values representing the possible conditions to choose from. If your script will process  pairs  of upward and downward conditions, ensure the related elements in the arrays align at the same indices. 
 3. Call `compoundAlertMessage()` using the arrays from steps 1 and 2 as arguments to get the alert message text. If your script will use the text for alerts only,  not  historical display or calculation purposes, the call is necessary only on  realtime bars .
 4. Pass the calculated "string" values as the `message` argument in  alert()  calls. We recommend calling the function only when the "string" is  not empty  (i.e., `messageText != ""`). To avoid repainting alerts on open bars, use  barstate.isconfirmed  in the condition to allow alert triggers only on each bar's  close .  
 5. Test the alerts. Open the "Create Alert" dialog box and select  "Any alert() function call"  in the "Condition" field. It is also helpful to inspect the strings with  Pine Logs .
NOTE: Because the techniques in this library use lists of numbers to specify conditions, we recommend including a  tooltip  for the "string" inputs that lists the available numbers and the conditions they represent. This tooltip provides a  legend  for script users, making it simple to understand and utilize. To create the tooltip, declare a "const string" listing the options and pass it to the `input.*()` call's `tooltip` parameter. See the library's example code for a simple demonstration. 
 █  EXAMPLE CODE 
This library's example code demonstrates one possible way to offer a selection of compound conditions with "string" inputs and these functions. It uses three  input.string()  calls, each accepting a comma-separated list representing a distinct condition group. The title of each input represents the default  group marker  that appears in the label and alert text. The code collects these three input values in a `conditionGroups` array for use with the `compoundAlertMessage()` function.
In this code, we created two "bool" arrays to store six arbitrary condition pairs for demonstration:
 1.  Bar up/down:  The bar's  close  price must be above the  open  price for upward conditions, and vice versa for downward conditions. 
 2.  Fast EMA above/below slow EMA : The 9-period Exponential Moving Average of  close  prices must be above the 21-period EMA for upward conditions, and vice versa for downward conditions. 
 3.  Volume above average : The bar's  volume  must exceed its 20-bar average to activate an upward or downward condition. 
 4.  Volume rising : The  volume  must exceed that of the previous bar to activate an upward or downward condition. 
 5.  RSI trending up/down : The 14-period Relative Strength Index of  close  prices must be between 50 and 70 for upward conditions, and between 30 and 50 for downward conditions. 
 6.  High volatility : The 7-period Average True Range (ATR) must be above the 40-period ATR to activate an upward or downward condition.  
We included a `tooltip` argument for the third  input.string()  call that displays the condition numbers and titles, where 1 is the first condition number. 
The `bullConditions` array contains the `true` or `false` states of all individual upward conditions, and the `bearConditions` array contains all downward condition states. For the conditions that filter either direction because they are non-directional, such as "High volatility", both arrays contain the condition's `true` or `false` value at the same index. If you use these conditions alone, they activate upward and downward alert conditions simultaneously. 
The example code calls `compoundAlertMessage()` using the `bullConditions`, `bearConditions`, and `conditionGroups` arrays to create a  tuple  of strings containing the directional markers for each activated group. On  confirmed  bars, it displays non-empty strings in  labels  and uses them in  alert()  calls. For the text shown in the labels, we used  str.replace_all()  to replace commas with newline characters, aligning the markers vertically in the display.  
 Look first. Then leap. 
 █  FUNCTIONS 
This library exports the following functions:
 getCompoundCondition(conditions, indexList, minRequired, zeroIndex) 
  (Overload 1 of 2) Determines a compound condition based on selected elements from a `conditions` array.
  Parameters:
     conditions (array) : (array) An array containing the possible "bool" values to use in the compound condition.
     indexList (string) : (series string) A "string" containing a comma-separated list of whole numbers representing the group of `conditions` elements to use in the compound condition. For example, if the value is `"0, 2, 4"`, and `minRequired` is `na`, the function returns `true` only if the `conditions` elements at index 0, 2, and 4 are all `true`. If the value is an empty "string", the function returns `false`.
     minRequired (int) : (series int) Optional. Determines the minimum number of selected conditions required to activate the compound condition. For example, if the value is 2, the function returns `true` if at least two of the specified `conditions` elements are `true`. If the value is `na`, the function returns `true` only if all specified elements are `true`. The default is `na`.
     zeroIndex (bool) : (series bool) Optional. Specifies whether the `indexList` represents zero-based array indices. If `true`, a value of "0" in the list represents the first array index. If `false`, a `value` of "1" represents the first index. The default is `true`.
  Returns: (bool) `true` if `conditions` elements in the group specified by the `indexList` are `true`, `false` otherwise.
 getCompoundCondition(upConditions, downConditions, indexList, minRequired, allowUp, allowDown, zeroIndex) 
  (Overload 2 of 2) Determines upward and downward compound conditions based on selected elements from `upConditions` and `downConditions` arrays.
  Parameters:
     upConditions (array) : (array) An array containing the possible "bool" values to use in the upward compound condition.
     downConditions (array) : (array) An array containing the possible "bool" values to use in the downward compound condition.
     indexList (string) : (series string) A "string" containing a comma-separated list of whole numbers representing the `upConditions` and `downConditions` elements to use in the compound conditions. For example, if the value is `"0, 2, 4"` and `minRequired` is `na`, the function returns `true` for the first value only if the `upConditions` elements at index 0, 2, and 4 are all `true`. If the value is an empty "string", the function returns ` `.
     minRequired (int) : (series int) Optional. Determines the minimum number of selected conditions required to activate either compound condition. For example, if the value is 2, the function returns `true` for its first value if at least two of the specified `upConditions` elements are `true`. If the value is `na`, the function returns `true` only if all specified elements are `true`. The default is `na`.
     allowUp (bool) : (series bool) Optional. Controls whether the function considers upward compound conditions. If `false`, the function ignores the `upConditions` array, and the first item in the returned tuple is `false`. The default is `true`.
     allowDown (bool) : (series bool) Optional. Controls whether the function considers downward compound conditions. If `false`, the function ignores the `downConditions` array, and the second item in the returned tuple is `false`. The default is `true`.
     zeroIndex (bool) : (series bool) Optional. Specifies whether the `indexList` represents zero-based array indices. If `true`, a value of "0" in the list represents the first array index. If `false`, a value of "1" represents the first index. The default is `true`.
  Returns: ( ) A tuple containing two "bool" values representing the upward and downward compound condition states, respectively.
 getCompoundConditionsArray(conditions, indexLists, zeroIndex) 
  (Overload 1 of 2) Creates an array of "bool" values representing compound conditions formed by selected elements from a `conditions` array.
  Parameters:
     conditions (array) : (array) An array containing the possible "bool" values to use in each compound condition.
     indexLists (array) : (array) An array of strings containing comma-separated lists of whole numbers representing the `conditions` elements to use in each compound condition. For example, if an item is `"0, 2, 4"`, the corresponding item in the returned array is `true` only if the `conditions` elements at index 0, 2, and 4 are all `true`. If an item is an empty "string", the item in the returned array is `false`.
     zeroIndex (bool) : (series bool) Optional. Specifies whether the "string" lists in the `indexLists` represent zero-based array indices. If `true`, a value of "0" in a list represents the first array index. If `false`, a value of "1" represents the first index. The default is `true`.
  Returns: (array) An array of "bool" values representing compound condition states for each condition group. An item in the array is `true` only if all the `conditions` elements specified by the corresponding `indexLists` item are `true`. Otherwise, the item is `false`.
 getCompoundConditionsArray(upConditions, downConditions, indexLists, allowUp, allowDown, zeroIndex) 
  (Overload 2 of 2) Creates two arrays of "bool" values representing compound upward and
downward conditions formed by selected elements from `upConditions` and `downConditions` arrays.
  Parameters:
     upConditions (array) : (array) An array containing the possible "bool" values to use in each upward compound condition.
     downConditions (array) : (array) An array containing the possible "bool" values to use in each downward compound condition.
     indexLists (array) : (array) An array of strings containing comma-separated lists of whole numbers representing the `upConditions` and `downConditions` elements to use in each compound condition. For example, if an item is `"0, 2, 4"`, the corresponding item in the first returned array is `true` only if the `upConditions` elements at index 0, 2, and 4 are all `true`. If an item is an empty "string", the items in both returned arrays are `false`.
     allowUp (bool) : (series bool) Optional. Controls whether the function considers upward compound conditions. If `false`, the function ignores the `upConditions` array, and all elements in the first returned array are `false`. The default is `true`.
     allowDown (bool) : (series bool) Optional. Controls whether the function considers downward compound conditions. If `false`, the function ignores the `downConditions` array, and all elements in the second returned array are `false`. The default is `true`.
     zeroIndex (bool) : (series bool) Optional. Specifies whether the "string" lists in the `indexLists` represent zero-based array indices. If `true`, a value of "0" in a list represents the first array index. If `false`, a value of "1" represents the first index. The default is `true`.
  Returns: ( ) A tuple containing two "bool" arrays:
- The first array contains values representing upward compound condition states determined using the `upConditions`.
- The second array contains values representing downward compound condition states determined using the `downConditions`.
 compoundAlertMessage(conditions, indexLists, zeroIndex, groupMarkers) 
  (Overload 1 of 2) Creates a "string" message containing a comma-separated list of markers representing active compound conditions formed by specified element groups from a `conditions` array.
  Parameters:
     conditions (array) : (array) An array containing the possible "bool" values to use in each compound condition.
     indexLists (array) : (array) An array of strings containing comma-separated lists of whole numbers representing the `conditions` elements to use in each compound condition. For example, if an item is `"0, 2, 4"`, the corresponding marker for that item appears in the returned "string" only if the `conditions` elements at index 0, 2, and 4 are all `true`.
     zeroIndex (bool) : (series bool) Optional. Specifies whether the "string" lists in the `indexLists` represent zero-based array indices. If `true`, a value of "0" in a list represents the first array index. If `false`, a value of "1" represents the first index. The default is `true`.
     groupMarkers (array) : (array) Optional. If specified, sets the marker (name) for each condition group specified in the `indexLists` array. If `na`, the function uses the format `"M"` for each group, where "M" is short for "Marker" and `` represents the one-based index for the group (e.g., the marker for the first listed group is "M1"). The default is `na`.
  Returns: (string) A "string" containing a list of markers corresponding to each active compound condition.
 compoundAlertMessage(upConditions, downConditions, indexLists, allowUp, allowDown, zeroIndex, groupMarkers, upChar, downChar) 
  (Overload 2 of 2) Creates two "string" messages containing comma-separated lists of markers representing active upward and downward compound conditions formed by specified element groups from `upConditions` and `downConditions` arrays. 
  Parameters:
     upConditions (array)  An array containing the possible "bool" values to use in each upward compound condition.
     downConditions (array)  An array containing the possible "bool" values to use in each downward compound condition.
     indexLists (array)  An array of strings containing comma-separated lists of whole numbers representing the `upConditions` and `downConditions` element groups to use in each compound condition. For example, if an item is `"0, 2, 4"`, the corresponding group marker for that item appears in the first returned "string" only if the `upConditions` elements at index 0, 2, and 4 are all `true`.
     allowUp (bool)  Optional. Controls whether the function considers upward compound conditions. If `false`, the function ignores the `upConditions` array and returns an empty "string" for the first tuple element. The default is `true`.
     allowDown (bool)  Optional. Controls whether the function considers downward compound conditions. If `false`, the function ignores the `downConditions` array and returns an empty "string" for the second tuple element. The default is `true`.
     zeroIndex (bool)  Optional. Specifies whether the "string" lists in the `indexLists` represent zero-based array indices. If `true`, a value of "0" in a list represents the first array index. If `false`, a value of "1" represents the first index. The default is `true`.
     groupMarkers (array)  Optional. If specified, sets the name (marker) of each condition group specified in the `indexLists` array. If `na`, the function uses the format `"M"` for each group, where "M" is short for "Marker" and `` represents the one-based index for the group (e.g., the marker for the first listed group is "M1"). The default is `na`.
     upChar (string)  Optional. A "string" appended to all group markers for upward conditions to signify direction. The default is "▲".
     downChar (string)  Optional. A "string" appended to all group markers for downward conditions to signify direction. The default is "▼".
  Returns: ( ): A tuple of "string" values containing lists of markers corresponding to active upward and downward compound conditions, respectively. 

