A request was made in the probuilder forum, to code the « Smart Money Index » for ProRealTime, based on the definition :
First half hour and last hour can be customised in HHMMSS format at beginning of the code, to allow usage for any index from any timezone.
Code to use only with intraday timeframes where the 4 time settings exist.
Further reading for interpretation of the Smart Money Index : https://en.wikipedia.org/wiki/Smart_money_index
// PRC Smart Money Index
// 16.12.2020 mod 21.12.2020
// Noobywan @ www.prorealcode.com
// Sharing ProRealTime Knowledge
// Forum ProBuilder user Vinks_o_7 request
// Customise first 30 minutes for chosen index in user timezone
Opening30start=153000
Opening30finish=160000
// Customise last 60 minutes for chosen index in user timezone
Closing60start=210000
Closing60finish=220000
//
if opentime=Opening30start then
p1=open
endif
if time=Opening30finish then
p2=close
endif
if opentime=Closing60start then
p3=close[1]
endif
if time=Closing60finish and p1<>0 and p3<>0 then
p4=close
smartmoney=smartmoney-(p2-p1)+(p4-p3)
endif
//
return smartmoney as "Smart Money Index"