Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

input file is selected

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    input file is selected

    Dear NT support,
    Can you please answer the following questions:
    1. how can I make sure file parameter used as below does not left empty (actual file being selected), before closing the dialog:
    2. how can i show error message box (MessageBox.Show does not work) to force user to select a file before she closes the dialog
    Code:
    [NinjaScriptProperty]
    [PropertyEditor("NinjaTrader.Gui.Tools.FilePathPick er", Filter = "CSV Files (*.csv)|*.CSV")]
    [Display(Name = "CSV input file")]
    public string BarSignalFile { get ; set ; }
    Thank you in advance

    #2
    Hello stasha,

    You could set a default path, if the user chooses something else then it would change to the user selection. There wouldn't be a way to alert or stop the dialog if a selection was not made, you would have to supply a default either to start with or after the script starts if it was blank.

    If there is not a default that could be used a message could be put on the chart letting the user know that the indicator was not configured and they need to re configure its path.

    Comment


      #3
      Not sure if the NinjaTrader FilePathPicker works similarly to the System.Windows.Forms.OpenFileDialog method, but the latter returns a System.Windows.Forms.DialogResult and checking if that is System.Windows.Forms.DialogResult.OK allows one to determine if a file was selected or not and act as appropriate.

      Thanks.
      Multi-Dimensional Managed Trading
      jeronymite
      NinjaTrader Ecosystem Vendor - Mizpah Software

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by sjsj2732, 03-23-2026, 04:31 AM
      0 responses
      155 views
      0 likes
      Last Post sjsj2732  
      Started by NullPointStrategies, 03-13-2026, 05:17 AM
      0 responses
      357 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      393 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      182 views
      1 like
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      138 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Working...
      X