OPEN-SOURCE SCRIPT
Actualizado Strategy Builder

use external indicators on the chart as a source for a strategy. use 5 different triggers with drop down conditions. you can use any indicator that plots.
I will amend info when I get more time. improvement suggestions or indicator combinations would be appreciated.
I will amend info when I get more time. improvement suggestions or indicator combinations would be appreciated.
Notas de prensa
⚙️ Strategy Builder — Customizable Multi-Condition Trading FrameworkThe Strategy Builder is a modular, no-code trading framework designed for traders who want full control over their entry and exit logic — without writing new code each time. With up to five configurable Buy and Sell conditions, dynamic combination modes, and built-in trade management, it’s the ultimate toolkit for building and testing strategies directly in Pine Script.
🧠 How It Works
This strategy lets you stack and combine multiple logic slots to define custom entry and exit rules. Each slot can compare two data sources (or a value) using a variety of conditions — from simple crossovers to relational comparisons.
You can then control how those conditions must align using the “Combine” settings:
Any – triggers when any enabled slot is true.
All – same bar – requires all active conditions to occur simultaneously.
All – within bars – allows signals to confirm within a specified lookback window.
Each side (Buy/Sell) is independently configurable, allowing endless flexibility for strategy design and testing.
⚡ Key Features
🧩 5 Fully Customizable Buy & Sell Slots – Define crossovers, thresholds, comparisons, and more.
🧠 Advanced Combine Logic – Mix conditions using Any, All, or Within Bars modes.
🔄 One-Trade-at-a-Time Control – Prevent overlapping entries and manage re-entry timing.
💰 Built-In Stop Loss & Take Profit – Automatically exit trades based on fixed percentages.
💤 Sideways Market Detection – Optionally close positions if the market remains stagnant.
🪄 Visual Trade Zones – Plots entry, stop, and take-profit lines with transparent fill zones.
🧮 Risk & Trade Management
Parameter Description
Initial Capital / Position Size Defined in percent of equity (default: 100%)
Commission Adjustable percentage cost per trade
Fixed SL/TP Set your stop loss and take profit in percent
Sideways Close Automatically closes trades after X bars of minimal movement
Wait Between Trades Enforces cooldown periods for better control
🧠 Combine Logic Modes
Mode Description
Any Trigger on any valid condition
All - same bar Require all active slots to confirm on the same bar
All - within bars Allow flexibility within a lookback period
🎯 Trading Applications
Build and test multi-condition strategies visually.
Compare indicator-based signals (RSI crossovers, MA crossovers, etc.) without coding.
Combine different sources or values for flexible backtesting setups.
Add this as a foundation layer to prototype complex logic or strategy blends.
🧩 Included Controls
✅ Enable/Disable individual buy or sell slots
⚙️ Custom “Combine” logic configuration
⏱️ Wait periods and trade sequencing control
📉 Dynamic SL/TP visualization and overlays
🧠 Usage Tip
Start by enabling a few Buy/Sell slots and testing different conditions (like crossover of RSI and MA). Once your rules generate reliable entries, layer in stop-loss, take-profit, and sideways-close logic to refine risk management.
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.