lastBarsHigh = series.getHigh(index - 1);
thisBarsBidHigh = series.getBidHigh(index);
onTick()
and then build it up myself 🤔DataSeries dataSeries = dataContext.getDataSeries();
List<Tick> ticks = dataSeries.getInstrument().getTicks(
dataSeries.getStartTime(idx),
dataSeries.getEndTime(idx)
);
// now I can use methods like tick.isAskTick() or tick.getVolume() and create my own data structure that represents the bid/ask chart I initially wanted
Java:@Override public void onTick(Tick tick) { if (tick.getTime() < start) return; if (tick.getTime() >= end) { series.setComplete(ind); // Note: if this is the current unfinished bar, the bar will not be set to complete ind++; updateNextInterval(); } // lines added by Spin if (tick.isAskTick()){ //run some code } else { // run other code } double tickAskSize = tick.getAskSize(); series.setDouble(tickAskSize, Values.tickAskSize); // end lines added by Spin vp.onTick(tick); }
Ohh, how did you do that? Would love to see how they are doing it 😁 Did you decompile one of their jars? 😬I glanced over the VolumeImprint-Study and in onTick (line 1720 and following)
onTick()
would be necessary for realtime while calculate()
serves me with an option for historic data as well as when a bar is completed.calculate()
and then update my signal/study whenever a bar was finished because it's enough for the scenario I have in mind. Hey Spin,It seems that you are right, @Ulfheoynn : it is indeed no longer present in that bundle. That must mean MW decided to no longer make the code public.
Most of the 'Study-help'-pages on the MW site have the phrase 'Study might be available on request', so perhaps a mail to support@motivewave.com might help ?