INVITE-ONLY SCRIPT

Strategy - Plus / Connectable [Azullian]

Discover the advanced capabilities of Strategy Plus, an essential component of the connectable indicator system designed for fast-paced strategy testing, visualization, and building within TradingView. This enhanced version of our foundational connectable strategy indicator seamlessly integrates with all connectable indicators. By utilizing the TradingView input source as a signal connector, it facilitates the linking of indicators to form a cohesive strategy. Each connectable indicator within the system sends signal weight to the next node, culminating in a comprehensive strategy that incorporates advanced customization options, sophisticated signal interpretation, and elaborate backtest labeling. Strategy Plus stands out by offering improved position management and extensive alert messaging capabilities, ensuring effective strategy refinement and backend integration.

█ DISTINCTIVE FEATURES
The Connectable Strategy Plus enhances risk mitigation within the connectable system through its advanced features and capabilities:
 • Refined Signal Input Management: Tailor and precisely connect up to two signal filters with enhanced input flexibility, gain control, and strategic direction settings.
 • Strategic Position Investment Control: Optimize positioning with versatile investment bases, custom investment percentages, and direction-specific investments for effective risk management.
 • Advanced Exit Stop Loss Configuration: Implement custom stop loss tactics with diverse base modes and trailing options for tailored risk management.
 • Strategic Exit Take Profit Settings: Apply precision-driven take profit strategies with various calculation modes and dynamic trailing functionality.
 • Calibrated Entry Position Allocation: Optimize investment distribution for entry positions, including DCA and BRO trades, for strategic market response.
 • Refined Order Setting Customization: Ensure exchange compliance with adjustable order settings, enhancing backtest accuracy and strategy reliability.
 • Comprehensive Condition Settings: Define precise conditions for strategy execution, including date range filtering and order/loss limitations.
 • Intuitive Visualization: Enhance strategy clarity with customizable visual elements and trade visualization features.
 • Advanced Alert Configurations: Stay informed with comprehensive and customizable alerts for effective backend integration.
 • Backend Integration With JSON Format: Leverage elaborate and structured data in JSON format for advanced analytics, enhancing decision-making and strategy optimization outside TradingView.

Let's review the separate parts of this indicator.


█ STRATEGY INPUTS

We've provided 2 inputs for connecting a signal filter or indicators or chains (1→, 2→) which are all set to 'Close' by default.

syot kilat

An input has several controls:
 • Enable disable: Toggle the entire input on or off
 • Input: Connect indicators or signal filter here, choose indicators with a compatible : Signal connector.
 • G - Gain: Increase or reduce the strength of the incoming signal by a factor.
 • SM - Signal Mode: Choose a trading direction compatible with the settings in your signal filter
 • XM - Exit Mode: Determine when to allow to exit your open trade
    ○ Always: Doesn't take the restrictions into account, this ignores all the settings chosen in ML or MP
    ○ Restricted: Use both ML and MP conditions
    ○ Loss: Use the ML condition only, for example: Position will be exited and the exit signal will be allowed only when the loss exceeds the ML parameter
    ○ Profit: Use the MP condition only for example: Exits will only be allowed when the profit of the position exceeds the condition of the MP parameter



POSITION INVESTMENT
Determine the percentage of your trading budget you would like to use in each position based on the strategy's profit or loss.

syot kilat

 • LINVB - Loss Investment Base: Choose which base to use to determine the investment percentage when the strategy is in a loss.
    ○ Equity: Use the equity as the base for percentage calculation.
    ○ Initial capital: Use the initial capital as the base for percentage calculation.
 • LINV% - Loss Investment Percentage: Set a percentage of the chosen investment base as the investment for a new position.
    ○ For example, when 10% in loss, and a initial capital of $100, and the investment base is set to equity with a percentage of 50%, your investment will be 50% of $90, $45.

 • PINVB - Profit Investment Base: Choose which base to use to determine the investment percentage when the strategy is in profit.
    ○ Equity: Use the equity as the base for percentage calculation.
    ○ Initial capital: Use the initial capital as the base for percentage calculation.
 • PINV% - Profit Investment Percentage: Set a percentage of the chosen investment base as the investment for a new position.
    ○ For example, when 10% in profit, and an initial capital of $100, and the investment base is set to equity with a percentage of 100%, your investment will be 100% of $110, $110.

 • XINVB - Custom Profit Investment Base: Choose which base to use to determine the investment percentage when the strategy is above a custom profit threshold (XT).
    ○ Equity: Use the equity as the base for percentage calculation.
    ○ Initial capital: Use the initial capital as the base for percentage calculation.
 • XINV% - Custom Profit Investment Percentage: Set a percentage of the chosen investment base as the investment for a new position.
    ○ For example, when 100% in profit, exceeding the XT threshold of 50%, and an initial capital of $100, and the investment base is set to equity with a percentage of 50%, your investment will be 50% of $200, $100.
 • XT% - Custom Profit Threshold: Determine how much profit triggers these custom profit investment settings.

 • ELIB% - Entry Long Investment Base: Following previous settings, you can further restrict the investment according to the long trading direction.
    ○ For instance, if the previous calculation resulted in $45 to be used as an investment, and you've set the ELIB% to 50%, your long position will use 50% of $45, which is $22.5.
 • ESIB% - Entry Short Investment Base: Following previous settings, you can further restrict the investment according to the short trading direction.
    ○ For example, if the previous calculation resulted in $45 to be used as an investment, and you've set the ESIB% to 50%, your short position will use 50% of $45, which is $22.5.

 • RISK% - Risk Percentage:
    ○ Determine how much of the calculated position investment is at risk when the stop-loss is hit.
        - For example, 1% of $45 represents a maximum loss of $0.45.
    ○ Risk percentage works together with the stop loss and the max leverage.
 • MXLVG - Maximum Leverage:
    ○ Investigate the trading rules for your trading pair and use the maximum allowed amount of leverage.
    ○ To determine the number of contracts to be bought or sold, considering the stop loss and the specified risk percentage, the maximum leverage available will constrain the amount of leverage utilized to ensure that the maximum risk threshold is not exceeded. For instance, suppose the stop loss is set at 1%, and the risk percentage is defined as 10%. Initially, the calculated leverage to be used would be 10. However, if there is a maximum leverage cap set at 5, it would constrain the calculated leverage of 10 to adhere to the maximum limit of 5.



EXIT STOP LOSS
Determine the Stop Loss price based on your selected configuration.
As the stop loss is an integral part of the ordered contracts calculation used in conjunction with the Risk and Max leverage, you'll always need to provide a stop loss price.

syot kilat


 • SLLB - Stop Loss Long Base: Choose a stop loss mode for calculating stop loss prices in long positions.
    ○ Risk: Determines the price using the Risk parameter (RISK%) and maximum leverage (MXLVG). In this case, SLLB% will not have any impact.
    ○ Price Entry + Offset: Calculates the stop loss price based on a offset percentage (SLLB%) from the entry price of the position.
    ○ Source: Computes the stop loss price based on an external indicator defined in SLLSRC.
        - If this results in an invalid price, the calculation will revert to using the price entry + offset.
    ○ Source + Offset: Determines the stop loss price based on a positive or negative offset percentage (SLLB%) from an external indicator defined in SLLSRC.
        - If this results in an invalid price, the calculation will fall back to using the price entry + offset.

 • SLLB% - Stop Loss Long Base Percentage: Define an offset percentage that will be applied in the price entry + offset and source + offset stop loss modes.
 • SLLSRC - Stop Loss Long Source: Connect an external indicator as the source for stop loss (only those providing price values eg: bollinger bands, moving averages...).

 • SLLT - Stop Loss Long Trailing:
    ○ Fixed: The initial stop loss will be kept and no trailing stop loss will be applied.
    ○ Trail Stop: Takes into account all settings defined in SLLB and SLLB% and recalculates them with each candle.
        - If a better stop loss is computed, it replaces the existing stop loss. In this mode SLLT% will be disregarded.
    ○ Trail Stop till BE: Similar to trailing stop mode, but it stops trailing when the stop loss reaches the break-even point.
    ○ Trail Stop from BE: Similar to trailing stop mode, but it starts trailing when the stop loss reaches the break-even point.
    ○ Trail Price: Computes the trailing stop loss price based on an offset percentage (SLLT%) from the closing price of the current candle.
        - If a better stop loss price is calculated, it will be set as the new stop loss price.
    ○ Trail Price till BE: Similar to the Trail Price mode, but it stops trailing when the stop loss reaches the break-even point.
    ○ Trail Price from BE: Similar to Trail Price mode, but it starts trailing when the stop loss reaches the break-even point.
    ○ Trail Incr: Adapts the trailing stop loss price based on the offset percentage (SLLT%).
        - Each price change in favor of your position will incrementally adapt the trailing stop loss with SLLT%.
    ○ Trail Incr till BE: Similar to the Trail Incr mode, but it stops trailing when the stop loss reaches the break-even point.
 • SLLT% - Stop Loss Long Trailing Percentage: This percentage serves as an offset or increment depending on your chosen trailing mode.

 • SLSB - Stop Loss Short Base: Functions similarly to SLLB but for short positions.
 • SLSB% - Stop Loss Short Base Percentage: Functions similarly to SLLB% but for short positions.
 • SLSSRC - Stop Loss Short Source: Functions similarly to SLLSRC but for short positions.
 • SLST - Stop Loss Short Trailing: Functions similarly to SLLT but for short positions.
 • SLST% - Stop Loss Short Trailing Percentage: Functions similarly to SLLT% but for short positions.



EXIT TAKE PROFIT
Determine the Take Profit price based on your selected configuration.

syot kilat

 • TPLB - Take Profit Long Base: Choose a take profit mode for calculating take profit prices in long positions.
    ○ Reward: Determines the take profit price using the Risk parameter (RISK%) and the calculated Stop Loss price and the set reward percentage (TPLB%).
        - For example: Risk 1%, Calculated Stop loss price: $90, Entry price: $100, Reward (TPLB%): 2%, will result in a take profit price on $120.
    ○ Price Entry + Offset: Calculates the take profit price based on a offset percentage (TPLB%) from the entry price of the position.
        - For example: Entry price: $100, Offset (TPLB%): 2%, will result in a take profit price on $102.
    ○ Source: Computes the take profit price based on an external input from another indicator defined in TPLSRC.
        - If this results in an invalid price, the calculation will revert to using the price entry + offset.
    ○ Source + Offset: Determines the take profit price based on a positive or negative offset percentage (TPLB%) from an external indicator inpuy defined in TPLSRC.
        - If this results in an invalid price, the calculation will fall back to using the price entry + offset.

 • TPLB% - Take Profit Long Base Percentage: Define an offset percentage that will be applied in the price entry + offset and source + offset take profit modes.
 • TPLSRC - Take Profit Long Source: Choose to connect an external indicator as the source for take profit (of course only those which provide price values eg: bollinger bands, moving averages... but not oscillators).

 • TPLT - Take Profit Long Trailing:
    ○ Fixed: The initial take profit will be kept and no trailing take profit will be applied.
    ○ Trail Profit: Takes into account all settings defined in TPLB and TPLB% and recalculates them with each candle.
        - If an applicable take profit is computed, it replaces the existing take profit. In this mode TPLT% will be disregarded.
    ○ Trail Profit till BE: Similar to trailing profit mode, but it stops trailing when the take profit reaches the break-even point.
    ○ Trail Profit from BE: Similar to trailing profit mode, but it starts trailing when the take profit reaches the break-even point.
    ○ Trail Price: Computes the trailing take profit price based on an offset percentage (TPLT%) from the closing price of the current candle.
        - If an applicable take profit price is calculated, it will be set as the new take profit price.
    ○ Trail Price till BE: Similar to the Trail Price mode, but it stops trailing when the take profit reaches the break-even point.
    ○ Trail Price from BE: Similar to Trail Price mode, but it starts trailing when the take profit reaches the break-even point.
    ○ Trail Incr: Adapts the trailing take profit price based on the offset percentage (TPLT%). Each price change against your position will incrementally adapt the trailing take profit with TPLT%.
    ○ Trail Incr till BE: Similar to the Trail Incr mode, but it stops trailing when the take profit reaches the break-even point.
 • TPLT% - Take Profit Long Trailing Percentage: This percentage serves as an offset or increment depending on your chosen trailing mode.

 • TPSB - Take Profit Short Base: Functions similarly to TPLB but for short positions.
 • TPSB% - Take Profit Short Base Percentage: Functions similarly to TPLB% but for short positions.
 • TPSSRC - Take Profit Short Source: Functions similarly to TPLSRC but for short positions.
 • TPST - Take Profit Short Trailing: Functions similarly to TPLT but for short positions.
 • TPST% - Take Profit Short Trailing Percentage: Functions similarly to TPLT% but for short positions.


ENTRY INVESTMENT DISTRIBUTION
Based on your position investment calculation you can distribute the position investment accross the initial opening trade of the position (SIG%) or the follow up Dollar Cost Averaging (DCA%) or Break Out (BRO%) trades.

syot kilat

For example: SIG%: 10%, DCA%: 45%, BRO%: 45% and the calculated Position Investment is $100, then the initial trade will receive $10, DCA will receive $45, and BRO will receive $45 to work with. Disable BRO and or DCA by setting them to 0%. Keep in mind that the sum of SIG, BRO and DCA may not exceed 100%.

 • SIG% - Initial order investment percentage based on the signal: The percentage of the position investment distributed over normal trades.
 • DCA% - Dollar Cost Averaging investment percentage: The percentage of the position investment distributed to DCA trades.
 • BRO% - Break Out investment percentage: The percentage of the position investment distributed to BRO trades.


ENTRY DCA
DCA (Dollar-Cost Averaging) is a risk mitigation strategy where the allocated DCA% budget from the Entry Investment Distribution is distributed among x levels (DCA#) based on calculated prices (DPLM) and order sizes (DOSM), when prices move against your position.

syot kilat

 • DCA# - Maximum DCA levels: Set the maximum number of DCA levels.
 • DPLM - DCA Price Level Mode: Choose a price level mode that determines at which prices the additional purchases are distributed:
    ○ Linear: Entry prices are evenly spaced at regular intervals.
    ○ QuadIn: Entry prices are front-loaded, with more at the beginning and fewer later.
    ○ QuadOut: Entry prices are back-loaded, with fewer at the beginning and more later.
    ○ QuadInOut: Entry prices start front-loaded, then become back-loaded.
    ○ CubicIn: Similar to QuadIn but with a smoother front-loaded distribution.
    ○ CubicOut: Similar to QuadOut but with a smoother back-loaded distribution.
    ○ ExpoIn: Entry prices are exponentially increasing, starting small and growing.
    ○ ExpoOut: Entry prices are exponentially decreasing, starting large and reducing.
    ○ ExpoInOut: Entry prices start exponentially increasing, then decrease exponentially.

 • DOSM - DCA Order Size Mode: Choose a DCA budget distribution mode for order sizes:
    ○ Linear: Order sizes are evenly spaced at regular intervals.
    ○ QuadIn: Order sizes are front-loaded, with larger orders at the beginning and smaller ones later.
    ○ QuadOut: Order sizes are back-loaded, with smaller orders at the beginning and larger ones later.
    ○ QuadInOut: Order sizes start front-loaded and transition to back-loaded.
    ○ CubicIn: Similar to QuadIn but with a smoother front-loaded distribution of order sizes.
    ○ CubicOut: Similar to QuadOut but with a smoother back-loaded distribution of order sizes.
    ○ ExpoIn: Order sizes exponentially increase, starting small and growing.
    ○ ExpoOut: Order sizes exponentially decrease, starting large and reducing.
    ○ ExpoInOut: Order sizes start exponentially increasing, then decrease exponentially.

For a visual representation of the price or order size distribution modes, refer to online easing curves.


ENTRY BRO
BRO (Break Out) is a risk mitigation strategy where the allocated BRO% budget from the Entry Investment Distribution is distributed among x levels (BRO#) based on calculated prices (BPLM) and order sizes (BOSM), when prices move in favor of your position.

syot kilat

 • BRO# - Maximum BRO levels: Set the maximum number of BRO levels.
 • BPLM - BRO Price Level Mode: Choose a price level mode that determines at which prices the additional purchases are distributed:
    ○ Distribution easing modes work similar as the DCA easing modes.

 • BOSM - BRO Order Size Mode: Choose a BRO budget distribution mode for order sizes:
    ○ Distribution easing modes work similar as the DCA easing modes.



ORDER SETTINGS
Fine-tune accuracy to match your exchange's trading constraints, enhancing backtest precision with these settings, default settings are least restrictive for crypto trading pairs.

syot kilat

 • MINP - Mininmum Position Notional Value: Exchange-defined minimum notional value for positions:
    ○ Calculated based on your exchange's rules and is the minimum total value your position must hold to meet their requirements It is calculated by multiplying Quantity with price and leverage.
    ○ It helps ensure your trades align with your exchange's standards.

 • MAXP - Maximum Position Notional Value: Exchange-defined maximum notional value for positions:
    ○ Similar to MINP, this value is calculated based on your exchange's rules and represents the maximum total value allowed for your position.

 • MINQ - Mininmum Order Quantity: Least permissible order quantity based on exchange rules:
    ○ This is the smallest quantity of an asset that your exchange allows you to trade in a single order.

 • MAXQ - Maximum Order Quantity: Highest permissible order quantity according to exchange rules:
    ○ Opposite of MINQ, this is the largest quantity of an asset you can trade in a single order as defined by your exchange.

 • DECP - Decimals in Order Price: Allowed decimal places in order prices as per exchange specifications:
    ○ This value specifies the number of decimal places you can use when specifying the price of an order.

 • DECQ - Decimals in Order Quantity: Permitted decimal places in order quantities according to exchange specifications:
    ○ Similar to DECP, this value indicates the number of decimal places you can use when specifying the quantity of an asset in an order.


█ STRATEGY CONDITIONS

Specify when the strategy is permitted to execute trades.

syot kilat

 • DATE: Enable the Date Range filter to restrict entries to a specific date range.
    ○ START: Set a start date and hour to commence trading.
    ○ END: Set an end date and hour to conclude trading within the defined range.

 • IDO - Maximum Intraday Orders: Limit the number of orders the strategy can place within a single trading day. Upon reaching this limit, the strategy temporarily halts further entries for the day.
 • DL% - Maximum Intraday Loss%: Set a threshold for the maximum allowable intraday loss as a percentage of equity. When exceeded, the strategy temporarily suspends trading for the day.
 • CLD - Maximum Consecutive Loss Days: Define the maximum number of consecutive days the strategy can incur losses. Upon reaching this limit, the strategy halts trading and avoids new entries.
 • DD% - Maximum Drawdown: Specify the maximum permissible drawdown as a percentage of equity. If this limit is met, the strategy halts trading and refrains from placing additional entries.
 • TP% - Total Profit %: Establish a target for the total profit percentage the strategy aims to achieve. Once this target is attained, the strategy halts trading and refrains from initiating new entries.
 • TL% - Total Loss %: Define a limit for the total loss percentage relative to the initial capital. If this limit is exceeded, the strategy discontinues trading and refrains from placing further entries.


VISUALS

syot kilat

 • LINE: Activate a colored dashed diagonal line to visually connect the entry and exit points of positions.
 • SLTP: Enable visualization of stop loss, take profit, and break-even levels.
 • PNL: Enable Break-Even and Close Lines along with a colored area in between to visualize profit and loss.

 • ☼: Brightness % : Adjust the opacity of the plotted trading visuals.
 • P - Profit Color : Choose the color for profit-related elements.
 • L - Loss Color: Choose the color for loss-related elements.
 • B - Breakeven Color : Select the color for break-even points.
 • EL - Long Color: Specify the color for long positions.
 • ES - Short Color: Specify the color for short positions.

 • TRADE LABELING: For better analysis we've labeled all entries and exits conform with the type of order your strategy has executed, some examples:
    ○ EL-SIG0-124: Enter Long - Signal 0 - Position 124
    ○ EL-BRO1-130: Enter Long - BRO1 - Position 130
    ○ EL-BRO2-130: Enter Long - BRO2 - Position 130
    ○ ES-DCA1-140: Enter Short - DCA1 - Position 140
    ○ XS-DCA2-140: Exit Short - DCA2 - Position 140
    ○ XL-TP-150: Exit Long - Take Profit - Position 150
    ○ XS-TP-154: Exit Short - Take Profit - Position 154
    ○ XL-SL-160: Exit Long - Stop Loss - Position 160
    ○ XS-SL-164: Exit Short - Stop Loss - Position 164
    ○ XS-CND-165: Exit Short - Strategy Condition - Max intraday loss - Position 165


ALERT SETTINGS
For developers and those who wish to integrate TradingView alerts into their backend systems, we offer comprehensive labeling options.

syot kilat

 • ALID: A unique identifier you've assigned to your alert.
 • NAME: A structured name you've given to this strategy.
 • LAYOUT: The layout key of the strategy, allowing direct chart linking from your backend.
 • SYMBOL: The symbol on which the strategy operates.
    ○ ONCE: You can choose to include this information only in the first message to reduce message size and repetition in follow-up messages. (max. 4096 characters)
 • TICK: The ticker for the strategy.
 • CHART: The chart parameter containing the timeframe.period and timeframe.multiplier.
    ○ ONCE: You can choose to include this information only in the first message to reduce message size and repetition in follow-up messages. (max. 4096 characters)
 • BAR: Includes bar information in the alert message.
 • STRATEGY: Adds strategy inputs to the alert message.
    ○ ONCE: You can choose to include this information only in the first message to reduce message size and repetition in follow-up messages. (max. 4096 characters)
 • PERFORMANCE: Incorporates strategy performance data into the alert message.
 • SIGNAL: Appends received signal weights (EL, XL, ES, XS) to the alert message.
 • ORDERS: Includes order details in the alert message.
 • TAGS: Adds up to 6 tags and their corresponding values to the alert message.
    ○ ONCE: You can choose to include this information only in the first message to reduce message size and repetition in follow-up messages. (max. 4096 characters)


Of course we can't neglect letting you in on how this juicy JSON would look (without the // comments):


{
"id": 20726, // Message Id
"t": "2023-11-01T10:35:00Z", // Message Time
"al": { // Alert
"id": "639bfa9a-5f01-4031-8880-7ec01e972055", // Alert Id
"n": "TEST04", // Name
"l": "ABC123" // Layout
},
"sym": { // Symbol
"typ": "crypto", // Type
"r": "DOGEUSD.PM", // Root
"pre": "KRAKEN", // Prefix
"tc": "DOGEUSD.PM", // Ticker
"bc": "DOGE", // BaseCurrency
"c": "USD", // Currency
"d": "DOGEUSD Multi Collateral Perpetual Futures Contract", // Description
"mtc": 0.000001, // MinTick
"pv": 1, // PointValue
"ct": "PF_DOGEUSD" // CustomTicker
},
"ch": { // Chart
"pd": "1", // Period
"mul": 1 // Multiplier
},
"bar": { // Bar
"id": 20725, // Index
"t": "2023-11-01T10:33:00Z", // Time
"o": 0.066799, // Open
"h": 0.066799, // High
"l": 0.066799, // Low
"c": 0.066799, // Close
"v": 2924 // Vol
},
"strat": { // Strategy
"n": "Strategy - Plus / Connectable [Azullian]", // Name
"sig": { // Signal
"c1e": true, // Connector1Enabled
"c1s": 500500.500501, // Connector1Source
"c1g": 1, // Connector1Gain
"c2e": false, // Connector2Enabled
"c2s": 0.067043, // Connector2Source
"c2g": 1, // Connector2Gain
"sm": "Swing (EL, ES)", // SignalMode
"xm": "Always", // ExitMode
"mlp": 0.01, // ExitModeMinPercLoss
"mpp": 0.01 // ExitModeMinPercProfit
},
"inv": { // Investment
"lb": "Equity", // LossBase
"lp": 50, // LossPerc
"pb": "Equity", // ProfitBase
"pp": 100, // ProfitPerc
"pcb": "Equity", // ProfitCustomBase
"pcp": 100, // ProfitCustomPerc
"pct": 10000, // ProfitCustomThreshold
"elp": 100, // LongPerc
"esp": 100, // ShortPerc
"rsk": 1, // MaxRisk
"lvg": 10 // MaxLeverage
},
"sl": { // StopLoss
"lb": "Price Entry + Offset", // LongBase
"lp": 0.2, // LongPerc
"lsrc": 0.067043, // LongSource
"lt": "Trail Stop", // LongTrailMode
"ltp": 0.2, // LongTrailPerc
"sb": "Price Entry + Offset", // ShortBase
"sp": 0.2, // ShortPerc
"ssrc": 0.067043, // ShortSource
"st": "Trail Stop", // ShortTrailMode
"stp": 0.2 // ShortTrailPerc
},
"tp": { // TakeProfit
"lb": "Price Entry + Offset", // LongBase
"lp": 1, // LongPerc
"lsrc": 0.067043, // LongSource
"lt": "Fixed", // LongTrailMode
"ltp": 1, // LongTrailPerc
"sb": "Price Entry + Offset", // ShortBase
"sp": 1, // ShortPerc
"ssrc": 0.067043, // ShortSource
"st": "Fixed", // ShortTrailMode
"stp": 1 // ShortTrailPerc
},
"dis": { // Distribution
"sigp": 10, // SignalPerc
"dcap": 0, // DCAPerc
"brop": 90 // BROPerc
},
"dca": { // DCA
"lvl": 3, // Levels
"pl": "linear", // ModePriceLevel
"os": "linear" // ModeOrderSize
},
"bro": { // BRO
"lvl": 3, // Levels
"pl": "expoIn", // ModePriceLevel
"os": "cubicOut" // ModeOrderSize
},
"ord": { // OrderSettings
"pmin": 5, // PNVMin
"pmax": 30000000, // PNVMax
"qmin": 0, // QtyMin
"qmax": 1000000000, // QtyMax
"dp": 6, // DecPrice
"dq": 6 // DecQty
},
"cnd": { // Conditions
"de": true, // DateRangeEnabled
"start": "2023-11-01T10:30:00Z", // StartTime
"end": "2024-12-31T23:30:00Z", // EndTime
"idoe": false, // MaxIntradayOrdersEnabled
"ido": 100, // MaxIntradayOrders
"dle": false, // MaxIntradayLossEnabled
"dl": 10, // MaxIntradayLossPerc
"clde": false, // MaxConsLossDaysEnabled
"cld": false, // MaxConsLossDays
"dde": false, // MaxDrawdownEnabled
"dd": 100, // MaxDrawdownPerc
"mpe": false, // MaxProfitEnabled
"mp": 200, // MaxProfitPerc
"mle": false, // MaxLossEnabled
"ml": -50 // MaxLossPerc
}
},
"perf": { // Performance
"ic": 1000, // InitialCapital
"eq": 1000, // Equity
"np": 0, // NetProfit
"op": 0, // OpenProfit
"ct": 0, // ClosedTrades
"ot": 0, // OpenTrades
"p": "FLAT", // MarketPosition
"ps": 0, // MarketPositionSize
"pp": "FLAT", // PreviousMarketPosition
"pps": 0 // PreviousMarketPositionSize
},
"sig": { // Signal
"el": 0, // EL
"xl": 0, // XL
"es": 6, // ES
"xs": 0 // XS
},
"ord": [ // Orders
{
"id": "ES-SIG0-1", // Order Id eg. EL-BRO3-27 / XS-SL-27
"typ": "ENTRY", // Type eg. ENTRY / EXIT
"p": "SHORT", // Position eg. LONG / SHORT
"a": "SIG", // Action eg. SIG / DCA / BRO / SL / TP / CND
"pnr": 1, // Position Number eg. 27
"os": "SELL", // Order Size eg. BUY / SELL
"ot": "MKT", // Order Type eg. MKT / LMT / STP
"qt": "CONTRACTS", // Quantity Typ eg. CONTRACTS / PERCENT
"q": 3759.398496, // Quantity 3600.99 / null -> required on Entry
"stp": null, // Stop Price eg. 15.2 / null -> required when Stop order
"lmt": null // Limit Price eg. 18.0 / null -> required when Limit order
},
{
"id": "ES-BRO1-1",
"typ": "ENTRY",
"p": "SHORT",
"a": "BRO",
"pnr": 1,
"os": "SELL",
"ot": "STP",
"qt": "CONTRACTS",
"q": 23114.355231,
"stp": 0.0667953098,
"lmt": null
},
{
"id": "ES-BRO2-1",
"typ": "ENTRY",
"p": "SHORT",
"a": "BRO",
"pnr": 1,
"os": "SELL",
"ot": "STP",
"qt": "CONTRACTS",
"q": 7575.757575,
"stp": 0.0667781253,
"lmt": null
},
{
"id": "ES-BRO3-1",
"typ": "ENTRY",
"p": "SHORT",
"a": "BRO",
"pnr": 1,
"os": "SELL",
"ot": "STP",
"qt": "CONTRACTS",
"q": 661.375661,
"stp": 0.0666809149,
"lmt": null
},
{
"id": "XS-SL-1",
"typ": "EXIT",
"p": "SHORT",
"a": "SL",
"pnr": 1,
"os": "BUY",
"ot": "STP",
"qt": "PERCENT",
"q": 100,
"stp": 0.066932598,
"lmt": null
},
{
"id": "XS-TP-1",
"typ": "EXIT",
"p": "SHORT",
"a": "TP",
"pnr": 1,
"os": "BUY",
"ot": "LMT",
"qt": "PERCENT",
"q": 100,
"stp": null,
"lmt": 0.06613101
}
],
"tag": [ // Tags
{
"n": "NAME_TAG1", // Tag Name
"v": "VALUE_TAG1" // Tag Value
},
{
"n": "NAME_TAG2",
"v": "VALUE_TAG2"
},
{
"n": "NAME_TAG3",
"v": "VALUE_TAG3"
},
{
"n": "NAME_TAG4",
"v": "VALUE_TAG4"
},
{
"n": "NAME_TAG5",
"v": "VALUE_TAG5"
},
{
"n": "NAME_TAG6",
"v": "VALUE_TAG6"
}
]
}




USAGE OF CONNECTABLE INDICATORS

 ■ Connectable chaining mechanism

Connectable indicators can be connected directly to the signal monitor, signal filter or strategy, or they can be daisy chained to each other while the last indicator in the chain connects to the signal monitor, signal filter or strategy. When using a signal filter you can chain the filter to the strategy input to make your chain complete.

syot kilat

 • Direct chaining: Connect an indicator directly to the signal monitor, signal filter or strategy through the provided inputs (→).
 • Daisy chaining: Connect indicators using the indicator input (→). The first in a daisy chain should have a flow (⌥) set to 'Indicator only'. Subsequent indicators use 'Both' to pass the previous weight. The final indicator connects to the signal monitor, signal filter, or strategy.


 ■ Set up this indicator with signals and a signal filter

The indicator provides visual cues based on signal conditions. However, its weight system is best utilized when paired with a connectable signal filter, monitor, or strategy.


Let's connect the Strategy - Plus to a connectable signal filter and connectable indicators:


1. Load all relevant indicators
 • Load MA - Plus / Connectable
 • Load Signal filter - Plus / Connectable
 • Load Strategy - Plus / Connectable

2. Signal Filter Plus: Connect the MA - Plus to the Signal Filter
 • Open the signal filter settings
 • Choose one of the five input dropdowns (1→, 2→, 3→, 4→, 5→) and choose : MA - Plus / Connectable: Signal Connector
 • Toggle the enable box before the connected input to enable the incoming signal

3. Signal Filter: Update the filter settings if needed
 • The default filter mode for the trading direction is SWING, and is compatible with the default settings in the strategy and indicators.

4. Signal Filter: Update the weight threshold settings if needed
 • All connectable indicators load by default with a score of 6 for each direction (EL, XL, ES, XS)
 • By default, weight threshold is 'ABOVE' Threshold 1 (TH1) and Threshold 2 (TH2), both set at 5. This allows each occurrence to score, as the default score is 1 point above the threshold.

5. Strategy Plus: Connect one of the strategy plus inputs to the signal filters signal connector in the strategy settings
 • Select a strategy input → and select the Signal filter - Plus: Signal connector

6. Strateg Plus: Enable filter compatible directions
 • As the default setting of the filter is SWING, we should also set the SM (Strategy mode) to SWING.

7. Strateg Plus: You're ready to start optimizing
 • Dive into all parameters and start optimizing your backtesting results.



BENEFITS

 • Adaptable Modular Design: Arrange indicators in diverse structures via direct or daisy chaining, allowing tailored configurations to align with your analysis approach.
 • Streamlined Backtesting: Simplify the iterative process of testing and adjusting combinations, facilitating a smoother exploration of potential setups.
 • Intuitive Interface: Navigate TradingView with added ease. Integrate desired indicators, adjust settings, and establish alerts without delving into complex code.
 • Signal Weight Precision: Leverage granular weight allocation among signals, offering a deeper layer of customization in strategy formulation.
 • Advanced Signal Filtering: Define entry and exit conditions with more clarity, granting an added layer of strategy precision.
 • Clear Visual Feedback: Distinct visual signals and cues enhance the readability of charts, promoting informed decision-making.
 • Standardized Defaults: Indicators are equipped with universally recognized preset settings, ensuring consistency in initial setups across different types like momentum or volatility.
 • Reliability: Our indicators are meticulously developed to prevent repainting. We strictly adhere to TradingView's coding conventions, ensuring our code is both performant and clean.



COMPATIBLE INDICATORS

Each indicator that incorporates our open-source 'azLibConnector' library and adheres to our conventions can be effortlessly integrated and used as detailed above.
For clarity and recognition within the TradingView platform, we append the suffix ' / Connectable' to every compatible indicator.



COMMON MISTAKES, CLARIFICATIONS AND TIPS

 • Removing an indicator from a chain: Deleting a linked indicator and confirming the "remove study tree" alert will also remove all underlying indicators in the object tree. Before removing one, disconnect the adjacent indicators and move it to the object stack's bottom.
 • Point systems: The azLibConnector provides 500 points for each direction (EL: Enter long, XL: Exit long, ES: Enter short, XS: Exit short) Remember this cap when devising a point structure.
 • Flow misconfiguration: In daisy chains the first indicator should always have a flow (⌥) setting of 'indicator only' while other indicator should have a flow (⌥) setting of 'both'.
 • Hide attributes: As connectable indicators send through quite some information you'll notice all the arguments are taking up some screenwidth and cause some visual clutter. You can disable arguments in Chart Settings / Status line.
 • Layout and abbreviations: To maintain a consistent structure, we use abbreviations for each input. While this may initially seem complex, you'll quickly become familiar with them. Each abbreviation is also explained in the inline tooltips.
 • Inputs: Connecting a connectable indicator directly to the strategy delivers the raw signal without a weight threshold, meaning every signal will trigger a trade.
 • Layout and Abbreviations: Abbreviations streamline structure and input identification. Although they may seem complex initially, inline tooltips provide explanations, facilitating quick acclimatization.
 • Total Trade Limit Error & Date-Time Filter: For deep backtesting, be mindful of the total trade limit. Utilize the date-time filter to narrow the test scope and avoid TradingView order limits.
 • Calculation Timeout: Encounter a timeout? Adjust any parameter slightly to restart the calculation process.
 • Message Character Limit: To stay within message character limits, consider turning off certain features or setting some to 'once'.
 • Direct Indicator-to-Strategy Connection: When connecting an indicator directly to a strategy without thresholds, the strategy will default to long if weights are equally assigned.
 • Pyramid Enabling with DCA and BRO: Activate pyramid orders, enabling you to optimize your strategy during Dollar Cost Averaging and Break Out trades.
 • Recalculate & Fill Orders Properties: Adjusting these default settings in strategy properties tab may lead to unexpected behavior when backtesting. Approach with caution.
 • Optimized for Crypto: Our indicators have been optimized and tested primarily on cryptocurrency markets. Results in other markets may vary.
 • Inline Tooltips Documentation: Detailed documentation and guidance are available via inline tooltips for immediate assistance.
 • Strategy Settings Margin: Set margin to 1 to be able to apply leverage.
 • Styling Panel: Explore the styling panel to disable labels or any other visual cues to reduce clutter on busy charts, enhancing visual clarity and personalization.
 • Applying Leverage on Spot Markets: Ensure that maximum leverage on spot markets is configured to 1.
 • Unrealistic Order Sizes: Verify that the order book can accommodate your backtested order sizes.


A NOTE OF GRATITUDE

Through years of exploring TradingView and Pine Script, we've drawn immense inspiration from the community's knowledge and innovation. Thank you for being a constant source of motivation and insight.



RISK DISCLAIMER

Azullian's content, tools, scripts, articles, and educational offerings are presented purely for educational and informational uses. Please be aware that past performance should not be considered a predictor of future results.



backtestingconnectableconnectablestrategyeducationalstrategyTechnical Analysis

Skrip jemputan sahaja

Akses ke skrip ini adalah terhad kepada pengguna yang diberikan akses oleh penulis dan kebiasaannya memerlukan pembayaran. Anda boleh menambahkannya kepada senarai kegemaran anda, tetapi anda hanya dapat menggunakannya setelah meminta izin dan mendapatkannya dari penulis. Sila hubungi azullian untuk lebih maklumat atau rujuk arahan penulis seperti di bawah.

TradingView tidak mencadangkan anda membayar untuk skrip dan menggunakannya kecuali anda mempercayai penulisnya 100% dan memahami bagaimana skrip itu berfungsi. Juga, anda boleh mencari alternatif sumber terbuka yang bagus secara percuma dalam Skrip Komuniti kami.

Arahan penulis

Get access at: https://www.azullian.com

Ingin menggunakan skrip ini pada carta?

Amaran: sila baca sebelum memohon akses.

🔗 Explore and learn about connectable indicators on Azullian: azullian.com

🔗 Check out how it works: youtu.be/gPNz0XiZl38
🔗 Strategy plus demo: youtu.be/jRpvt_ZdIOg
🔗 Join our discord: discord.com/invite/vT7AqmE
Juga pada:

Penafian