TradeStation Development Environment

About the Resource Editor

Note: This feature has been provided as a developer preview and is not yet ready for production use

The EasyLanguage Resource Editor is used to create or edit a form that is associated with an EasyLanguage analysis technique, or strategy. Controls such as buttons, text boxes, etc. can be added to the form from the Toolbox and you can arrange the controls to fit anywhere within the form and change their appearance as desired. You can edit the properties of form controls using the Properties editor, including assign events to handler methods in your EasyLanguage code.

 

 

Additional Information

 

Insert drawing object components easily into a form and then position as desired. Code for each object is automatically generated and appears in the designer code.

Designer-generated-code creates variables, instantiates objects, and sets up event handlers.

Properties and event handler linkage are set in the Properties editor.

Adding a Form to an EasyLanguage Document

 

A form is added to an EasyLanguage document (Indicator, ShowMe, strategy, etc.) using the following steps:

  1. Open an existing EasyLanguage document (or create a new one) to which you want to add a form.
  2. Right-click anywhere in the EasyLanguage document and select Add Form from the shortcut menu.
  3. A blank form will appear on a tab in the editor and will be named Form1 by default (for the first form).
  4. To display the form as part of your analysis technique or strategy you'll also need insert a line of EasyLanguage code into your document that calls the Show() method for the specified form, such as:
          Once form1.show();
Editing a Form

 

Once a form has been attached to your EasyLanguage document you are ready to add controls to the form and edit their properties, as follows:

  1. With a form selected, open the Toolbox and use the Winforms tab to view the available controls. (See About The Toolbox for more about adding and removing controls and components from the Toolbox.)
  2. Double click on a the name of a control (i.e. Button, ComboBox, etc) in the ToolBox to add it to the form. The selected control will first appear in the upper-left corner of the form.
  3. Drag the control to a new position in the form and re-size the control as desired.
  4. With a control selected, go to the Properties panel to view and change the text, appearance, and other properties for the control.
Using Events with Form Controls

 

Use the following steps to connect a control to an event handler method in your EasyLanguage code. The method will be called when an event occurs (eg. when a button is pressed or when a form is re-sized).

  1. Select the desired form control.
  2. In the Properties editor, click the Event icon. Then, double-click the available event type in the Event column (Click, Resize, SelectedIndexChanged, Scroll, etc). Note that not all controls have associated events.

    The name of the generated event handler will appear in the Value column and the code for the event handler method will be inserted into your EasyLanguage document.
  3. Click the EasyLanguage document tab to view the code. You will see code similar to:
    method void CheckBox1_Click( elsystem.Object sender, elsystem.EventArgs args )
    begin
            { Insert your EasyLanguage statements here }
    end;
    In this example, the method will run whenever a checkbox event fires, indicating that the checkbox was checked or unchecked.