public static bool IsTimeTrue(double starttime, double endtime)
{
if (TimeSpan.Compare(DateTime.Now.TimeOfDay, TimeSpan.FromHours(starttime)) < 0)
{
return false;
}
else
if (TimeSpan.Compare(DateTime.Now.TimeOfDay, TimeSpan.FromHours(endtime)) > 0)
return false;
else
return true;
Print("Mission accomplished");
}
An object reference is required for non static field, method or property "ninjatrader.Strategy.StrategyBase.Print(Strin g)"
its working fine if i use it inside of OnMarketUpdate(), or OnBarUpdate(),
may i know whats causing this to come up in a custom method.
If its non static why am i able to use it in these functions at all, without an object reference

Comment