OPEN-SOURCE SCRIPT

IronBot v3

Cập nhật
Introduction
IronBot V3 is a TradingView indicator that analyzes market trends, identifies potential trading opportunities, and helps manage trades by visualizing entry points, stop-loss levels, and take-profit targets.

How It Works
The indicator evaluates price action within a specified analysis window to determine market trends. It uses Fibonacci retracement levels to identify key price levels for trend detection and trading signals. Based on user-defined inputs, it calculates and displays trade levels, including entry points, stop-loss, and multiple take-profit levels.

Trend Definition:
  1. The highest high and lowest low are calculated over a specified number of candles.
  2. The price range is determined as the difference between the highest high and lowest low.
  3. Three Fibonacci levels are calculated within this range:
    - Fib Level 0.236
    - Trend Line (0.5 level)
    - Fib Level 0.786


Determining Long and Short Conditions:
Long Conditions (Buy):
  • The closing price must be above both the trend line (0.5 level) and the Fib Level 0.236.
  • Additionally, the market must not currently be in a bearish trend.


Short Conditions (Sell):
  • The closing price must be below both the trend line and the Fib Level 0.786.
  • The market must not currently be in a bullish trend.


Trend State Updates:
  • When a condition is met, the indicator sets the trend to bullish or bearish and turns off bearish or bullish trend conditions.
  • If neither buy nor sell conditions are met, the trend remains unchanged, and no new trade signals are generated.


Inputs and Their Role in the Algorithm

General Settings
  • Analysis Window: Specifies the number of historical candles to analyze. This influences the calculation of key levels such as highs and lows, which are critical for determining Fibonacci retracement levels.
  • First Trade: Defines the start date for generating trading signals.


Trade Configuration
  • Display TP/SL: Enables or disables the visualization of take-profit and stop-loss levels on the chart.
  • Leverage: Defines the leverage applied to trades for risk and position size calculations.
  • Initial Capital: Specifies the starting capital, which is used for calculating position sizes and profits.
  • Exchange Fees (%): Sets the percentage of fees applied by the exchange, which is factored into profit calculations.
  • Country Tax (%): Allows users to define applicable taxes, which are subtracted from net profits.


Stop-Loss Configuration
  • Break Even: Toggles the break-even functionality. When enabled, the stop-loss level adjusts dynamically as take-profit levels are reached.
  • Stop Loss (%): Defines the percentage distance from the entry price to the stop-loss level.


Take-Profit Settings
  • The indicator supports up to four take-profit levels:
    - TP1 through TP4 Ratios: Specify the price levels for each take-profit target as a percentage of the entry price.
    - Profit Percentages: Allocate a percentage of the position size to each take-profit level.


Visualization Elements
  • Trend Indicators: Displays Fibonacci-based trend lines and markers for bullish or bearish conditions.
  • Trade Levels: Entry, stop-loss, and take-profit levels are visualized on the chart by dotted lines for clarity. Additionally, a semi-transparent background is applied when a portion of the trade is closed to enhance visualization. Positive profits from a closed trade are green; otherwise, they are red.
  • Trade Profit Indicator: On each trade, every time a part of the trade is closed (e.g., take profit is reached), the profit indicator will be updated.
  • Performance Panel: Summarizes key account statistics, including net balance, profit/loss, and trading performance metrics.


Usage Guidelines
  1. Add the indicator to your TradingView chart.
  2. Configure the input settings based on your trading strategy.
  3. Use the displayed levels and trend signals to make informed trading decisions.


Contact
For further assistance, including automation inquiries, feel free to contact me through TradingView’s messaging system.

Purpose and Disclaimer
IronBot V3 is designed for educational purposes and to assist in analyzing market trends. It is not financial advice, and users should perform their own due diligence before making any trading decisions.

Trading involves significant risk, and past performance is not indicative of future results. Use this indicator responsibly.
Phát hành các Ghi chú

  • Upgrade : when take profits % are at 0, they will not be shown anymore on the chart for better visualization
  • Fix : When a take profit has been reached, all take profits were checked
Phát hành các Ghi chú

  • Adding plot for 23.6 and 78.6 fibonacci to see and understand when a trade is taken
Phát hành các Ghi chú
Adding the possibility to change fibonacci levels for changing the trend.
Initially based :
  • Bullish was on 23.6, it still the default value but possible to change for 38.2.
  • Bullish was on 78.6, it still the default value but possible to change for 61.8.
Phát hành các Ghi chú

  • Update fib plots in orange and 1 height by default for better visibility
  • Shifting prices of Stop loss and Take profits for better visibility
Phát hành các Ghi chú
  • Fixed profit calculation that took RR into account
  • Fixed panel where last line had no background
  • Fixed breakeven being automatically disabled if only one TP is enabled
Phát hành các Ghi chú

  • Added a "show forecast" option to display the next 20 bars based on your analysis window. This allows you to preview an estimate of how the market may move and where trades might take place. The analysis window must be greater than 25 to have enough data to display it.
Phát hành các Ghi chú
  • Fixed trades not closing when the entire position was completed
Phát hành các Ghi chú
  • Adding simple alert with the trade direction based on "Any alert() function call" condition
Phát hành các Ghi chú
  • Major fix : the break even did not take into account the remaining position to be added to the profit
Phát hành các Ghi chú
Upgrade of the overview by adding :
  • Prefix and ticker
  • Window analysis and both fib config
  • Leverage
  • % of exchange fees and country tax
Bands and ChannelsTrend Analysis

Mã nguồn mở

Theo tinh thần TradingView thực sự, tác giả của tập lệnh này đã xuất bản dưới dạng nguồn mở để các nhà giao dịch có thể hiểu và xác minh. Chúc mừng tác giả! Bạn có thể sử dụng miễn phí. Tuy nhiên, bạn cần sử dụng lại mã này theo Quy tắc nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?

Thông báo miễn trừ trách nhiệm