JustUncleL

Price Action Trading System v0.3 by JustUncleL

This is an updated and improved version of my "Price Action Trading strategy". I have added two extra optional filters, one is a trend direction filter based on the MACD slow EMA (17), blue line, and the other is a RSI (7) filter which works similarly to CCI (14) but slightly different dynamics (thank you to gianfranco60 for the suggestion). Also made a couple of corrections:
- input for lenLower minval=1 should be maxval=-1
- one bar pullback did not reset trigger, missing some alerts
Some Notes about usage:
- this is an alert indicator not a signal generator, each alert is a strong trend continuance candidate,
but should be treated on it's own merits by looking at chart dynamics and market conditions.
- will work well on trending markets only.
- works best on the first alert after MACD cross over.
- don't take trades when MACD and signal are close together.
- don't trade when channel and slow MA are flat or close together or
chopper (yellow and blue MA cross over quickly over short period).
Açık kaynak kodlu komut dosyası

Gerçek TradingView ruhuyla, bu komut dosyasının yazarı açık kaynak olarak yayınladı, böylece yatırımcılar bunu anlayabilir ve doğrulayabilir. Yazara tebrikler! Ücretsiz olarak kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Kullanım Koşulları tarafından belirlenmektedir. Bir grafikte kullanmak için favorilerinize ekleyebilirsiniz.

Bu komut dosyasını bir grafikte kullanmak ister misiniz?
//@version=2 
//Name: Price Action Channel Trading System v0.3 by JustUncleL
//Created By: JustUncleL on 3 Aug 2016
//Version: 0.3
//
//Description: 
//  This is an implementation of 'Price Action Channel, “The Gold line” Trading System'
//  for Binary Options, originally a scapling system, but without the MA cross "Arrow1".
//  This is a Trend following price action system.
//  To complete the setup instead of the two "Chandelier Stop" indications, 
//  I replaced them with a MACD(12,17,8) indicator.
//  This is suitable for 15min charts, with 2 to 4 candle (30min to 60min) expiry.
//
//  Call Entry:
//  - Green Triangle, confirmed by MACD background green.
//  - CCI Candles aqua.
//  - For best call entry wait for the price retrace back to the gold line, 
//    back inside channel also works well.
//
//  Put Entry:
//  - Red Triangle, confirmed by MACD background red.
//  - CCI Candles black.
//  - For best put entry wait for the price retrace on the gold line,
//    back inside channel also works well.
//
//Notes:
//  - will work well on trending patterns only.
//  - works best on the first alert after MACD cross over.
//  - don't take trades when MACD and signal are close together.
//  - don't trade when channel and slow MA are flat or close together or
//    chopper (yellow and blue MA cross over quickly over short period).
//
//Modifications:
//  0.3 : Added optional filters for trend direction from MACD slow EMA(17)
//        and also RSI(7) filter.
//        Some corrections: 
//        - input for lenLower minval=1 should be maxval=-1
//        - one bar pullback did not reset trigger, missing some alerts
//  0.2 : Use MACD instead of Chandelier Stop for filtering, giving
//        a simplier looking chart.
//  0.1 : Original version.
//
// reference:
//  - Chandelier Stop by pipCharlie (not used in this version)
//  - http://www.forexstrategiesresources.com/scalping-forex-strategies/73-price-action-channel-the-gold-line/
//  - Used some ideas from RSI Candles by glaz
//
study(title="Price Action Trading System v0.3 by JustUncleL",overlay = true, shorttitle="CCIPAT v0.3 by JustUncleL")
//
len = input(14, minval=1, title="CCI Length")
lenUpper = input(75, minval=1, title="CCI UpLevel")
lenLower = input(-75, maxval=-1, title="CCI DownLevel")
bars_on = input(true, title="Color CCI Bars")
src = input(close,title="CCI Source") 
lenLo   = input(5, minval=2, title="Low Channel Length")
lenHi   = input(5, minval=2, title="High Channel Length")
lenMe = input(4, minval=1, title="Median Channel Length")
//
fastLength = input(12, minval=1,title="MACD Fast Length")
slowLength=input(17,minval=1,title="MACD Slow Length")
signalLength=input(8,minval=1,title="MACD Signal Length")
//
rsiLen  = input(7,minval=2,title="RSI length")
rsiUpper= input(70,minval=50,maxval=100,title="RSI Upper limit")
rsiLower= input(30,maxval=50,minval=0,title="RSI Lower Limit")
//
filterM = input(true,title="Use MACD confilter filter")
filterR = input(true,title="Use RSI confirm filter")
filterE = input(true,title="Use Trend direction filter")
dCandles= input(4,minval=2,title="Direction test Candles")
//
rsiVal = rsi(src,rsiLen)
//
// Calculate MACD and color background
fastMC = ema(src, fastLength)
slowMC = ema(src, slowLength)
macd = fastMC - slowMC
signal = sma(macd, signalLength)
OutputSignal = signal > macd ? 1 : signal < macd ? -1 : 0
bgcolor(OutputSignal>0?red: OutputSignal<0?green:yellow, transp=90)
plot(slowMC,color=blue,transp=0,title="Slow EMA trend line", linewidth=2)

// Calculate and draw the Price Action channel 
emaLo = ema(low,lenLo)
emaHi = ema(high,lenHi)
emaMe = ema(hl2,lenMe)
plot(emaLo,title="Low Price Line",style=line,color=gray,transp=0,linewidth=2)
plot(emaHi,title="High Price Line",style=line,color=gray,transp=0,linewidth=2)
plot(emaMe,title="Median Price Line",style=line,color=orange,transp=0,linewidth=2)

// Calculate CCI
cciVal = cci(src, len)

// Calculate CCI indicating continuance of trend.
isup = cciVal > lenUpper
isdown = cciVal < lenLower
barcolor(bars_on ? isup ? aqua : isdown ? black : na : na )

// Check have alert and use MACD filter
cciup_alert = isup and close>open and (not filterR or rsiVal>rsiUpper) and (not filterM or OutputSignal<0) and 
              (not filterE or (emaMe>slowMC and rising(slowMC,dCandles))) ? na(cciup_alert[1]) ? 1 : cciup_alert[1]+1 : 0
ccidn_alert = isdown and close<open and (not filterR or rsiVal<rsiLower) and (not filterM or OutputSignal>0) and 
              (not filterE or (emaMe<slowMC and falling(slowMC,dCandles))) ? na(ccidn_alert[1]) ? 1 : ccidn_alert[1]+1 : 0
//
plotshape(cciup_alert==1? cciup_alert : na, title="CCIPAT Up Arrow", style=shape.triangleup,location=location.belowbar, color=olive, transp=0, size=size.small)
plotshape(ccidn_alert==1? ccidn_alert : na, title="CCIPAT Down Arrow", style=shape.triangledown,location=location.abovebar, color=red, transp=0, size=size.small)

// generate an alert if required.
alertcondition(cciup_alert==1 or ccidn_alert==1, title="CCIPAT Alert", message="CCIPAT Alert")

//EOF
JustUncleL

Yorumlar

Hello
I am a new trader, can you pls tell me how to download this script.
I find its interesting Price Action trading System.
can I test it, Thank you.
Antonios
+34 Cevap Gönder
Hello!
Your strategy semms to me very attractive. It's possible to get signals alerts on mail or sms.
Thanks for answer.
Kind regards
+6 Cevap Gönder
JustUncleL srecoenator
@srecoenator, The TradingView Alarm system can be setup to provide SMS or email alerts.
+1 Cevap Gönder
srecoenator JustUncleL
@JustUncleL, Thanks!
I will try set up my self :)
Kind regards
+2 Cevap Gönder
Hello Sir, May I know what the black candles represent. It's an interesting indicator. Thank you for the efforts.
+3 Cevap Gönder
shrav1988 shrav1988
@JustUncleL Hello Sir, Please ignore my question. I got the information from code. Thank you for briefing.
+1 Cevap Gönder
Hello how are ? Thank for the help youve been to the trading community. I love this system, I was wondering if you would happen to have this system file for the mt4 Platform?
+1 Cevap Gönder
thanks so much @JustUncleL !. thank you so much for all you've done for the community, you're an incredible person!

I was wondering if you knew if it were possible to get an alert when the candlebars turn aqua/black?

i know you can make an alert for the triangles, but wasnt sure if you were able to set up an alert when candlebars turn to aqua/black.

thanks so much again @JustUncleL!!
Cevap Gönder
JustUncleL foreignFerret7644
@foreignFerret7644, Yes you can I suggest add something like this after line 109, PS: I have not tested it.

https://pastebin.com/mu7F590c
Cevap Gönder
Ana Sayfa Hisse Senedi Takipçisi Forex Takipçisi Kripto Takipçisi Ekonomik Takvim Nasıl Çalışır Grafik Özellikleri Ücretlendirme Tanıdık yönlendirme Kurallarımız Destek Merkezi Web Sitesi & Aracı Kurum Çözümleri Görsel Bileşenler(Widget) Grafik Çözümleri Hafif Grafik Kitaplığı Blog ve Haberler Twitter
Profil Profil Ayarları Hesap ve Ödemeler Tavsiye edilen arkadaşlar Koinler Destek Kayıtlarım Destek Merkezi Özel Mesajlar Sohbet Çıkış