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 lorem, Yesterday, 09:18 AM
      5 responses
      19 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by WHICKED, Today, 12:56 PM
      2 responses
      15 views
      0 likes
      Last Post WHICKED
      by WHICKED
       
      Started by Felix Reichert, Today, 02:12 PM
      0 responses
      1 view
      0 likes
      Last Post Felix Reichert  
      Started by Tim-c, Today, 02:10 PM
      0 responses
      1 view
      0 likes
      Last Post Tim-c
      by Tim-c
       
      Started by cre8able, Today, 01:16 PM
      2 responses
      9 views
      0 likes
      Last Post cre8able  
      Working...
      X