Strategy Overview Name: "XAU-USD - OANDA - Updated Jan 2025 - by PB ver 5" Purpose: A Renko-based trading strategy for XAU-USD, with support for date/session filters, dynamic trailing stops, and webhook integration for external trade execution.
Key Features Backtesting Date Filter
useDateFilter: Enables/disables filtering based on a backtesting date range. backtestStartDate & backtestEndDate: Define the date range for the backtest. Trades are only executed if the current time (time) falls within this range (inTradeWindow). Session and Days Filtering
Uses a specified session (SessionInput) and day configuration (daysInput) to determine active trading hours. inSession: Determines if the current time falls within the specified session. A background color (bgcolor) is applied during active sessions for visual clarity. Renko Chart Integration
Constructs Renko charts using the traditional method: renko_tickerid: Creates a Renko series based on the ticker. renko_open & renko_close: Tracks Renko open and close levels. Signals are generated using crossovers: Long Entry: Renko close crosses above Renko open. Short Entry: Renko close crosses below Renko open. Trade Management
Long/Short Toggle: Trades can be enabled/disabled using checkboxes (enableLong & enableShort). Trailing Stops: Automatically adjusts stop-loss levels for active trades: Longs: Trails below the average position price by a fixed offset. Shorts: Trails above the average position price by the same offset. Trades are closed when the price exits the defined session or reverses signal: E.g., A long position is closed if a short signal is generated and vice versa. Webhooks for Integration
Includes parameters (code, buyID, sellID) to integrate with external trading platforms (e.g., Dhan) for automated execution via webhooks. Visualization
Plots Renko open and close levels (plot). Plots trailing stop levels for both long and short positions for transparency. Conditions for Trade Execution General Requirements:
The current time must fall within the session (inSession). The current date must match the backtesting filter (inTradeWindow). Entry Signals:
Long Entry: Renko close crosses above Renko open. Short Entry: Renko close crosses below Renko open. Exit Conditions:
Trailing stops (trail_offset) trigger exits. Opposite trade signals cause the current trade to close before entering the new position. All trades are forcefully closed when out of the active session. Plotted Components Renko Close (Red) and Open (Green): Visualize Renko levels on the chart. Trailing Stops: Blue line: Trailing stop for long positions. Yellow line: Trailing stop for short positions. Customizable Parameters Input Settings:
Date range (backtestStartDate, backtestEndDate). Session and days (SessionInput, daysInput). Renko brick size (Bsize). Trailing stop value (trail). Toggleable Features:
Enable/disable long (enableLong) and short (enableShort) trades. Advantages Combines Renko simplicity with session-specific trading. Offers flexibility in trade filtering and execution. Trailing stops enhance risk management.
L'accès à ce script est limité aux utilisateurs autorisés par l'auteur et nécessite généralement un paiement. Vous pouvez l'ajouter à vos favoris, mais vous ne pourrez l'utiliser qu'après avoir demandé et obtenu l'autorisation de son auteur. Contactez pawanbhatia399 pour plus d'informations, ou suivez les instructions de l'auteur ci-dessous.
TradingView ne suggère pas de payer pour un script et de l'utiliser à moins que vous ne fassiez confiance à 100% à son auteur et que vous compreniez comment le script fonctionne. Dans de nombreux cas, vous pouvez trouver une bonne alternative open-source gratuite dans nos Scripts communautaires.
Instructions de l'auteur
″For Access Reach Out To Me at pawanbhatia399@gmail.com
Vous voulez utiliser ce script sur un graphique ?
Avertissement: veuillez lire avant de demander l'accès.
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.