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 cmoran13, 04-16-2026, 01:02 PM
      0 responses
      71 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      42 views
      0 likes
      Last Post PaulMohn  
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      167 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      101 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      165 views
      2 likes
      Last Post CaptainJack  
      Working...
      X