GomMultiTFIndicator is the same, but with public properties you can change in indicator properties window.
Here are the exposed methods :
You must implement GomOnReset (happens at the end of each period as defined in ResetMode), GomOnData : data arriving form second time series, and GomOnDataDone : all data from second time series sent, updating main time series.
Keep in mind you never know on which time series you are, so always use CurrentBars, Highs etc to be sure you are always on the main time series.
There also a public property IsRTH you can always call in your code, that will tell if you are RTH or not on your main Time Series.
Whatever reset mode is ,you can always also call GomOnNewBar, GomOnNewDay, GomOnNewWeek etc...
GomOnNewBar is called on the beginning of each bar, then all the GomOnData, then GomOnDataDone.
The following 6 users say Thank You to gomi for this post:
@gomi: I do not think that it is lack of interest.. I simply do not understand what you are doing, and then I do not know how to use it and how to make it work.
For example, I tried to set the indicator to RTH, but there was no impact on my chart. The RTH information is not stored in the master data for the instrument, so I am not astonished that there is not impact.
There are lots of variables defined in the Indicator Base, but I can't figure out what this all is needed for.
-> is OddType
-> is RTH
-> OnNew (no idea what the resets are needed for)
-> MaxDate and MinDate
So the whole structure is unclear, I guess I need some guidance.
No problem, please don't feel you have to test it because you're the OP ;-)
RTH info is fetched from the master instrument setting, so if the contract has a default session of 24/5, RTH info won't show
These objects are internal objects, you don't need them.
The OnNew events are triggered during bar progression : each new bar fires OnNewBar, each new Day fires OnNewDay etc...
OnReset is fired depending on the Reset property : if it's Daily, it fires on the start of each new day, if it's weekly it fires on the start of each new week etc...
You could use the OnNewDay and OnNewWeek, but the OnReset method has all the logic already built to be synchronized to Reset property, so you can create daily/monthly/weekly indies with zero line of code.
Yes, I know, what you mean is ..... aargh... documentation.!.
The following 3 users say Thank You to gomi for this post:
But there is no information on RTH i nthe master data. When I set your volume indicator to RTH, the RTH session in my template is simply ignored. I am not astonished, because how shall the indicator find out, which session is the RTH session?
Strange, when I try to add a daily data series to an intraday data series, NinjaTrader always inserts the daily data in the middle of the day. Actually I have had cases, where the data was inserted, before it was available and other cases, where it was inserted one session too late. So how do you make sure that the data is inserted when it should be inserted and not earlier or later?
This problem was the reason that I did not include an option to calculate intraday indicators from daily data for my MTF indicators. It always yielded false results. The reason is that the heuristic of NinjaTrader to add daily timestamps is flawed, if you use a session template with more than one session per day.
So I do not see how to use MTF indicators in RTH mode (your volume MTF example did not work), and I do not see how to add daily data.
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).
Well, I guess it won't work if session template has more than 1 session per day.
Concerning bar synchronization, session aligns the timestamps of the time series, and always starts with BarsInProgress=0 , the BarsInProgress=1 etc.. So you always know when the bars will arrive, don't you ?
I have only tested with intraday time frames, though. (not daily, weekly, etc...)
The following 2 users say Thank You to gomi for this post:
If you add a second BarSeries to produce a standard MTF indicator, it will always use the same session template as selected for the primary DataSeries. Or does your indicator use a different method?
Under instruments settings I have typically defined a multi-session template, which reflects the contractual trading times of the instrument - imagine the trading day divided into the RTH session and the remaining parts of the Globex session.
What does the RTH option change in this case?
The following user says Thank You to Fat Tails for this post:
The indicator considers that the default session template used in the instrument manager is what defines RTH, whatever session template you use for your chart.
RTH option will consider all time intervals defined in the master instrument session template as RTH.
If you split the whole 24/24 interval in the master instrument session template, so that all the hours are contained in the session template, obviously the RTH option won't do anything.
The following user says Thank You to gomi for this post: