Parameter DateTime HH:mm:ss
21.06.2020 17.07

Algorithmic Trading with NinjaTrader

Frank

? Can I pls have an example of how I add a parameter with HH:mm:ss ?

? Is it even possible to pop-up a time-picker in parameters-UI ?

? If not possible directly as HH:mm:ss, do I need to calc in seconds and format it as HH:mm:ss ?

  • Epistemophilic
    27.06.2020 20:08
    [NinjaScriptProperty]
    [PropertyEditor("NinjaTrader.Gui.Tools.TimeEditorKey")]
    [Display(Name = "StartTrading", Order = 0, GroupName = "Trading Hours")]
    public DateTime StartTrading
    { get; set; }

    if (State == State.SetDefaults)

    {
          StartTrading = DateTime.Parse("09:30", System.Globalization.CultureInfo.InvariantCulture);
    }