Debugging getDataSeries

fugaz

New member
Joined
Jun 16, 2025
Posts
1
Likes
0
I'm new to MotiveWave and developing a study (and a strategy) involving multiple timeframes on the same instrument.

I have inconsistent behaviour with getDataSeries, I sometimes get a null value in return. I'm trying to debug but I'm struggling. I do have this in the log:

22:00:06 WARNING StudyWrapper::setData() error Cannot invoke "com.motivewave.platform.sdk.common.DataSeries.size()" because "<local4>" is null
java.lang.NullPointerException: Cannot invoke "com.motivewave.platform.sdk.common.DataSeries.size()" because "<local4>" is null
at ambrate.Test.calculateValues(Test.java:31)
at com.motivewave.platform.sdk.study.Study.onDataSeriesUpdated(Study.java:209)
at bo.az.a(StudyWrapper.java:598)
at com.motivewave.platform.ui.draw.graph.ay.a(StudyGraph.java:76)
at com.motivewave.platform.ui.draw.graph.l.a(CompositeGraph.java:3464)
at com.motivewave.platform.ui.draw.graph.l.a(CompositeGraph.java:3447)
at bh.g.o(DataLoader.java:225)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
at com.motivewave.common.util.g.a(ConcurrentList.java:319)
at bh.h.a(DataSource.java:192)
at bh.g.onTick(DataLoader.java:225)
at bh.i.dispatchTick(DelegateTicker.java:89)
at bh.i.lambda$new$2(DelegateTicker.java:53)
at com.motivewave.platform.databean.LiveTicker.recordTick(LiveTicker.java:1028)
at ai.i.b(IBQuoteConsumer.java:194)
at ai.i.a(IBQuoteConsumer.java:57)
at ai.i.b(IBQuoteConsumer.java:29)
at java.base/java.lang.Thread.run(Thread.java:1474)

and the stripped code attached.
Any hints to figure out what I'm missing?
 

Attachments

Top