This ProBuilder script is designed to identify potential trend reversals by tracking higher highs and higher lows for uptrends, and lower highs and lower lows for downtrends. It visually represents these points on a chart and provides signals for possible entry points based on these patterns.
PeriodsInMinorSwing=20
hhminorprice=0
llminorprice=close*1000
for i = 1 to PeriodsInMinorSwing*2 do
if high[i]>hhminorprice then
hhminorbar = barindex[i]
hhminorprice = high[i]
$LL[II]=LLminorprice
II=I+1
endif
if low[i]2 and b>2 then
uptrend = $top[a-1]>$top[a-2] and $bot[b-1]>$bot[b-2]
dntrend = $top[a-1]<$top[a-2] and $bot[b-1]<$bot[b-2]
if uptrend and close>$top[a-1] and close[1]<$top[a-1] and lastsig<>$top[a-1] then
drawarrowup(barindex,low) coloured("green")
lastsig =$top[a-1]
endif
if dntrend and close<$bot[b-1] and close[1]>$bot[b-1] and lastsig<>$bot[b-1] then
drawarrowdown(barindex,high) coloured("crimson")
lastsig =$bot[b-1]
endif
endif
return
The code operates by performing the following steps:
This script is useful for traders looking to automate the detection of trend reversals based on classic technical analysis techniques.
Check out this related content for more information:
https://www.prorealcode.com/topic/plus-haut-plus-bas-2/#post-214777
Visit Link