this is one of my favorite scripts as it represents a whole trading system that has given me very good results!
I have only used it on Bitcoin so far but I am sure it will also work for other instruments.
The original code to this was created by LazyBear, so all props to him for this great script!
I have linked his original post down below.
You can find the full rules to the system in this PDF (which has also been taken from LBs post):
Here is a short summary of the rules:
Go long when (all conditions have to be met):
- The green line is above 50
- The green line is above the red line
- The green line is above the orange line
- The close is above the upper Band of the Price Action Channel
- The candles close is above its open
- (The green line is below 68)
Go short when (all conditions have to be met):
- The green line is below 50
- The green line is below the red line
- The green line is below the orange line
- The close is below the lower band of the Price Action Channel
- The candles close is below its open
- (The green line is above 32)
- Any of these conditions aren't true anymore.
I have marked two of the rules in brackets as they seem to cut out a lot of the profits this system generates. You can choose to still use these rules by checking the box that says "Use Original Ruleset" in the options.
The system also contains rules regarding the Heiken Ashi bars. However these aren't as specific as the other rules. This is where your personal judgement comes in and this part is hard to explain. Take a look at the PDF I have linked to get a better understanding.
So far, this is just the TDI trading system and LBs script, now what have I changed?
I have incorporated the Price Action Channel to the system and changed it so that it highlights the bars whenever the system is giving a signal. As long as the bars are green the system is giving a long signal, as long as they are red the system is giving a short signal. Keep in mind that this doesn't consider the bar size of the HA bars. I recommend coloring all bars grey via the chart settings in order to be able to see the bar highlighting properly.
I have also published the Price Action Channel seperately in case some of you wish to view the Channel.
I am fairly new to creating scripts so use it with caution and let me know what you think!
LBs original post:
The seperate Price Action Channel script:
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 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.
// // @author LazyBear // If you use this code in its orignal/modified form, do drop me a note. // //modified by Kurbelklaus study("KK_Traders Dynamic Index_Bar Highlighting", shorttitle="KK_TDI_BH") lengthrsi=input(13) src=close lengthband=input(34) lengthrsipl=input(2) lengthtradesl=input(7) lenH = input(5, minval=1, title="PAC Length High") lenL = input(5, minval=1, title="PAC Length Low") Ruleset=input(false,title="Use original Ruleset") r=rsi(src, lengthrsi) ma=sma(r,lengthband) offs=(1.6185 * stdev(r, lengthband)) up=ma+offs dn=ma-offs mid=(up+dn)/2 mab=sma(r, lengthrsipl) mbb=sma(r, lengthtradesl) hline(32) hline(50) hline(68) upl=plot(up, color=blue) dnl=plot(dn, color=blue) midl=plot(mid, color=orange, linewidth=2) fill(upl,midl, red, transp=90) fill(midl, dnl, green, transp=90) plot(mab, color=green, linewidth=2) plot(mbb, color=red, linewidth=2) // Bar - Highlighting, TDI TS // PAC srcH = high srcL = low smmaH = na(smmaH) ? sma(srcH, lenH) : (smmaH * (lenH - 1) + srcH) / lenH smmaL = na(smmaL) ? sma(srcL, lenL) : (smmaL * (lenL - 1) + srcL) / lenL // long= Ruleset ? mab > mbb and mab > mid and mab > 50 and mab < 68 and close > smmaH and close > open : mab > mbb and mab > mid and mab > 50 and close > smmaH and close > open short= Ruleset ? mab < mbb and mab < mid and mab < 50 and mab > 32 and close < smmaL and open > close : mab < mbb and mab < mid and mab < 50 and close < smmaL and open > close barcolor(long ? green : na) barcolor(short ? red : na) //