Uploaded October 2024 | Updated November 2026, 9 hours ago
π© My Socials & More Free Content: theartoftrading.com
π© FREE Pine Script Basics Course: courses.theartoftrading.com/courses/pine-script-basics-course
π© Pine Script Mastery Course: courses.theartoftrading.com/courses/pine-script-mastery
π© My Indicators & Strategies Course (Steal My Code!): courses.theartoftrading.com/courses/my-indicators
π· Create your FREE TradingView Account: tradingview.com/gopro/?offer_id=10&aff_id=15271
LESSON SOURCE CODE: courses.theartoftrading.com/pages/calculating-drawdown-duration-in-pine-script
STRATEGY EXAMPLE LESSON: youtube.com/watch?v=h-erJbnBj6A
MONTHLY PERFORMANCE TABLE CODE: tradingview.com/script/aHwncfep-Monthly-Strategy-Performance-Table/?aff_id=15271
----------------------------------------------------
Want to learn Pine Script? Look no further. I have you covered!
This lesson demonstrates how to calculate the drawdown duration (in time) for your TradingView strategy scripts.
This metric is as useful as knowing the system's max drawdown - after all, if a system has a low max drawdown but stays in drawdown for very long periods of time, that may be just as uncomfortable to trade as a system with a large max drawdown.
With over 16 years of coding experience and 5+ years of profitable trading experience, I specialize in TradingView's Pine Script programming language and I'm here to pass on everything I've learned about both trading and coding.
MORE RESOURCES:
π· My Blog & Socials: theartoftrading.com
π· My Free Indicators: zenandtheartoftrading.com/indicators
π· My Favorite Trading Books: zenandtheartoftrading.com/top-10-best-trading-books
π· My Favorite Trading Psychology Books: zenandtheartoftrading.com/trading-psychology/10-best-trading-psychology-books-of-all-time
π· My Trading Video Library: zenandtheartoftrading.com/video-library
π€ The Art of Trading Podcast: thetradingpodcast.com
If you want more information about who I am and what I do, head over to zenandtheartoftrading.com/about.
Educational Content Disclaimer:
The content provided in our videos, including all code, lessons, and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context. Any results from strategies or tools provided are hypothetical and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and are not suitable for all persons. Before making any trading decisions, please consult with a qualified professional to understand the risks involved. By using our materials, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
βΌTimestampsβΌ
00:00 - Intro
#PineScript #TradingView #Trading
π© My Socials & More Free Content: theartoftrading.com
π© FREE Pine Script Basics Course: courses.theartoftrading.com/courses/pine-script-basics-course
π© Pine Script Mastery Course: courses.theartoftrading.com/courses/pine-script-mastery
π© My Indicators & Strategies Course (Steal My Code!): courses.theartoftrading.com/courses/my-indicators
π· Create your FREE TradingView Account: tradingview.com/gopro/?offer_id=10&aff_id=15271
LESSON SOURCE CODE: courses.theartoftrading.com/pages/calculating-drawdown-duration-in-pine-script
STRATEGY EXAMPLE LESSON: youtube.com/watch?v=h-erJbnBj6A
MONTHLY PERFORMANCE TABLE CODE: tradingview.com/script/aHwncfep-Monthly-Strategy-Performance-Table/?aff_id=15271
----------------------------------------------------
Want to learn Pine Script? Look no further. I have you covered!
This lesson demonstrates how to calculate the drawdown duration (in time) for your TradingView strategy scripts.
This metric is as useful as knowing the system's max drawdown - after all, if a system has a low max drawdown but stays in drawdown for very long periods of time, that may be just as uncomfortable to trade as a system with a large max drawdown.
With over 16 years of coding experience and 5+ years of profitable trading experience, I specialize in TradingView's Pine Script programming language and I'm here to pass on everything I've learned about both trading and coding.
MORE RESOURCES:
π· My Blog & Socials: theartoftrading.com
π· My Free Indicators: zenandtheartoftrading.com/indicators
π· My Favorite Trading Books: zenandtheartoftrading.com/top-10-best-trading-books
π· My Favorite Trading Psychology Books: zenandtheartoftrading.com/trading-psychology/10-best-trading-psychology-books-of-all-time
π· My Trading Video Library: zenandtheartoftrading.com/video-library
π€ The Art of Trading Podcast: thetradingpodcast.com
If you want more information about who I am and what I do, head over to zenandtheartoftrading.com/about.
Educational Content Disclaimer:
The content provided in our videos, including all code, lessons, and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context. Any results from strategies or tools provided are hypothetical and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and are not suitable for all persons. Before making any trading decisions, please consult with a qualified professional to understand the risks involved. By using our materials, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
βΌTimestampsβΌ
00:00 - Intro
#PineScript #TradingView #Trading
![Pine Script [OUTDATED V4] Tutorial | Lesson 3 | Getting Basic User Input
Pine Script Mastery Course: https://courses.theartoftrading.com/courses/pine-script-mastery
FREE Pine Script Basics Course: https://courses.theartoftrading.com/courses/pine-script-basics-course
My Indicators: https://zenandtheartoftrading.com/indicators/
Pine Scripters Network (Forum): https://www.pinescripters.net
Timestamps:
0:00 - Intro
1:20 - Boolean input
4:42 - Integer input
5:49 - Float input
6:30 - String input
9:48 - Labels (extra curricular)
Want to learn how to code in Pine Script but unsure of where to even start? Fear not! I have you covered.
In this video lesson series Im going to teach you how to create your own scripts in TradingViews Pine Script programming language.
Todays lesson covers getting basic input variables from your script users and creating a settings GUI (graphical user interface) for your indicators and strategies.
Get ready to take your trading to the next level. Im excited to share my knowledge with the trading community to help you guys enhance your edge and become the best traders you can possibly be!
For more information visit my website where I have a series of text lessons as well as my collection of open-source TradingView indicators: https://zenandtheartoftrading.com/pinescript/
Lesson 1: https://www.youtube.com/watch?v=2sRMXvxILlA
Lesson 3 Source Code: https://zenandtheartoftrading.com/pine-script-video-lessons/
Pine Script Wiki: https://www.tradingview.com/pine-script-docs/en/v4/Introduction.html
My Other Indicators: https://zenandtheartoftrading.com/indicators/
Visit https://zenandtheartoftrading.com for more forex and trading psychology tips!
Join My Mailing List: https://mailchi.mp/f29afd740719/zenandtheartoftrading
Public Forex Trading Journal: https://zenandtheartoftrading.com/forex-journal/
Best Trading Books: https://zenandtheartoftrading.com/top-10-best-trading-books/
Best Trading Videos: https://zenandtheartoftrading.com/video-library/
Best Charting Platform: https://zenandtheartoftrading.com/tradingview-review/
Best Indicators For Forex: https://zenandtheartoftrading.com/blog/forex/3-best-forex-trading-indicators/
Music: https://soundcloud.com/mjslabosz
Disclaimer:
The content covered in this video is NOT investment advice and I am not a financial advisor. The material covered and the resources offered are for educational purposes only. Always do your own research and only execute trades based on your own personal judgment.
#Forex #TradingView #Indicator Pine Script [OUTDATED V4] Tutorial | Lesson 3 | Getting Basic User Input](https://i.ytimg.com/vi/tolXC3hI24c/mqdefault.jpg)






![Pine Script [OUTDATED V4] Tutorial | Lesson 8 | Using The Security Function & Higher Timeframe Data
Pine Script Mastery Course: https://courses.theartoftrading.com/courses/pine-script-mastery
FREE Pine Script Basics Course: https://courses.theartoftrading.com/courses/pine-script-basics-course
My Indicators: https://zenandtheartoftrading.com/indicators/
Pine Scripters Network (Forum): https://www.pinescripters.net
Source Code: https://zenandtheartoftrading.com/pinescript/higher-timeframe-ema/
Want to learn how to code in Pine Script but unsure of where to even start? Fear not! I have you covered.
In this video lesson series Im going to teach you how to create your own scripts in TradingViews Pine Script programming language.
Todays lesson covers how to use the ATR indicator in order to create a trailing stop loss tool.
Get ready to take your trading to the next level. Im excited to share my knowledge with the trading community to help you guys enhance your edge and become the best traders you can possibly be!
For more information visit my website where I have a series of text lessons as well as my collection of open-source TradingView indicators: https://zenandtheartoftrading.com/pinescript/
Lesson 7 Source Code: https://zenandtheartoftrading.com/indicators/atr-trailing-stop-indicator/
Pine Script Wiki: https://www.tradingview.com/pine-script-docs/en/v4/Introduction.html
My Other Indicators: https://zenandtheartoftrading.com/indicators/
Visit https://zenandtheartoftrading.com for more forex and trading psychology tips!
Join My Mailing List: https://mailchi.mp/f29afd740719/zenandtheartoftrading
Public Forex Trading Journal: https://zenandtheartoftrading.com/forex-journal/
Best Trading Books: https://zenandtheartoftrading.com/top-10-best-trading-books/
Best Trading Videos: https://zenandtheartoftrading.com/video-library/
Best Charting Platform: https://zenandtheartoftrading.com/tradingview-review/
Best Indicators For Forex: https://zenandtheartoftrading.com/blog/forex/3-best-forex-trading-indicators/
Music: https://soundcloud.com/mjslabosz
Disclaimer:
The content covered in this video is NOT investment advice and I am not a financial advisor. The material covered and the resources offered are for educational purposes only. Always do your own research and only execute trades based on your own personal judgment.
#PineScript #TradingView #Indicator Pine Script [OUTDATED V4] Tutorial | Lesson 8 | Using The Security Function & Higher Timeframe Data](https://i.ytimg.com/vi/wpCXrqc7dWQ/mqdefault.jpg)

![How To Use EMA FILTERS β’ Pine Script [OUTDATED V4] Tutorial
Pine Script Mastery Course: https://courses.theartoftrading.com/courses/pine-script-mastery
FREE Pine Script Basics Course: https://courses.theartoftrading.com/courses/pine-script-basics-course
Source Code: https://courses.theartoftrading.com/pages/pine-script-mastery-source-code#emafilters
My Indicators: https://zenandtheartoftrading.com/indicators/
Pine Scripters Network (Forum): https://www.pinescripters.net
Want to learn Pine Script? Look no further. I have you covered!
This lesson demonstrates how to use Exponential Moving Average (EMA) filters in your scripts to determine when NOT to display trading signals.
With over 15 years of coding experience and 4+ years of trading experience, I specialize in TradingViews Pine Script programming language and Im here to pass on everything Ive learned about both trading and coding.
If you want more information about who I am and what I do, head over to https://zenandtheartoftrading.com/about.
βΌTimestampsβΌ
00:00 - Intro
01:08 - User Input
01:26 - Get EMAs
02:34 - Detect Entry Reasons
05:46 - Get Filters
11:47 - EMA Breach Filter
17:47 - Pine Script Mastery Course
#PineScript #TradingView #Indicator How To Use EMA FILTERS β’ Pine Script [OUTDATED V4] Tutorial](https://i.ytimg.com/vi/xud0IdskTf4/mqdefault.jpg)
![πΉ How to use AUTOVIEW ALERTS to manage profitable TRADES πΉ [PSv4]
Pine Script Mastery Course: https://courses.theartoftrading.com/courses/pine-script-mastery
FREE Pine Script Basics Course: https://courses.theartoftrading.com/courses/pine-script-basics-course
AutoView: https://autoview.with.pink/
My Indicators: https://zenandtheartoftrading.com/indicators/
Create Your FREE TradingView Account: https://www.tradingview.com/gopro/?offer_id=10&aff_id=15271
Want to learn Pine Script? Look no further. I have you covered!
This lesson demonstrates how to use AutoView to manage your stop loss by moving it to break-even after price goes into your favor.
With over 15 years of coding experience and 4+ years of trading experience, I specialize in TradingViews Pine Script programming language and Im here to pass on everything Ive learned about both trading and coding.
If you want more information about who I am and what I do, head over to https://zenandtheartoftrading.com/about.
βΌTimestampsβΌ
00:00 - Intro
02:20 - Clear Orders Command
04:04 - Updating Stop Loss & Take Profit
06:27 - Setting Up Trade Management Alert
08:50 - Example Demonstration
#PineScript #TradingView #AutoView πΉ How to use AUTOVIEW ALERTS to manage profitable TRADES πΉ [PSv4]](https://i.ytimg.com/vi/y3mS9nh80FY/mqdefault.jpg)