bkomoroczy

ComiCo - Joel on Crypto - MACD Scalping

bkomoroczy Cập nhật   
This is a modified (hopefully improved) version of the "Joel on Crypto - MACD Scalping" indicator. It got turned into a strategy, and added some extra filters, like number of trades after EMA cross, minimal EMA distance (EMA 50's distance from the EMA 200). It is just an experiment to see how good this scalping strategy can get.

Play around with it and let me know if you found good settings, or just have a comment on it.


I could get fairly good results on BTCUSDT 5m with these settings (all others left on default values):

Ticks Avg. Multiplier = 1.4
Max trades after EMA cross = 16
Limit Price Difference = 0
Take Profit = 0.0065
Stop Loss = 0.0085
Min EMA difference = 110

Pyramiding = 3
Phát hành các Ghi chú:
Updated some inputs to be more meaningfull, expressed in %
New "best " values (based on deep backtest between 2019-01-01 and 2022-07-12) (all the other values left default):

Ticks Avg . Multiplier = 1.4
Max trades after EMA cross = 22
Limit Price Difference (%) = 0
Take Profit (%) = 0.65
Stop Loss (%) = 0.9
Min EMA difference (%) = 0.85

Pyramiding = 3
Phát hành các Ghi chú:
Added a new parameter: "Max. EMA difference" to limit value from the top as well. It was worth it.
I am doing deep backtesting from 2019-01-01 till today (2022-07-15) and the backtested profit seems to be not only comfortably high, but also fairly consistent throughout the years. Of course as a scalping strategy, it is very sensitive to broker fees. (And past results are no way a guarantee of future performance, of course:) )

I could reach good results with the following settings (all the other values left default):

Ticks Avg . Multiplier = 1.4
Max trades after EMA cross = 20
Limit Price Difference (%) (0-> market order) = 0
Take Profit (%) = 0.85
Stop Loss (%) = 1.1
Min. EMA difference (%) = 0.8
Max. EMA difference (%) = 3.1
Phát hành các Ghi chú:
Added controls to limit which signals to take as valid in case there are signals directly after each other.

I could reach good results with the following settings (all the other values left default):

Ticks Avg . Multiplier = 1.4
Max trades after EMA cross = 19
Act on the first N signal (min) = 1
Act on the first N signal (max) = 5
Limit Price Difference (%) (0-> market order) = 0
Take Profit (%) = 0.85
Stop Loss (%) = 1.25
Min. EMA difference (%) = 0.82
Max. EMA difference (%) = 3.1
Phát hành các Ghi chú:
Adapted the strategy to the aleeert service, a connector between trading view and binance.

Parameters are mostly the same, but here is a guide how to enter my tested parameters:
Change the following settings (all the other values left default):

Ticks Avg . Multiplier = 1.4
Max trades after EMA cross = 19
Act on the first N signal (min) = 1
Act on the first N signal (max) = 5
Limit Price Difference (%) (0-> market order) = 0
Take Profit (%) = 0.9
Stop Loss (%) = 1.3
Min. EMA difference (%) = 0.82
Max. EMA difference (%) = 3.1

Pyramiding = 20

the "ALEERT" section is for aleeert specific settings, you will probably get it if you got aleeert.

Of course ask if anything is unclear :)
Phát hành các Ghi chú:
minor typo corrections
Phát hành các Ghi chú:
Added a basic User's Guide, if you get lost any time, try to use it, hopefully it will help.
Phát hành các Ghi chú:
Chart and User's Guide updated.
Phát hành các Ghi chú:
Chart updated again.
Phát hành các Ghi chú:
Added a new Time Filter, so that you can restrict trading to weekdays, and to two time-periods.

Parameters are mostly the same, but here is a guide on how to enter my favourite parameters (your favourite may differ from these):
Apply the following settings (all the other values left default):

Symbol: BTCBUSD PERPETUAL FUTURES from Binance
Timezone: UTC-4
Timeframe: 5 min

Ticks Avg . Multiplier = 1.39
Max trades after EMA cross = 19
Act on the first N signal (min) = 1
Act on the first N signal (max) = 6
Limit Price Difference (%) (0-> market order) = 0
Take Profit (%) = 0.9
Stop Loss (%) = 1.3
Min. EMA difference (%) = 0.82
Max. EMA difference (%) = 3.1
Use Weekdays filter? = true
Weekdays to select: Mon, Tue, Wed, Thu, Fri
Use Session Filter = true
Time Period: 02:00-11:30
Use 2ND Session Filter = true
Time Period: 13:00-00:00

Pyramiding = 14

The "ALEERT" section is for aleeert specific settings, you will probably get it if you got aleeert.

Of course ask if anything is unclear :)

The User's Guide is updated as well.
Phát hành các Ghi chú:
Added a new option to be able to switch from EMA to SMA, DEMA, TEMA for determining the overall trend. I don't have the best settings for it, but go on and experiment with it :)

The values that need to be readjusted after changing a moving average method are at least the following:
Fast MA lenght
Slow MA lenght
Min. MA difference (%)
Max. MA difference (%)

The default value is still EMA, so all the old settings function like before.
Phát hành các Ghi chú:
Added another automated trading option, namely "TradingView To Anywhere" - mt4 version.
Added an economic news event effect avoidance option, where you can select which events to exclude from trading using an adjustable time window. These events had to be added to the source code, so it can only contain the latest news schedule available right now. It is "2022 Feb 02, 15:30 - Continuing Jobless Claims". After this event, the strategy will work like it worked before without "news effect avoidance". Of course I plan to give you an update before that date:)
The "best" values I concluded to with my backtestings are the actual default values.
Phát hành các Ghi chú:
There is an economic news event effect avoidance option, where you can select which events to exclude from trading using an adjustable time window by selecting the "true" or "false" values. These events had to be added to the source code, so it can only contain the latest news schedule available right now. It is "2023 Feb 28, 15:30 - Goods Trade Balance (Jan)". After this event, the strategy will work like it worked before without "news effect avoidance". Of course I plan to give you an update before that date:)
The "best" values I concluded to with my backtestings are the actual default values.
Phát hành các Ghi chú:
Fixed a bug in the News Avoidance module.
Phát hành các Ghi chú:
Economic calendar updated till the 14th of April 2023.
Phát hành các Ghi chú:
Fixed a problem on the aleeert automaiton side:
Rarely by closing the positions, a tiny portion was left open. Than if the stategy wanted to open an opposing direction position, aleeert gave an error, because of the position that was unintentionally left there. Now it is fixed by intentionally always closing the opposing direction position.
Phát hành các Ghi chú:
Added an extra time filter for Friday market close.
Phát hành các Ghi chú:
Added a dedicated time filter for Sundays.
Phát hành các Ghi chú:
Economic calendar updated till the 26th of May 2023.
Changed Sunday to be selected together with the active the Sunday filter.
Phát hành các Ghi chú:
It is a hotfix for the situation if the price moves so fast, that aleeert can't place the TP or SL, as the price is over the trigger price. Now with the fix whenever TradingView detects that a trade should be closed, a maket close is sent to aleeert. Than either the TP or SL order is executed, or the market close, whichever if faster. Most probably the TP or SL will be faster, but if for whatever reason it couldn't be placed, the market close kicks in.
Phát hành các Ghi chú:
Economic calendar updated till 2023.07.07.
Phát hành các Ghi chú:
- Added a way to limit how many trade groups can be traded after the EMA cross. Couldn't find a profitable way to use it, however just try it out :)
- Added trailing stop as well. The aleeert automated trading is adapted to it, but I never tested, be aware if you plan to use it. First it's better to play around with the settings. Be aware, that the trailing stop backtesting can return greatly differing results if you don't know what you do. Bar Magnifier is your friend in this case, but also be sure you understand how it works ;)
Phát hành các Ghi chú:
The economic news calendar was accidentally used from an older version. It got fixed now, the new last date of the economic calendar is 2023.07.07.
Please update to this version if you use the previous one. Otherwise the news effect avoidance won't work.
Phát hành các Ghi chú:
It should be a usual update of the economic calendar, but my source of the calendar website is not available, so I had to fabricate the next some events by hand. So, now we are only covered till the 18th of july 2023.
Phát hành các Ghi chú:
Economic calendar updated till 2023.09.14.
Phát hành các Ghi chú:
Added optional display for the actual TP and SL levels.
Phát hành các Ghi chú:
advanced the TP and SL display
Phát hành các Ghi chú:
Added experimental features - doesn't effect the normal operation.
Phát hành các Ghi chú:
Economic calendar updated until 2023.11.22.
Phát hành các Ghi chú:
Updated till the end on January 2024.
Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

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.

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