Starbots

Self Optimizing MACD [Starbots]

Starbots Cập nhật   
Self Optimizing MACD Strategy. (non-repainting)

Script constantly tests 15 MACD combinations for maximum profitability and trades based on the best performing combination.
You will notice that signal lines switch sometimes, this is when the strategy optimizes to the better combination and change plots, strategy is dynamic.

There are a lot of black - shadow lines, this are the signals that are not currently active, but script keeps checking and valuating every one of them on every bar close. I recommend using dark mode chart for better view.
MACD /Signal lines in Blue/ Orange are the best performing combination and active at the moment.
*Histogram bars are always displayed based on the default MACD setting (12,26,9) - to keep the script running fast and smoothly. It's not changing plots unlike MACD /Signal lines.

-Turn on MACD Profit Dashboard and spot the worst performing combination to change it and get the better performance overall.
-Backtesting Range - backtest within your desired time window. Example: 'from 01/01/2020 to 01/01/2023'
-Optimizing range - you can decrease the amount of bars/data for optimizing script. This way you can keep it up to date to more recent market by selecting optimizing range to optimize it just from the recent 3-6months of data for example. Strategy before this selected range will normally trade (backtest) based on the first MACD parameters in your menu (12,26,9 by default) if you turn this on.
*I recommend 'Optimizing Range' turned off actually, use max amount of available bars in your history for optimization
- Strategy is trading on the bar close without repaint. You can trade Long-Sell or Long- Short. Alerts available.
- Turn on Profit Calendar for better overview of how your strategy performs monthly/annualy
- Recommended Sources : close, hl2 , hlc3, hlcc4 (when scalping/day trading and market is uptrending good, you can use 'volume' as a source, comes in handy)
- Recommended TF : 30s, 3min, 5min, 10min, 1h, 2h, 4h, 8h, 1d (low timeframes works good if you have no fees like Binance currently do on BTC for example otherwise you probably want to use 1h+ chart)
- MACD parameters : pre-set MACD combinations are very good and common in trading world, you don't need to change them, but you can do it at free will
- Notes window : add your custom comments in or save your webhook message text inside here for later use.
- Trading Session: in a session, you have to specify the time range for every day. It will trade only within this window and close trades when it's out. Session from 9am to 5pm will look like that: 0900-1700 or 7am to 4:30pm 0700-1630. After the colon, you can specify days of the week for your trading session. 1234567 trading all days, 23456 – Monday to Friday ('1 is Sunday here'). 0000-0000:1234567 by default will trade every day nonstop. 00.00am to 00.00pm and 1234567 every day of the week for example - Cryptocurrencies.

This script is simple to use for any trader as it saves a lot of time for searching good parameters on your own. It's also self-optimizing and adjusting to the markets on the go.
Phát hành các Ghi chú:
Changed the brightness of signal lines to spot them easier. If requested we can only see the active signal plot in future.
Phát hành các Ghi chú:
Small fix, even brighter plots now.
Phát hành các Ghi chú:
Inserted 3 better parameters by default. I would also like to point out that if you want to use this as live indicator instead of strategy - you can turn on 'Recalculate - after every tick' and hide signal labels.
Phát hành các Ghi chú:
Added RSI filter. -> buy when MACD line is above the Signal line and RSI is lower than <75 for example to prevent buying tops or buy only oversold areas <40. Vice versa for shorts, buy only if RSI is above 50..70.
Leaving this settings default at max RSI 100 and min 0 'DOES NOT' apply any filters.
Another important thing to mention - strategy HOLDS buy and sell signals if MACD is above/under Signal line, to prevent missing crossovers when strategy switched to the better parameters. If you apply pyramding >2 you will see that it repeats signal every bar, this is how it has to be. You can apply RSI filters though and buy 3-5 times (pyramiding) when market was oversold and MACD crossed. Experiment.
Phát hành các Ghi chú:
Added Noise Filter and MA trend.
Phát hành các Ghi chú:
Added HA filter.
Phát hành các Ghi chú:
Smarter alerts. You can hedge long - short now or long-close, short-close.
Phát hành các Ghi chú:
Added option to short without filters.
Phát hành các Ghi chú:
Added Take Profit / Stop Loss, Holdsignals button, better plots / better shadow - you can edit it now.

Private strategies and Signaler. www.star-bots.com
Tập lệnh chỉ hiển thị cho người được mời

Quyền truy cập vào tập lệnh này bị hạn chế đối với người dùng được tác giả ủy quyền và thường yêu cầu thanh toán. Bạn có thể thêm nó vào mục yêu thích của mình, nhưng bạn sẽ chỉ có thể sử dụng nó sau khi yêu cầu sự cho phép từ tác giả. Liên hệ Starbots để thêm thông tin, hoặc làm theo hướng dẫn của tác giả bên dưới.

TradingView không đề xuất trả tiền cho một tập lệnh và sử dụng cho đến khi bạn hoàn toàn tin tưởng tác giả và hiểu cách thức hoạt động của tập lệnh. Trong nhiều trường hợp, bạn có thể tìm thấy một giải pháp thay thế nguồn mở miễn phí trong Thư viện Công cộng của chúng tôi.

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

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Hướng dẫn của tác giả

Comment or Private Message for more info.

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

Cảnh báo: vui lòng đọc trước khi yêu cầu quyền truy cập.