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 Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      561 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      325 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      547 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X