Chart to Show on All Layers

Q:  Is there a way in E10 to maintain a chart in Layer 1 and display the same chart with all the same drawing lines & fibs in another layer, say layer 3?  What I want to do is maintain the chart once and display exactly the same chart in a different layer.

A:  Yes.   Go to Setup | System and select a layer to Pin.   Select as the pinned layer something like layer 9.   Now select layer 9 and add content such as the chart you want to show when viewing other layers.   Any content you put on the pinned layer will continue to show on all layers.

5-Minute Bar Sets Hourly High or Low

Q:  How do you design an alert when a 5 minute bar is either the high for the last hour or the low for the last hour?

A:  Here is an example where the high and low of the last twelve 5-minute bars is found and then tested to see if the current bar is setting that value.   12 bars were used on the 5-minute chart because that amounts to the last hour.

ESPL: Custom Symbol

Q:  I did this in E10 ESPL.  I have a Quote Page open with IBM, MSFT, and CSCO quotes which show correctly.  But my custom symbol MANO1 shows up blank after I click the Run button.  What is the problem?

procedure Mano11;
var price, MANO1: real;               
{ if (TimeStr >= '07:20') and (TimeStr <= '14:00') then}
  Feed := eSignal;
  price:= Get('IBM') + Get('MSFT') + Get('CSCO');

A:  Steps I took: 

  1. Click Setup | Custom Symbols
  2. Enter the code in the editor.   NOTE:  I do not have a Procedure as in your example. The presence of Procedure is the problem.
  3. Click the Save button, then the Compile button which has the gear image.  Then click the Run button.
  4. Open the quote page for eSignal and it shows the custom symbol updating.

ESPL: Custom Quote List

Q:  I’d like to create and edit daily a custom symbol with about 50 or more stocks in the index.  Instead of editing ESPL code, would it be possible to reference an array in the E10 spreadsheet, which can be updated more easily?  What would the basic code look like?

A:  Use the predefined   sList   variable which is a TStringList variable.  TStringList has useful methods for working with a list of strings.   The data source file would be an ASCII file that you edit using Notepad, or it could be a custom quote page file, such as   MyList.dat.    When using a custom quote file the records have a market group character in the 1st character position, followed by the symbol.   This example copies the symbol from the 2nd character position.

Range chart for EUR/USD

Q: I am totally confused as to what is happening here as I am getting very different bars on my 3R charts on EW (Eur/Usd+) compared to E10 (Eur/Usd).  EW needs 3R to give 3 pips per bar whereas the other is 30R to give 3 pips per bar. Which is correct and how do I rectify this?

A:  The R parameter is relative to the number of decimals used in the chart scale.

In EW you have 4 decimals showing so R3 is  0.0003.
In E10 you have 5 decimals showing, so the same value is R30 to get 0.00030.
If you want both to be the same, then both EW and E10 need to use the same decimal format.
I will assume your preference is to show the 1/10th pip digit, so lets change EW to show 5 decimals.  In EW go to the chart properties form by pressing CTRL+P on the chart.  Change the Price formats from the current  #.#### selections to the #.##### (5 decimal) selections.
Then EW will use  R30  charts instead of R3.

ESPL: Emulate Workspace Tabs

Q:  I have used Ensign for years…and I am very happy with it. I look at about 14 markets. I set up each market with 2-3 charts in a workspace. I click onto a workspace and this works well for me.  I was trying to use the Layer function in Ensign 10 for the same effect, but the numbered tabs do not label that particular market, there are only 9 tabs, and my understanding is that it requires more CPU.   Is there any chance of having layout tabs in Ensign 10 that serves the same function as the workspace tabs in Ensign Windows?

A:  There are no plans to add a tab control which shows layout names to replicate the EW feature.  However, the E10 ESPL language is very powerful and could be used to create the tabs feature.  This is the essence of the ESPL implementation of a tab control.

Starting with a New Project, put a tab control on the form, and resized the form and the tab control.  At design time, edited the TABS property to add names for the tabs, such as is shown on the form, using words of ‘First’, ‘Second’, ‘Third’ etc. 

In the Change event for the tab control, write code that opens different layouts using the Layout function. Here is the code example. 

procedure TabControl1Change(Sender: TObject);
  Case tabControl1.tabIndex of
    0: Layout('ALayoutName');
    1: Layout('2ndLayout');
    2: Layout('3rdLayout');

Edit the example so you have tab names that are meaningful and open the layouts using layout names you use.   Each tab would have a case number entry.

ESPL: Format statement

Q:  I cannot get the format command to work with a variable enclosed in brackets.  This example gives an error.

strText:=’The Total Volume was ‘ + Format(‘%12.0n’,[vTotalVolume]);

A:  The parameter needs to be of type ‘real’. The example you gave evaluates to type ‘integer’.   This example works where .0 is appended to the value so it is treated as a ‘real’.

strText:=’The Total Volume was ‘ + Format(‘%12.0n’,[vTotalVolume]);

Interactive Broker Chart Volumes

Q:  Why does my 15-second chart from IB have less volume than the same chart in Ensign?  When I refresh the Ensign chart from IB, the volume difference is corrected.

A: The higher volume bars in Ensign should be considered to be more correct than the IB chart, and here is why.   IB is a sampled feed, meaning they do not send all ticks.  The IB chart is charting the ticks seen and summing the tick volumes on those ticks. Ticks NOT sent, because it is a sampled feed, are totally ignored.

Ensign, on the other hand, compares the tick volume on the tick received with the change in total volume. Then they match, Ensign uses the tick volume value. When they differ, obviously some ticks were not sent and Ensign adds a filler tick with the needed tick volume to stay in sync with total volume.  These inserted ticks with the missing tick volume are the source of the larger volume values shown in Ensign compared to IB.

When the tick database is refreshed, Ensign receives 1 second records from IB to work with and this erases the filler ticks with the missing tick volume.  Thus the refreshed result looks more like the IB chart.  The refresh has forced Ensign to miss the ticks that the IB chart missed.  What Ensign is doing to account for missing volume in the live feed it better than what IB is doing.  The chart Ensign shows with the inserted missing tick volume is MORE like the charts from other data vendor who send all ticks.  It is recommended that refresh only be used when data is missing.

FYI, Ensign 10 does the same thing for the Yahoo Finance feed which is also a sampled feed.  Ensign 10 watches the change in total volume to calculate the tick volume that must have occurred since the last tick was received.

Median Filter Formula

Q:  My favorite robust statistic is always non-linear tools. To that end I do not like averages but like medians.

Median:  Sort the list of numbers from smallest to biggest. When the count is an odd number, the Median is the middle number.  When the count is an even number, the Median is the midpoint between the two middle numbers.  It would be nice if this were listed on the Ensign studies list.

A:  The Median Filter formula has been added to all study property forms where there is a drop down component to select from 11 average formula. The Median Filter entry is on the bottom of the list.  For example, you can put on the Moving Average study and select the Median Filter formula.

TWS Auto Logoff Timer

Q:  How do I change the time when TWS does its daily shut down?

A:  Use the TWS Configure button to edit the time for the shut down.

TWS Auto Logoff Time

Then in Ensign, on the connection form for the Interactive Brokers feed, enter a time for Ensign to rerun TWS that is 1 minute later than the auto logoff time.