What’s New in v3
1. Pine Script Upgraded:
- Migrated from Pine Script v5 to v6.
2. Single-Entry/Single-Exit Logic:
- Introduced a full trade state machine (variables for inTrade, entryPrice, exitPrice, etc.).
- Script now allows only one position at a time.
3. Time Window Filter:
- Added configurable Start/End Date and Time to restrict when trades can occur.
4. Separate Ichimoku Settings for Entry & Close:
- Two distinct sets of Ichimoku calculations/inputs:
Entry Ichimoku (for signals that open trades)
Close Ichimoku (for signals that exit trades)
5. Combined Signal Logic (ALL/ANY):
- User can choose to require “ALL” signals to align or allow “ANY” single condition to trigger an Entry or Close.
6. Position Modes:
- Removed Long, Short, Both position mode, now user can define it in a flexible way by selecting entry and close conditions
7. Integrated Stop-Loss & Take-Profit (Intrabar):
- Optional SL/TP in percentage terms; triggers are checked intrabar.
- Once triggered, the trade automatically exits.
8. Backtesting Statistics Panel:
- A floating label displays net PnL percentage, total trades, wins/losses, average trade duration, and more.
9. New Alert Conditions:
- Entry Alert and Close Alert for automated trade execution or bot integration.
10. Ichimoku Helper (Legacy Plots & Signals):
- Legacy lines (Tenkan, Kijun, Senkou A/B, Chikou) can still be plotted independently.
- Original signals (Strong/Neutral/Weak Bullish/Bearish) remain available as helper signals/alerts.
- Added settings to filter helper signals by strength and direction.
11. Enhanced Code Structure & Organization:
- Modularized functions for signal checks, array logic, SL/TP calculations, and label generation.
- Improved readability and maintainability.
These updates significantly expand functionality, making the script suitable not only for visual Ichimoku analysis but also for automated or semi-automated trading strategies.