The Trend Balance Point is a system created by J. Welles Wilder and published in his book ‘New Concepts In Technical Trading Systems’. The system uses momentums to define whether to enter the market long or short and provide a Stop Loss and a Target Price for each entry. Positions are opened on THE CLOSE of the current day and closed as soon as the Target Price or the Stop Loss is hit.
According to Mr. Wilder the system works well in ranging markets and when ADX is below 20.
I personally never used this system and I haven’t done any backtesting either because PRT doesn’t allow to buy on close.
Blue skies!
periodo=2
i=1
f=i+periodo
MFieri=dclose(i)-dclose(f)
MFaltroieri=dclose(i+1)-dclose(f+1)
massimo=MAX(MFieri,MFaltroieri)
minimo=MIN(MFieri,MFaltroieri)
//Calcolo TBP
TBPiflong=dclose(periodo)+minimo
TBPifshort=dclose(periodo)+massimo
//Calcolo dello Stop loss
atr1=dhigh(1)-dlow(1)
atr2=dhigh(1)-dclose(2)
atr3=dlow(1)-dclose(2)
a=MAX(atr1,atr2)
b=max(a,atr3)
SLiflong=((dclose(1)+DLow(1)+dhigh(1))/3)-b
SLifshort=((dclose(1)+DLow(1)+dhigh(1))/3)+b
////Calcolo del Target Price
TPiflong=(2*((dclose(1)+DLow(1)+dhigh(1))/3))-dlow(1)
TPifshort=(2*((dclose(1)+DLow(1)+dhigh(1))/3))-dhigh(1)
TPL=round(100*TPiflong)/100
TPS=round(100*TPifshort)/100
SLL=round(100*SLiflong)/100
SLS=round(100*SLifshort)/100
once long=0
once short=0
if (close crosses over TBPifshort) then
long=1
short=0
endif
if (close crosses under TBPiflong) then
long=0
short=1
endif
if short=1 then
if close crosses over TBPiflong then
long=1
short=0
endif
endif
if long=1 then
DRAWARROWUP(barindex, low*0.999) coloured (0,255,0)
endif
if long[1]=1 then
DRAWTEXT("TP=#TPL#", barindex, high*1.005)
DRAWTEXT("SL=#SLL#", barindex, low*0.995)
endif
if short=1 then
DRAWARROWDOWN(barindex, high*1.001) coloured (255,0,0)
endif
if short[1]=1 then
DRAWTEXT("SL=#SLS#", barindex, high*1.005)
DRAWTEXT("TP=#TPS#", barindex, low*0.995)
endif
return