Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.

    JesseNinjaTrader Customer Service

    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 bmartz, Today, 09:30 AM
      2 responses
      11 views
      0 likes
      Last Post bltdavid  
      Started by f.saeidi, Today, 11:02 AM
      1 response
      3 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by geotrades1, Today, 10:02 AM
      4 responses
      12 views
      0 likes
      Last Post geotrades1  
      Started by rajendrasubedi2023, Today, 09:50 AM
      3 responses
      16 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by lorem, Today, 09:18 AM
      2 responses
      11 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X