I'm trying to use the method OnStartUp() but I get the following message error (code CS0155): 'NinjaTrader.NinjaScript.Indicators.NpgsqlReader.O nStartUp()': no suitable method found to override. I tried the method Initialize() too but got the same error. Any ideas on what might be the problem and how to fix it?
My code starts this way:
namespace NinjaTrader.NinjaScript.Indicators
{
public class NpgsqlReader : Indicator
{
protected override void OnStartUp()
{
...
I have just fixed the problem: I just added the code in the method OnBarUpdate, and used a if(CurrentBar == 0) to be sure the code would be executed just once.
Thanks
Claudio
Comment