This is what I currently have. I didn't think the string needed to be serialized. It is not saving. I am a bit unsure where to start with getting it serialized.
Thank you for any help or input.
Regards,
James
if (State == State.SetDefaults)
{
Description = @" IntradayGapBars ";
Name = "TOTgaps";
Calculate = Calculate.OnBarClose;
IsOverlay = true;
DisplayInDataBox = false;
DrawOnPricePanel = true;
DrawHorizontalGridLines = true;
DrawVerticalGridLines = true;
PaintPriceMarkers = false;
ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right;
//Disable this property if your indicator requires custom values that cumulate with each new market data event.
//See Help Guide for additional information.
IsSuspendedWhileInactive = true;
// Default values for string inputs
SessionStartTimeInput = "06:45"; // Default: 6:45 AM
SessionEndTimeInput = "16:00"; // Default: 2:00 PM
}
else if (State == State.Configure)
{
// Convert string inputs to TimeSpan
if (!TimeSpan.TryParse(SessionStartTimeInput, out SessionStartTime))
throw new Exception("Invalid Session Start Time format. Use HH:mm.");
if (!TimeSpan.TryParse(SessionEndTimeInput, out SessionEndTime))
throw new Exception("Invalid Session End Time format. Use HH:mm.");
// Properties
// User-modifiable properties for session start and end times
[NinjaScriptProperty]
[Display(Name = "Session Start Time (HH:mm)", Description = "Start time of the session in HH:mm format", Order = 98, GroupName = "GapBars Data Series")]
public string SessionStartTimeInput { get; set; }
[NinjaScriptProperty]
[Display(Name = "Session End Time (HH:mm)", Description = "End time of the session in HH:mm format", Order = 99, GroupName = "GapBars Data Series")]
public string SessionEndTimeInput { get; set; }

Comment