INVITE-ONLY SCRIPT
已更新 Ultimate Pullback Strategy

What is the Ultimate Pullback Strategy?
This strategy script is based on my Ultimate Pullback Indicator which detects pullback trading opportunities by analyzing price action in a very specific manner.

By combining simple trend filters with various advanced candlestick patterns it detects high-probability trend-continuation setups (and optional exits).
If you use this script to set alerts then you will never miss a pullback trading opportunity ever again!
I personally use this indicator to profitably trade pullback signals in the forex markets on multiple timeframes, from the 15-Minute chart to the 4-Hour and Daily chart.
Note: This strategy companion script is only available for subscribers of The Ultimate Pullback Indicator.
This strategy script is based on my Ultimate Pullback Indicator which detects pullback trading opportunities by analyzing price action in a very specific manner.

By combining simple trend filters with various advanced candlestick patterns it detects high-probability trend-continuation setups (and optional exits).
If you use this script to set alerts then you will never miss a pullback trading opportunity ever again!
I personally use this indicator to profitably trade pullback signals in the forex markets on multiple timeframes, from the 15-Minute chart to the 4-Hour and Daily chart.
Note: This strategy companion script is only available for subscribers of The Ultimate Pullback Indicator.
版本注释
Fixed ATR multiplier not working.版本注释
-- Updated strategy script to match latest indicator script
版本注释
- - Fixed max rejection wick size setting bug
- Added option to ignore long or short setups
版本注释
-- Added option to change Moving Average types
版本注释
-- Fixed "Exit Reasons + Target" Bug
- Added "DEMA" Option
- Added Fixed Pip SL Option
I've also added a new setting - R:R To Trigger Exit.
Basically it works like this (for example) - if you set your regular R:R Target to 2:1, you set your Break-Even target to 1.5:1, and you set your R:R To Trigger Exit to 1:1, the script will perform like this:
- If price hits your stop loss it will be stopped out as per usual
- If price hits 1:1 it will begin searching for your selected exit reason(s)
- If price hits 1.5:1 it will move the theoretical stop loss to break-even
- If price hits 2:1 it will exit your trade for a profit regardless of the exit reason(s)
If you set R:R To Exit Trade to 0 it will disable that setting (it's disabled by default), and the script will only begin searching for an exit reason when your standard R:R under the Stops & Targets section is hit.
版本注释
-- A few bug fixes and minor improvements
- Added a whole bunch of alert customization for 3rd party APIs
版本注释
- Added MA slope filter (won't take trades if MA has flattened)- Added time-based filter (won't take trades during given time of day)
版本注释
-- Improved hammers & shooting stars detection
- Added start date filter
- Separated all the various alert conditions
版本注释
-- Better organized settings menu using latest Pine features
- Added trailing stop source option (high/low, close, open)
- Doji's are now detected based on % of bar size, not pips
- Removed slope filter as it wasn't working as intended
- Removed Stats Label as it has a display bug on the strategy version of this script for some reason
- Removed individual alert options from settings menu (they're now all listed under alert dialog)
- Added complete in-built AutoView automation functionality
To use AutoView alerts, make sure to set up the appropriate settings and then create an alert using "Any alert() function call". The script will then automate trade management based on however you've set up the script to behave.
For help with this, search "The Art Of Trading AutoView Guide" on YouTube. Enjoy :)
版本注释
UPS Update: -
- Many minor fixes:
- Removed deprecated transp parameters
- Fixed "1234567" on time function (to include weekends in time filter)
- Fixed some out-of-scope function call warnings
- Added AutoView Disclaimer
- Added minimum hammer size compared to ATR to prevent detecting tiny hammers & stars
- Added lowest low/highest high lookback to hammers & stars
- Added option to round SL pips to remove decimals (on by default)
- Fixed SL label drawing over the top of Win label if both target & SL are hit on the same bar
- Removed "overwrite new trades" setting as it is not relevant for this script
版本注释
-- Fixed minor mistake with trade label text
版本注释
-- Fixed minor bug where script would take trades when ATR was null
版本注释
-- Released v3.0 of the UPI.
- Updated code to v5 of Pine Script.
- Improved pullback detection accuracy.
- Added PineConnector functionality for auto-trading.
- Updated course material to better explain how to use this script to trade profitably (including my personal strategy rules).
- A few other minor changes - check out the settings guide on my website or YouTube channel (link in my profile).
版本注释
- Fixed some typos in settings & removed some code that wasn't used版本注释
- Fixed a potential bug with automation code版本注释
- Fixed time session filter bug版本注释
- Fixed bug with AutoView code which caused long position sizes to be calculated incorrectly版本注释
- Improved pullback detection accuracy slightly版本注释
- Updated code to work with AutoView changes to break-even functionality版本注释
- v3.04- Temporarily added max_bars_back=5000 parameter to attempt to hotfix issue with "Pine cannot determine the referencing length of a series" until I find the culprit variable
- Added warning labels for trades that hit their take-profit AND stop-loss on the same bar (outcome requires manual confirmation)
版本注释
-- Updated ZenLibrary to v3
- Added option to select pips or price value for PineConnector entry limit order
- Added option to select pips or price value for PineConnector stops & targets
- Added debug option to display AutoView/PineConnector alert string
版本注释
v3.06:- Updated ZenLibrary to v5
- Updated code to be compatible with new PineConnector syntax
- Updated trailing stop to work with pips as well as price with PineConnector
- Added Spread Filter setting
- Added EAP SL Algorithm #2
- Truncated decimals on debug label for TP & SL price values
版本注释
-- Fixed time filter not working properly
- Removed 'when' statements which are now deprecated
版本注释
Added Stop Loss price source option (allows you to specify what price to use for calculating your stop loss - eg. high/low, open or close).版本注释
- Updated version to 3.09 to match UPI script to keep versions consistent (no actual code changes as UPI bugfix update was unrelated to UPS)版本注释
- Turned Bar Magnifier feature off by default as many users don't have a Premium plan which is currently required to use this feature, and we are getting a lot of support emails about it. But it is recommended to turn this ON in the Properties tab if you are a Premium user as it will increase the accuracy of your test results (not by a significant margin as it will only affect trades that hit their Take-Profit and Stop-Loss on the same bar which is a rare occurrence, but obviously when backtesting you want results to be as accurate as possible!)版本注释
- Added PineConnector symbol override option (settings tooltip explains what it does). Leave blank to disable.版本注释
- Cleaned up status bar user inputs and some plots using new display=display.none parameter- Added (EXPERIMENTAL!) feature that makes the strategy tester calculate position size based on a % of your account balance. Only works on forex markets. The feature may not work on all markets (it was mainly tested using USD currency as the base broker currency and only on the major FX pairs), so use at your own risk and always take the time to ensure the numbers are accurate if you're trading more exotic instruments or base currencies.
版本注释
- Added "SL Rounding Fix" setting for non-FX markets that produce rounding errors for SL/TP pips (eg. stock indexes like NAS100)版本注释
Added multi-strategy support for PineConnector.版本注释
Added "minimum SL distance" - allows user to ignore trades with a stop loss below this number in pips, or override the stop loss to this pip distance if it's below it.版本注释
Forgot to update version number版本注释
Removed indicator status line display for new minimum SL input (forgot to do this on last update - purely cosmetic, makes chart less cluttered and in line with the rest of the inputs)版本注释
Fixed Max Candles Beyond EMA setting not applying correctly版本注释
Fixed minimum stop loss pip size override not working properly.版本注释
Adapted alert syntax for PineConnector v3.Added strategy performance table.
Added monthly performance table.
Added "close all trades at specific time" setting.
Improved fixed-fractional FX position sizing code.
Added Monte Carlo simulation code (trade skipping and/or random spread).
版本注释
Fixed PineConnector closeall() alert command being triggered for Exit Time even if PineConnector was disabled.版本注释
Added new setting for overriding ticker ID sent to PineConnector alerts (Symbol Override).版本注释
Added a minor improvement to Monthly Performance Table code.版本注释
Fixed PineConnector sending too many decimal places with limit ordersAdded Monte Carlo Cycle input to Backtester settings - does nothing to the script, it's just a way to auto-refresh strategy tester with new MCS randomness as whenever an input changes the script re-executes and runs the backtest again
版本注释
Fixed PineConnector alerts generating double-alerts for market buy/sell ordersFixed "Everyday" setting for the time of day to close trades not working
版本注释
Added annual commission drag estimation to "Return" tooltip (this number is the minimum ROR to break-even after commissions, and is a rough estimate based on whatever commission pricing and starting balance you use with the strategy settings) - formula: Total Commission Costs / Initial Capital / Total Years in Test. I did not increase version number for this minor update so this is still v3.18.版本注释
Improved monthly performance table metrics accuracy with regards to commission drag版本注释
Updated to latest Pine Script version 6 syntax (no version change; no changes were necessary).版本注释
Updated Zen Library import to version 9.版本注释
Minor bugfix: trailing stop strategy comments were incorrectly displaying negative pips as the trailing stop was interpreted as a loss in the pip display calculation; strategy stats were not affected by this bug, only on-chart comments.版本注释
Added a new setting to Backtester Settings: Ignore Compounding. Enabling this setting will force the script to use initial equity for risk calculations instead of current equity. Used for fixed risk $ amount. eg. If you turn this on with a starting balance of 10,000 and 1% risk, then the script will only ever risk $100 per trade and will ignore compounding.
版本注释
Added a new setting to Backtester Settings: Ignore Compounding. Enabling this setting will force the script to use initial equity for risk calculations instead of current equity. Used for fixed risk $ amount. eg. If you turn this on with a starting balance of 10,000 and 1% risk, then the script will only ever risk $100 per trade and will ignore compounding.
版本注释
Updated to v2 of PineConnector library which fixes a bug with some orders not parsing comment=/secret= correctly. Incremented version number to v3.19版本注释
Updated to v2 of PineConnector library which fixes a bug with some orders not parsing comment=/secret= correctly. Incremented version number to v3.19版本注释
Better clarified some setting tooltips版本注释
Fixed trade's stop loss pip label accidentally displaying profit pips instead of loss pips on chartFixed break-even "Count As Win" setting not working properly when commission costs were used
Added tooltip to R:R to explain how that measurement is calculated (avg win $ ÷ avg loss $)
Incremented version number to v3.20 to reflect these important bugfixes
版本注释
Better-clarified some setting tooltips版本注释
Added maximum SL setting (behaves the same as minimum SL setting)Changed Fixed Fractional setting from an on/off setting to an option from:
- Auto: Automatically detect and enable on forex markets
- On: Always on (Note: this experimental setting will not work on most other markets)
- Off: Always off
Updated one of the dependency libraries to v6 of Pine
Removed USD as the default backtest currency as it causes issues in Bar Replay mode when Fixed Fractional position sizing is enabled - if you encounter issues when backtesting your currency set the base currency to Default.
版本注释
Fixed forex position size calculation failing on intraday timeframes in bar replay mode.版本注释
Fixed version number in data window.版本注释
- Forced cancellong and cancelshort alerts to trigger once-per-bar to hopefully fix an alert spam bug- Added a new setting "Cancel Missed Orders" to the PineConnector Settings to enable/disable this behaviour: If a limit order is not filled by the broker due to spread, but the UPI treats the order as if it still played out as a valid trade, then cancel any leftover pending orders when a TP is hit to avoid leaving unwanted LOs in the market.
版本注释
Fixed a bug with the UPS incorrectly displaying losing trade debug labels and pip distance text on winning trades版本注释
Last update to fix pip SL comment on winning trades didn't work properly in some situations - fixed now.版本注释
Removed some leftover debug code from last update.仅限邀请脚本
只有经作者批准的用户才能访问此脚本。您需要申请并获得使用权限。该权限通常在付款后授予。如需了解更多详情,请按照以下作者的说明操作,或直接联系ZenAndTheArtOfTrading。
除非您完全信任其作者并了解脚本的工作原理,否則TradingView不建议您付费或使用脚本。您还可以在我们的社区脚本中找到免费的开源替代方案。
作者的说明
To request a free trial or purchase the source code to this script, visit my website (link in my profile!)
提醒:在请求访问权限之前,请阅读仅限邀请脚本指南。
My Resources Hub: theartoftrading.com
FREE YouTube Lessons: rebrand.ly/zyt
FREE Pine Script Basics Course: rebrand.ly/zpsbc
Pine Script MASTERY Course: rebrand.ly/zpsmc
My Indicators & Strategies: rebrand.ly/zmisc
FREE YouTube Lessons: rebrand.ly/zyt
FREE Pine Script Basics Course: rebrand.ly/zpsbc
Pine Script MASTERY Course: rebrand.ly/zpsmc
My Indicators & Strategies: rebrand.ly/zmisc
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
仅限邀请脚本
只有经作者批准的用户才能访问此脚本。您需要申请并获得使用权限。该权限通常在付款后授予。如需了解更多详情,请按照以下作者的说明操作,或直接联系ZenAndTheArtOfTrading。
除非您完全信任其作者并了解脚本的工作原理,否則TradingView不建议您付费或使用脚本。您还可以在我们的社区脚本中找到免费的开源替代方案。
作者的说明
To request a free trial or purchase the source code to this script, visit my website (link in my profile!)
提醒:在请求访问权限之前,请阅读仅限邀请脚本指南。
My Resources Hub: theartoftrading.com
FREE YouTube Lessons: rebrand.ly/zyt
FREE Pine Script Basics Course: rebrand.ly/zpsbc
Pine Script MASTERY Course: rebrand.ly/zpsmc
My Indicators & Strategies: rebrand.ly/zmisc
FREE YouTube Lessons: rebrand.ly/zyt
FREE Pine Script Basics Course: rebrand.ly/zpsbc
Pine Script MASTERY Course: rebrand.ly/zpsmc
My Indicators & Strategies: rebrand.ly/zmisc
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。