The “Delorean Trend Detection Oscillator” is a technical indicator designed for the DAX40 future, originally created by Domenec and adapted by me. Its purpose is to detect market trends using an oscillator that combines basic trend calculations, smoothing, and tactical trading crosses.
The indicator helps traders identify trend direction and strength, as well as potential entry/exit points based on crosses.
//Delorean Trend Detection Oscilator from DEIAT
//original code from Domenec of www.deinversoratrader.com (DEIAT)
//re-edited code by @mboliart - https://x.com/mboliart
//version: v.1.1 (adapted for DAX40 future)
//date: 17/07/2025
//period=20 for dax40 - original from DEIAT = 10
//trade=8 (must be a correct relation between period or trading plan)
//Detection period for highest and lowest
p=period
//highest point of period
alt=highest[p](high)
//lowest point of period
baj=lowest[p](low)
//basic trend
Ten=((alt-close)/(alt-baj))*-100
//smoothed Trend
Trend=exponentialaverage[p](Ten)
//tactical trading cross
cross=exponentialaverage[trade](Trend)
//vistual hisotgram
hist=(Trend-cross)
//coloured histogram depending of trend
//initial strong up trend
if hist >0 then
r=0
g=100
b=0
//strong down trend
else
r=255
g=0
b=0
endif
//strong up trend
if Trend>-50 and hist>0 and hist>hist[1] then
r=0
g=0
b=255
endif
//not enough strong up trend
if Trend<-50 and hist>0 and hist>hist[1] then
r=124
g=252
b=0
endif
//less strong down trend
if Trend<-50 and hist<0 and hist>hist[1] then
r=255
g=255
b=0
endif
//not enoguh down trend
if Trend>-50 and hist<0 and hist>hist[1] then
r=184
g=134
b=11
endif
return Ten as "Trend" style(line,2), Trend as "smoothed Trend" style(line,2), cross as "trading cross" style(line,1) coloured(255,0,0), hist as "histogram" coloured(r,g,b,150) style(histogram,1), -50 as "inflection" coloured(0,0,150,100) style(dottedline,2)