5min MACD scalp by Joel

Zippy111 Pro+ 업데이트됨   
This strategy is inspired by a youtuber called Joel on Crypto. He trades this using Ema , MACD indicators and his own experience. For more information, check out his Best Crypto Scalping Strategy for the 5 Min Time Frame video. I have tried to automate this a little.

Long or Short trades are determined with a crossing of the fast Ema over the slow Ema for Long and the opposite for Short. Trades should only happen close to the crossovers. Then for Long we use the MACD indicator with a 1min TF (I had better results using the 5min) where we look for high peaks in negative values for Long and vice versa for Shorts. These should be significantly higher than other peaks (or if you will lower peaks for a Long).

Hence, the key is to detect high peaks on the histogram, which I try to achieve by checking if the last 2 values were higher than X bars back. If you want to make it even more specific, then you can turn on the additional checkbox which compares the current value to the average value of X bars back, and if it is greater than, say, 50% the value of the average (= 1.5x the average), then it's ok for the trade.

I also noticed that the strategy often bought at the top or bottom, so I added a check that compares whether the last evaluated bar is the first rising bar (for Long) or falling bar (for Short). This can be turned on or off.

Target profit 0,5% and stop loss 0,4% are based on his recommendation. The strategy is set to take only 1 trade at a time, and you can have a back tester table on.

I'm still a pine script beginner, so the strategy is certainly not perfect and could be improved. If you have any tips on how to improve it further, please let me know. I will try to update it when I have time.

I would also like to thank Joel on Crypto for sharing the strategy and @ZenAndTheArtOfTrading for his great library and code (thanks to him we have a back tester table in here), but especially his educational videos on youtube, which taught me a lot about pine script.

릴리즈 노트:
I have made some significant changes and corrections, so I would recommend everyone to use the current version. I've also changed the defualt values for ones that give a better start.

New features and improvements:
- RSI filter, which sets the maximum RSI threshold for a long position and the minimum for a short,
- Ema trend picker, which gives more options for determining the trend. You can select individual Emas now,
- Back tester table will turn green if the strategy is profitable;

I hope that you'll find the strategy better to trade now. Feel free to test different values that go well outside the standard.

I will be glad if you let me know in the comments how you're doing and which values are the most profitable for you. I can also add inputs for 3commas robots if there is more interest.

Take care folks
릴리즈 노트:
Added strategy Alerts for Long/Short open, further improvements (eg. minimal value of histogram bars)
릴리즈 노트:
The update took me a little longer than I expected, but I tested it all the more. The update includes:
- Order fill alerts fix
- RSI filter extended with:
- Confirmation of the trade direction with RSI, i.e. for Long the RSI must rise a specified number of bars back, vice versa for Short
- Minimum RSI value for Long and maximum for Short
- Now EMAs can be plotted to the chart, but this is disabled by default (Style tab)
- 3commas connector – even with a free subscription you should be able to use it, as they start and stop the bots along with the orders

Tip: If you want the order fill alerts to show what type of order has just been triggered, then use placeholder {{}} in the alert message.

Warning: By taking the MACD histogram values from the lower TF (which is not the default setting anymore), it can get stuck although it may work you for several trades in a row. Unfortunately, I haven't found a way to prevent this, so use lower TF with caution and check it more often. Those who want to make sure it doesn't get stuck need to use the same or higher TFs. The same goes for the RSI values.

Instructions for the 3commas connector:
  • 1. First, you need to prepare 3commas Long/Short bots that will only listen to custom TV signals.
  • 2. Inputs for the 3commas bot can be found at the end of the user inputs.
  • 3. Once you have entered the required details into the inputs, turn on 3commas comments. They should appear on the chart (looks messy).
  • 4. Now you can add the alert where you should paste the 3commas Webhook URL: .
  • 5. For the alert message text insert the placeholder {{strategy.order.comment}} and delete the rest. 6. Once the alert is saved, you can turn off those 3commas comments to have a clearer chart.
  • 7. With a new alert, the bot and trade should launch.
릴리즈 노트:
Minor update of the default values so that it shows trades on every security
릴리즈 노트:
The script made trades sometimes too often, even when conditions weren't ideal, so I have added a pause for trades. (also applied on the screenshot with a pause for three bars)
릴리즈 노트:
Cleanup of unused variables and RSI min-max values put inline
릴리즈 노트:
  • Ability to pause trades after a certain number of loosing trades in a row (in one direction)
  • Simplified (and thus accelerated) way of calculating the average histogram
  • Pullback filter is fixed as its logic was flawed

TODO: The script should start using arrays to store histogram values. This will be a major change because today when we want to go short, ta.highest looks back for example 10 bars and if 9 out of 10 bars have negative histogram values, even a very low positive value on the 10th bar will be evaluated as exceptionaly high for a short (turn on a separate MACD histogram like I have in the picture to see this). With the use of arrays it will only compare values in its positive spectrum and will ignore values from the negative spectrum.
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.


이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?