Custom Symbol Refresh

If you have a disconnect from the eSignal feed, you could use an ESPL script like the following to request a refresh of the intra-day bars to the foundation charts that make up your custom symbols, and then merge the foundation charts into the custom symbol file to refresh the custom symbol chart.   This script illustrates doing the refresh for two composite custom symbols, and you can expand on the example to service your custom symbols.

To use this script, cut the example from this e-mail, and paste the script into the script editor.   Edit the script to service the particulars of your custom symbols, and then save the script under a name of your choosing.   To execute the script, click on the #1 button on the script editor, or click the #1 menu item that show on the main menu when the script editor is showing.   Each part of the ESPL script is documented so you can follow along with what is happening.

Let's assume your composite custom symbol is plotting a day session symbol and an evening session symbol.   The objective is to update the chart for the day session symbol, update the chart for the evening session symbol, and then merge both of these data sets into the composite custom symbol to update the custom file.   The ESPL procedure called MergeCustom does these three steps.   We will pass three parameters to this procedure:

SymC  will be a variable holding the name of the custom chart.
Sym1  will be a variable holding the name of the 1st chart (day session).
Sym2  will be a variable holding the name of the 2nd chart (evening session).

procedure MergeCustom(symC, sym1, sym2: string);
begin
  Chart(sym1);  
  {opening a chart makes a request for update from the DBC bar server}

  if Finished(40) then mnuCloseWindow.click; 
  {we pause for the update to be received, or for a maximum of 40 sec}
  {after the pause, we close the chart to save the updated data set}

  Chart(sym2);
  {now we open the chart for the 2nd symbol so it gets updated by the DBC server}

  if Finished(40) then mnuCloseWindow.click;  
   {we pause for this chart as well.   When the data is received we will continue, or }
  {we will time out after 40 seconds and go on anyway.}
  {at this point, both foundation charts should have complete data sets.}
  {we will merge each data set into the custom chart file to fill in the data it is missing}

  Merge(sym1, symC);
  {this statement merges the 1st chart into our custom chart}

  Merge(sym2, symC);
  {this statement merges the 2nd chart into our custom chart}
end;

{the MergeCustom procedure was written in a general way to take any two foundation }
{charts and merge them into any custom symbol}
{now we will use MergeCustom by giving it specific charts to merge as parameters}
{you will edit the parameters in the next section to match your needs}

begin
  if Who=1 then begin
    {this test is so we only respond to clicking the #1 button or #1 menu}

    MergeCustom('SP1HH.5', 'SP H1.5', 'WP H1.5');
    {this assumes our custom symbol is    SP1HH = SP H1 | WP H1 }
    {and we follow a 5-minute custom file that needs to be updated}

    MergeCustom('US1HH.1', 'US H1.1', 'ZB H1.1');
    {this assumes our custom symbol is    US1HH = US H1 | ZB H1 }
    {and we follow a 1-minute file that needs to be updated}
  end;
end;