TrendSniper1989

TREND SNIPER (Final Version)

TrendSniper1989 Cập nhật   
/ This script calculates the daily resistance and support levels. The entry is when the close breaks these levels.
// Then it sets 4 exit lines, if the backtraces these lines you've got your normal exit.
// If the close crosses the TP you've got your TP exit. And if the close crosses the SL you've got your SL exit.
// This is the good part --> If the close crosses the first line the SL get's raised to the entry level.
// This way you cut down on the SL losses and turn a lot of SL trades into (almost) break even trades.
// You can adjust the resistance and support levels to remove the 'little wick entries', this raises the profitability.
// You can also choose the security resolution. I recommend using a higher timeframe than the chart resolution.
// The exit source is also changeable. The HLC3 works best for me, but you can try others if you want.

I could really use some feedback. I want the resistance and support levels to remain on the same position when in trade. But it sometimes changes mid trade.
If you know how to fix this I will be forever grateful. If you have any feedback don't hesitate to give it to me straight. Thanks in advance and have a wonderful day :)
Phát hành các Ghi chú:
Made some adjustments so the settings menu looks a lot clearer and it's more intuitive to use. Also cleaned up the code a little bit and removed some options I made for testing.
Phát hành các Ghi chú:
Fixed a stupid mistake :P
Phát hành các Ghi chú:
I cleaned up the code a little bit more. No structural changes, only optical.
Phát hành các Ghi chú:
I think I fixed the problem of the moving resistance/support lines mid trade. In a very easy way also by using barstate.isnew. It now uses the values on the start of every candle. I also changed the entry source because the HLC3 uses the close and therefore gives different results on the chart then in real life.
Phát hành các Ghi chú:
Because I was using the HL2/HLC3 source, the charted results did not match the alert results. So I created the OH2 and OL2 which better suit the purpose. I've also tried to further limit the amount of SL trades by adding the purple line, which sits between the resistance/support and the first black line. This is the value the trailing SL uses and is also a back-tracing line. Furthermore I fixed the error that when there's a entry and exit on the same candle it didn't show the right BG color and bar color. I also made some changes to make it look better.
Phát hành các Ghi chú:
There can be a difference between chart results and alert results. That's because of the entry and exit sources. So I made a couple of options that don't use the close and i've added the close for if you want to use the close anyway. I also fixed the problem of false results because of a moving resistance/support line mid candle. It now uses the value it had at the start of the previous candle. Which means it now lags one bar behind but I don't think this will be a problem. Also fixed some plotshape color errors due to recent changes.
Phát hành các Ghi chú:
MAJOR UPDATE !

I've been very busy making the chart results match the alert results, and doing my best to ensure the resistance/support levels don't change mid trade. I think I fixed those errors and the indicator is much closer to reality now. I also fixed some plotshape errors so now all colors match with what happens. Even on the one candle trades everything matches. These changes make it easier to backtest results and make them more accurate. A 100% perfect precision doesn't exist but I think, with these changes, the indicator gets close.

I also added an optional function; SL Protection. It's sound really cool but all it does is cancel a trade if there was a SL trade less then 3 bars ago. This way you don't have to worry about 2 or 3 SL trades in a row within a small timeframe. It might block some good trades as well, so you must calculate if it is worth using.

So far I haven't really received any feedback. If you got a minute to spare, please let me know what you think of it and/or where you want to see improvement. I would really appreciate it !
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 đồ?