A request was made in the probuilder forum, to code the « Smart Money Index » for ProRealTime, based on the definition :
- Calculate the S&P 500’s nominal gain or loss during the first half hour of trading (9:30 a.m. ET – 10 a.m. ET)
- Calculate the S&P 500’s nominal gain or loss during the last hour of trading (3 p.m. ET – 4 p.m. ET)
- Today’s Smart Money Index = yesterday’s Smart Money Index – the market’s gain or loss in the first half hour of trading today + the market’s gain (or loss) in the last hour of trading day.
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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
// 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" |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials