Hi,
With the Bressert scalper improved, the signal disappears at certain times and the completed turn is no longer visible. Only a flat line remains.
Could it be if he goes through a lower level?
After some time, depending on the used timeframe, the movement returns.
Would you mind sharing the code of this custom indicator? Otherwise I cannot help regarding this issue.
Hi Nicolas,
A late answer, I had not noticed your question. Here’s the code:
(I changed the original EMA and STO period from 8/13 to 20/14)
EMAperiod=20
STOperiod=14
once DssBuffer = 50
once MitBuffer = 30
smoothcoefficient = 2.6 / (1 + EMAperiod)
if barindex>STOperiod then
//price range definitions
HighRange = Highest[STOperiod](high)
LowRange = Lowest[STOperiod](low)
delta = Close – LowRange
rrange = HighRange-LowRange
if rrange = 0 then
rrange = 1*ticksize
endif
MIT = delta/rrange*100.0
MitBuffer = ROUND(smoothcoefficient * (MIT – MitBuffer[1]) + MitBuffer[1])
//DSS calculation
HighRange=0
LowRange=stoperiod*1000
for i = 0 to Stoperiod do
HighRange=Max(MitBuffer[i],HighRange)
LowRange=Min(MitBuffer[i],LowRange)
next
delta = MitBuffer – LowRange
DSS = delta/(HighRange – LowRange)*100.0
DssBuffer = smoothcoefficient * (DSS – DssBuffer[1]) + DssBuffer[1]
endif
// 30.144.255 / blue
// 255.105.180 / hot pink
RETURN dssbuffer as “DSS Bressert Scalper”, 20 coloured(102,102,102) as “20 level”, 80 coloured(102,102,102) as “80 level”, 50 coloured(102,102,102) as “50 level”
Do you still have time to look at my post ‘Trading range recognize and breakout’ from the last weeks?
> For clarity of messages on ProRealCode’s forums, please use the “insert code PRT” button to separate the text of the code part! Thank you! <<
🙂
Try (not tested) this line 8:
if barindex>max(STOperiod,EMAperiod) then
Thanks Roberto,
Unfortunately this is not the solution, it sometimes still goes wrong
Division by zero issue in DSS calculation, the below code should fix the issue:
EMAperiod=20
STOperiod=14
once DssBuffer = 50
once MitBuffer = 30
once smoothcoefficient = 2.6 / (1 + EMAperiod)
if barindex>max(EMAperiod,STOperiod) then
//price range definitions
HighRange = Highest[STOperiod](high)
LowRange = Lowest[STOperiod](low)
delta = Close - LowRange
rrange = HighRange-LowRange
rrange = max(rrange,1*ticksize)
MIT = delta/rrange*100.0
MitBuffer = ROUND(smoothcoefficient * (MIT - MitBuffer[1]) + MitBuffer[1])
//DSS calculation
HighRange=0
LowRange=1000
for i = 0 to Stoperiod-1 do
HighRange=Max(MitBuffer[i],HighRange)
LowRange=Min(MitBuffer[i],LowRange)
next
delta = MitBuffer - LowRange
DSS = delta/(max(1*ticksize,HighRange - LowRange))*100.0
DssBuffer = smoothcoefficient * (DSS - DssBuffer[1]) + DssBuffer[1]
endif
// 30.144.255 / blue
// 255.105.180 / hot pink
RETURN dssbuffer as "DSS Bressert Scalper", 20 coloured(102,102,102) as "20 level", 80 coloured(102,102,102) as "80 level", 50 coloured(102,102,102) as "50 level"