Register Studies and ColorBar

User defined studies and color bar tools can be registered in Ensign Windows.

procedure RegisterColorBar(name: string[; who: integer; row: integer]);

procedure RegisterStudy(name: string[; who: integer; row: integer]);

Description:
Use these procedures to register ESPL color bars and ESPL studies.  Registration will add the name to the Color Bar or Study drop down list, and remember a value to be assigned to the Who variable when the Color Bar or Study is selected from the list.

A previously registered name can be removed from the drop down list by omitting the Who parameter, or by passing -1.

If Name is already registered, its Who value will be reassigned to the Who parameter.

Parameters:
Name is the text to display in the Color Bar or Study drop down list.   Name will be used in the Study Data panel and the Chart Object’s list for your registered study.

Who is the value that will be assigned to the Who variable for this Color Bar or Study.   Who parameters should be in the range -1…255.

Row is the placement on the drop down list.   If Row is omitted or zero, then Name will be added to the bottom of the drop down list.

Example:

begin
  if who=1 then begin
    RegisterStudy('Average True Range',155); {add study to bottom of list}
    RegisterStudy('Average Volume',156,2);   {insert study on 2nd row}
    RegisterColorBar('Gap');                 {removes Ensign's Gap Color Bar study}
    RegisterStudy('Relative Strength',200}   {reassigns RSI to use your ESPL code}
  end;
end;