Speeded up image of an optimization
Tutorial 206 demonstrates the use of the OpenFileDialog class, wherby a user can select a file on their hard drive and download the contents of that file.
In this tutorial the file consists of a list of symbols that become part of the optimization.
Tutorial 206 is based on tutorial 100 and quicktip 37. Tutorial 100 demonstrated a simple optimization using the optimizer class. Quicktip 37 took the tutorial 100 program, which had a list of symbols to be used in the optimization ‘hard coded’ into the program, and instead made it so that the user to store the list of symbols into a txt file which the program would subsequently import.
Tutorial 206 extends the program further by taking the Quicktip 37 program and allowing the user to search for a file on their hard drive. The file is selected and the symbol data is imported.
The import of a file is done using the OpenFileDialog class. When the ‘Start Optimization’ button is pressed the OpenFileDialog is created and a File Explorer window opens. When a file is selected, the OpenFileDialog FileOK event is fired. This method then takes the name of the file that was clicked and extracts the contents into a TokenList.
The tokenlist is used in the creation of the ‘job’ for the optimiser. All the symbols and added using a loop.
The microsoft web page that talks about the OpenFileDialog class can be found here: https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.openfiledialog?view=windowsdesktop-8.0
Explanation of tutorial 206
Download the tutorial 206 program
Free download of tutorial 206 trading app for Gold Pass members
TO THE BEST OF MARKPLEX CORPORATION’S KNOWLEDGE, ALL OF THE INFORMATION ON THIS PAGE IS CORRECT, AND IT IS PROVIDED IN THE HOPE THAT IT WILL BE USEFUL. HOWEVER, MARKPLEX CORPORATION ASSUMES NO LIABILITY FOR ANY DAMAGES, DIRECT OR OTHERWISE, RESULTING FROM THE USE OF THIS INFORMATION AND/OR PROGRAM(S) DESCRIBED, AND NO WARRANTY IS MADE REGARDING ITS ACCURACY OR COMPLETENESS. USE OF THIS INFORMATION AND/OR PROGRAMS DESCRIBED IS AT YOUR OWN RISK.
ANY EASYLANGUAGE OR POWERLANGUAGE TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS (AND PARTS THEREOF) AND ASSOCIATED TECHNIQUES REFERRED TO, INCLUDED IN OR ATTACHED TO THIS TUTORIAL OR PROGRAM DESCRIPTION ARE EXAMPLES ONLY, AND HAVE BEEN INCLUDED SOLELY FOR EDUCATIONAL PURPOSES. MARKPLEX CORPORATION. DOES NOT RECOMMEND THAT YOU USE ANY SUCH TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS (OR ANY PARTS THEREOF) OR TECHNIQUES. THE USE OF ANY SUCH TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS AND TECHNIQUES DOES NOT GUARANTEE THAT YOU WILL MAKE PROFITS, INCREASE PROFITS, OR MINIMIZE LOSSES.