OPEN-SOURCE SCRIPT
WN 5-20-50 SMA Setup (Discrete Lines = SL TP) Multiple Entries

Pretty Simple Script as I got this idea from a YouTuber that showed us how to use AI to make TradingView Indicators.
When the 5 day Simple Moving Average Goes Above the 20 day Simple Moving Average it issues a BUY Signal when the Trend itself is over the 50 day Simple Moving Average.
When the 5 day Simple Moving Average Goes Below the 20 day Simple Moving Average it issues a SELL Signal when the Trend itself is under the 50 day Simple Moving Average.
The Green Cloud Represents price over the 50 day Simple Moving Average. BUY signals will only show up in the green cloud.
The Red Cloud Represents price under the 50 day Simple Moving Average. SELL signals will only show up in the green cloud.
The lines represent Stop Loss and two Take Profit Levels. Take Profit 1 is 1.5x the stop loss and Take Profit 2 is 3x the Stop Loss.
This version of the Script has multiple Trend signals for entries so you can scale into a trade when the Trend is being aggressive.
When the 5 day Simple Moving Average Goes Above the 20 day Simple Moving Average it issues a BUY Signal when the Trend itself is over the 50 day Simple Moving Average.
When the 5 day Simple Moving Average Goes Below the 20 day Simple Moving Average it issues a SELL Signal when the Trend itself is under the 50 day Simple Moving Average.
The Green Cloud Represents price over the 50 day Simple Moving Average. BUY signals will only show up in the green cloud.
The Red Cloud Represents price under the 50 day Simple Moving Average. SELL signals will only show up in the green cloud.
The lines represent Stop Loss and two Take Profit Levels. Take Profit 1 is 1.5x the stop loss and Take Profit 2 is 3x the Stop Loss.
This version of the Script has multiple Trend signals for entries so you can scale into a trade when the Trend is being aggressive.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.