I got motivated by Mike and had a coding relapse, so I'd like to introduce new Profiling toolkit
Basic Functionality :
This Profiling toolkit is a Ninjatrader indicator that
* Reads NinjaTickFiles at high speed
* Computes POC,VAH,VAL,VWAP tick by tick
* Automatically computes Daily, Weekly and Monthly.
* Is able to compute minute periodicity profiles
* Stores the history of profiles.
This allows very easy access to Profile values in indicators or strategies.
For instance,
to access the POC of current Daily profile,you use :
Profiles[ProfilePeriod.Daily].POCs[0]
to access yesterdays's VAH, you use :
Profiles[ProfilePeriod.Daily].VAHs[1]
to access VAL two days ago, you use :
Profiles[ProfilePeriod.Daily].VALs[2]
to access last month's VWAP, you use :
Profiles[ProfilePeriod.Monthly].VWAPs[1]
Daily, Weekly and Monthly profiles are automatically computed
Adding Minute periodicities
You can add Minute profiles if you need them, in this case, you must declare them in the OnStartUp:
AddMinutePeriod(120) for instance for 2 hour period
Then you access the minute profile with Profiles[120].POCs[0] etc....
Knowing if it's OK to plot at current time
The indicator also exposes IsTimeOK, which is true if the current time is in plotting time (RTH time in RTH mode)
Parameters
The parameters are stripped down when compared to GomMP, but there is :
RTH start
RTH length
AHMode (RTH only or All)
Smoothing
Typeof profiles : Volume, Tick, Time
Coding guidelines :
You must include #using Gom.Profile in your code
Indicators:
To init : if you need Minute periods, override GomOnStartUp and add AddMinutePeriod(n)
To use values, override GomOnBarUpdateDone, and call the Profiles object, and test IsTimeOK.
Strategies
To init, initialize the object in OnStartUp()
To use values, call Profiles object in in OnBarUpdate()
Files :
GomProfileBase : don't instantiate directly on a chart, but use in strategies
GomProfileTSIndyTest1 : test indicator, allows you to change period and view data[0]...data[3]
GomProfileTSIndyTest2 : shows how is easy it is to create a chart in a couple of lines, showing DailyPoc[0], DailyPoc[1],WeeklyPoc[1] and HourlyPoc[1]