I developed an indicator that uses OnMarketData and has a lot of pretty complex calculations.
The idea is to use it on Renko bars, more specifically I am trying to use it on the Unirenko bars created by Ninjatrader_ChelseaB.
The indicator works perfectly on absolutely any other bar type ( range bar, time based, etc ). But I am struggling with the renko bars.
Sometimes the indicator loads perfectly on the charts, but most of the time I get the error : Object reference not set to an instance of an object.
I reviewed the code a thousand times, rewrote it step by step 2 times, with each step checking the loading on the chart, everything fine, but when i have the finished product, after one or two loads on renko, i always get the same error.
I also noticed that it messes up with the database. I tried everything I could find on this forum, including repairing the database ( this helps temporarily ), clearing the cache, but my indicator only loads on renko charts when it wants to.
Since I also use the indicator on range bars also and never ever encountered any issues, i suppose the problem might be with the formation of the renko bars.
Is there something i am missing ? perhaps the renko bar type has issues? or would it be the formation of the renko bars ( based on the 1 min candles )?
Comment