Adaptive ATR-ADX Trend-V2 screener
Forums › ProRealTime English forum › ProScreener support › Adaptive ATR-ADX Trend-V2 screener
- This topic has 8 replies, 2 voices, and was last updated 6 years ago by groen200.
Viewing 9 posts - 1 through 9 (of 9 total)
-
-
08/14/2018 at 5:28 PM #7810708/14/2018 at 10:25 PM #78208
This is the screener, but it returns a price to be used a SL, is that what you want?
Adaptive ATR-ADX Trend-V2 screener123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100atrLen = 21m1 = 3.5 //"ATR Multiplier - ADX Rising"m2 = 1.75 //"ATR Multiplier - ADX Falling"adxLen = 14adxThresh = 30 //"ADX Threshold"aboveThresh = 1 //true, title = "ADX Above Threshold uses ATR Falling Multiplier Even if Rising?")useHeiken = 1 //(false, title = "Use Heiken-Ashi Bars (Source will be ohlc4)")source = MedianPrice// DI-Pos, DI-Neg, ADXhR = high-high[1]lR = -(low-low[1])if hr>lr thendmPos=max(hr,0)elsedmPos=0endifif lr>hr thendmNeg=max(lr,0)elsedmNeg=0endifsTR = (sTR[1] - sTR[1]) / adxLen + trsDMPos = (sDMPos[1] - sDMPos[1]) / adxLen + dmPossDMNeg = (sDMNeg[1] - sDMNeg[1]) / adxLen + dmNegDIP = sDMPos / sTR * 100DIN = sDMNeg / sTR * 100DX = abs(DIP - DIN) / (DIP + DIN) * 100aadx = average[adxLen](DX)// Heiken-Ashiif barindex<2 thenxClose = closexOpen = openelsexClose = TotalPricexOpen = (xOpen[1] + close[1]) / 2endifxHigh = max(high, max(xOpen, xClose))xLow = min(low, min(xOpen, xClose))// Trailing ATRv1 = abs(xHigh - xClose[1])v2 = abs(xLow - xClose[1])v3 = xHigh - xLowtrueRange = max(v1, max(v2, v3))if useHeiken thenatr = WilderAverage[atrLen](trueRange)elseatr = AverageTrueRange[atrLen]endifif aadx>aadx[1] and (adx < adxThresh or not aboveThresh) thenm=m1elsif aadx<aadx[1] or (adx > adxThresh and aboveThresh) thenm=m2elsem = m[1]endifif DIP >= DIN thenmUp=melsemUp=m2endifif DIN >= DIP thenmDn=melsemDn=m2endifif useHeiken thensrc=xClosec=Xcloset=(xHigh+xLow)/2elsesrc=sourcec=closet=MedianPriceendifup = t - mUp * atrdn = t + mDn * atrif max(src[1], c[1]) > TUp[1] thenTUp = max(up,TUp[1])elseTUp = upendifif min(src[1], c[1]) < TDown[1] thenTDown = min(dn, TDown[1])elseTDown = dnendif//trendif min(src,min(c,close))>TDown[1] thentrend=1elsif max(src,max(c,close))<TUp[1] thentrend=-1elsetrend=trend[1]endifif trend=1 thensstop=TUpelsesstop=TDownendifscreener [sstop] (sstop AS "sstop")08/15/2018 at 2:27 PM #7828508/15/2018 at 3:13 PM #78286There you go, but this one will display only the current crossings (I’ll change it later if it’s ok so far):
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101atrLen = 21m1 = 3.5 //"ATR Multiplier - ADX Rising"m2 = 1.75 //"ATR Multiplier - ADX Falling"adxLen = 14adxThresh = 30 //"ADX Threshold"aboveThresh = 1 //true, title = "ADX Above Threshold uses ATR Falling Multiplier Even if Rising?")useHeiken = 1 //(false, title = "Use Heiken-Ashi Bars (Source will be ohlc4)")source = MedianPrice// DI-Pos, DI-Neg, ADXhR = high-high[1]lR = -(low-low[1])if hr>lr thendmPos=max(hr,0)elsedmPos=0endifif lr>hr thendmNeg=max(lr,0)elsedmNeg=0endifsTR = (sTR[1] - sTR[1]) / adxLen + trsDMPos = (sDMPos[1] - sDMPos[1]) / adxLen + dmPossDMNeg = (sDMNeg[1] - sDMNeg[1]) / adxLen + dmNegDIP = sDMPos / sTR * 100DIN = sDMNeg / sTR * 100DX = abs(DIP - DIN) / (DIP + DIN) * 100aadx = average[adxLen](DX)// Heiken-Ashiif barindex<2 thenxClose = closexOpen = openelsexClose = TotalPricexOpen = (xOpen[1] + close[1]) / 2endifxHigh = max(high, max(xOpen, xClose))xLow = min(low, min(xOpen, xClose))// Trailing ATRv1 = abs(xHigh - xClose[1])v2 = abs(xLow - xClose[1])v3 = xHigh - xLowtrueRange = max(v1, max(v2, v3))if useHeiken thenatr = WilderAverage[atrLen](trueRange)elseatr = AverageTrueRange[atrLen]endifif aadx>aadx[1] and (adx < adxThresh or not aboveThresh) thenm=m1elsif aadx<aadx[1] or (adx > adxThresh and aboveThresh) thenm=m2elsem = m[1]endifif DIP >= DIN thenmUp=melsemUp=m2endifif DIN >= DIP thenmDn=melsemDn=m2endifif useHeiken thensrc=xClosec=Xcloset=(xHigh+xLow)/2elsesrc=sourcec=closet=MedianPriceendifup = t - mUp * atrdn = t + mDn * atrif max(src[1], c[1]) > TUp[1] thenTUp = max(up,TUp[1])elseTUp = upendifif min(src[1], c[1]) < TDown[1] thenTDown = min(dn, TDown[1])elseTDown = dnendif//trendif min(src,min(c,close))>TDown[1] thentrend=1elsif max(src,max(c,close))<TUp[1] thentrend=-1elsetrend=trend[1]endifif trend=1 thensstop=TUpelsesstop=TDownendifx = sstop CROSSES OVER TypicalPrice OR sstop CROSSES UNDER TypicalPricescreener [x] (sstop AS "sstop")08/17/2018 at 8:48 AM #7843408/17/2018 at 9:26 AM #78438I helped you, I’m waiting for your answer!
08/17/2018 at 11:41 AM #7844008/17/2018 at 12:45 PM #7845908/17/2018 at 1:38 PM #78463 -
AuthorPosts
Viewing 9 posts - 1 through 9 (of 9 total)
Find exclusive trading pro-tools on
Similar topics: