IB Gateway Feed

Ensign 10 and Ensign Windows can receive the Interactive Broker feed through the IB Gateway or through the IB Trader Workstation.   The advantage of the IB Gateway is it does not have the overhead of showing a quote page or trade platform.   Also, the IB Gateway is not required to be shut down each day whereas TWS does shut down.

Get the IB Gateway from the IB web site using this link.  It installs with the TWS.

http://download.interactivebrokers.com/download/tws40_install.exe

Gateway can be found in the Start menu, All Programs | Interactive Brokers folder.  Drag the Gateway icon to the desktop so there is a desktop link named IB Gateway.

For Ensign Windows, run Gateway and manually connect.   Ensign Windows will find Gateway running and connect to it to receive the feed from Interactive Brokers.

For Ensign 10, check the box Use IB Gateway instead of TWS found on the Setup | Feeds form.  Ensign 10 can run IB Gateway and accomplish the login process.

 IB Gateway uses the same Username and Password as is used by TWS.   Note in the above example that the Reconnect time has been blanked out which is appropriate since Gateway remains running and does not need to be rerun by Ensign each day.

To log in to IB Gateway the 1st time, you need to change the bullet selection to IB API.  Then enter your Username and Password.

You must change the port setting that Gateway listens on for Ensign to connect to it.   In Gateway, click menu Configure | Settings | API | Settings and change the port to 7496.  And create the entry in Trusted IP Addresses for  127.0.0.1  as shown here.

Day Session Range

Q:   I need to view the ES on an all-sessions chart.  But I would like to have a DYO start at 9:30 and end at 16:15.  I would like it to find the high and low during that time which would allow me to display the range on the message text.

A:  Use a Daily Price Lines tool to find the day session only high and low, and a DYO to calculate and show the range in the message text.

The DPL will find the Today High and Today Low, but have the Day Session box checked so these values are found using only the 9:30 to 16:15 data.  Their values are saved in the GVs as shown so the DYO can calculate and show the range.

Where Files are Saved

Q:  There needs to be a better explanation about how to save charts, save layouts, and using the backup folder.

A:  Although the answer and examples will use Ensign 10 folders and paths, the information is applicable to Ensign Windows.

Charts:  When a chart is opened from the charts form or from a quote page, the process reads the chart’s property file (if one exits), loads the chart’s data file and brings the bars on the chart current by extracting from database files, and then dresses the chart with study and draw tool objects.   If a chart is being opened for the first time, it will not have a property file, and so the default C:/Ensign10/Inifile/Chart.ini file is read.  Chart property files are located in the C:/Ensign10/Property folder using the chart symbol in the filename.

Studies and Draw Tools that belong to the chart are located in the C:/Ensign10/Study folder and use the chart symbol in the filename.

Layouts:  When a layout is opened, the layout script contains information about which forms to open, where to position them, and how to dress the charts with studies and tools.  The layout file possesses the chart properties, and the chart objects.  Thus, a chart opened by a layout does not read from the C:/Ensign10/Property folder nor from the C:/Ensign10/Study folder.   Layout files are located in the C:/Ensign10/Layout folder with a sub-folder for each of the eight layout form tabs.

The layout file is saved when you use the Save or Save As buttons on the layout form.  You should resave layouts using different names when you are evolving your layout content so that you have an earlier version of the layout if you experience a difficulty.

The pop-up menu for Save Layout (hot key CTRL+W) executes the same code as the Save button on the Layout form.

Templates:  Templates are a collection of studies and draw tool objects that are stored as a file so the collection can be applied to a chart.  Template files are located in the C:/Ensign10/Templates folder with a sub-folder for each of the eight template form tabs. 

Template files are saved when you use the Save or Save As buttons on the template form.  You should resave templates using different names when you are evolving your template content so that you have an earlier version of the template if you experience a difficulty and want to return to an earlier version.

Backups:  You are encouraged to have the Setup | System option checked to Backup Templates on Exit.  This backup feature will backup several important folders, including layouts.  Upon program exit, important files will be copied to the folder C:/Ensign10/AutoBackup which has sub-folders for each day of the week.  Thus, there could be a useful image of your files from Monday if they need to be restored on Wednesday.

Another backup and restore feature is found on the Setup | System | Maintenance form.  Perform task #14 to create an extensive backup to folder C:/Ensign10Backup.  And performing task #15 would restore this backup from the same folder.  This manual backup image is more extensive and is independent of the backup made on program exit.

The backups are accomplished by copying files.  Thus any file could be restored by using Windows Explorer to copy the file from the backup location to its appropriate folder under the C:/Ensign10 folder.

Undelete:  The chart objects form has an Undelete button which when clicked will restore the last deleted chart object.   The undelete is accomplished by reloading a template of the chart objects that was saved in a C:/Ensign10/Backup folder prior to the deletion.   Though this was intended for use by Ensign 10 behind the scene, this folder might have a useful copy of how a chart was dressed with studies and draw tools if a template file is accidentally deleted or corrupted in the C:/Ensign10/Templates folder.

Personal Backups:  Trading is a serious endeavor, and should be treated as such.  You should make your own backups to devices which are separate from the computer’s hard disk.   I recommend a free program called EZBackitup and use it on a daily basis to back up important files and folders to an external hard disk or to jump drives.  It is easy to create a backup script by dragging files or folders from a navigation tree to the backup list.  Jump drives are inexpensive, so I backup to a different one each day of the week.

Gann 2-Bar Swings

CH Choong: ‘Despite Gann’s reputation for the many esoteric studies that he used to make his trading decisions, here is one study, the Gann’s mechanical trend indicator that is easy to understand and straightforward that works across all time frames. Recently, a couple of traders who are interested in Gann Swings asked me to share with them the basic of x-Bar Swings rules and I felt compelled to highlight some basic qualifications of Gann x-Bar Swings that is available in Ensign Windows and Ensign 10. While the rules govern the x-bar Swings may be slightly different, the results are virtually the same over the long term.

What is a Gann Swing Chart?

One of the simplest of Gann’s methodologies is the use of a swing chart pattern as a study of market swings that takes advantage of the tendency for prices to ebb and flow in the short-term. The construction of a swing chart results in what Gann called a trend line indicator that is based on price movement on a bar-by-bar that is constantly evolving. And I have this to say that it is a good and simple price based method for objectively defining market short-term price direction, whether the trend in force is likely to continue or is there a sign of a reversal are present and for any pullback analysis with noticeable price pattern (between 1 and 3-days/bars or periods) in an underlying strong trend. Using the high and low for the price bar or period, whichever exceeds the previous x-bar or x-period becomes the trend line indicator.

In a nutshell, market swings are the true reflection of price movement and that means we can all know that “Price tells the trend”. It’s the simplest way to keep our mind focused on market direction at the beginning of a new swing and exiting at or near the end of that swing to await the development of a new swing trading opportunity. And finally, swing charts help filter out market noise with significant swing pivot highs and swing pivot lows as peaks and valleys on the chart for easier identification of support and resistance, especially with price levels traders.

I have listed the qualifications of a 2-Bar Swings below and I hope it helps you re-discover this simple and effective method for defining market trend that is purely based on price behaviors without any optimization.

Qualifications of 2-Bar Swings.

From downswing to upswing: Two-consecutives bars or periods of higher highs will start the upswing.

From upswing to downswings: Two-consecutives bars or periods of lower lows will start the downswing.

Inside bar:  All inside bars, including equal high or equal low inside bars, are neutral and they are not counted. We are only interested in price making x-bar higher highs for upswing and price making x-bar lower lows for downswing.

Outside bar:  From downswing to upswing: Outside bar close must be above prior bar high to be valid as 1st upswing.

From upswing to downswing: Outside bar close must be below prior bar low to be valid as 1st downswing.

Special Case with breakout of nearest swing pivot high or swing pivot low:
This option takes large price movements into consideration if the high or low of a swing pivot is broken before the set number of x-bars has occurred.

For example, with 2-bar Swings, an extreme price range occurs on the 1st upswing or 1st downswing. Normally this would not be considered until the 2nd bar/period had formed to make a complete swing pivot where as the breakout rule takes this extreme price movement into consideration straight away. If not, we will missed the significant swing pivot high or low.’

Examples of 2-Bar Swings and 3-Bar Swings

Gold and Silver Index $XAU

Larry Pesavento:  ‘Since December 2010 when the Gold and Silver index $XAU made a 3 drive to a top pattern, an interesting set of patterns has unfolded.   One of the most popular and accurate of all the patterns is the AB=CD pattern, also know as the Thunderbolt.  Three times this pattern has indicted a lower top in the downtrend of 2011.  It is now at the 4th lower top as we enter the last week of January 2012.   Remember that pattern recognition is not an exact methodology, but is a probability based approach that must be used with sound money management techniques and risk control measures.’

Ensign Map and Pesavento Patterns

Q:  I’m a recent subscriber to your software through Larry Pesavento.  I use Ensign Map and was wanting to know how I can tweak a chart with other indicators. I’ve looked at the Pensavento Pattern but I don’t really do much with Fibonacci since I’m not going in and out on an ETF throughout the day.  Is there another one or two technical indicators I should be using to predict where the market is going for the next day or two?

A:  Thank you for using Ensign. The Ensign Map, Pesavento Patterns and other tools are great tools and perhaps unique to Ensign.  Larry has been very helpful in getting tools like these in our software and then promoting them in the seminars he gives.  He uses these tools.

Use the Map with 2 minute charts, and refresh the chart’s data set to have at least 12,000 bars. Check the Maximum Bar setting and Resize Bar setting on the chart property form so the capacity is set to at least 15,000 bars. More is better. Maximum is 65530.

I encourage you to study the Fibonacci material and use the Pesavento Patterns as they are key to how Larry analyses the markets.  He is using the Map tool for time, the Fibonacci Levels for a price objective, and Pesavento Patterns for wave patterns. He is taking trades at the intersection of time and price and using risk money management principles to keep emotion out of the trade.

There is no tool that will predict. However the Map does give a suggestion based on statistics of the time when turns might happen, and Fibonacci Levels is a good tool for where turns will happen.  And I will add to the list the value of a simple trend line drawn under rising trends and above falling trends. Sometimes the simplest things like a trend line work better than all the complex math others use. 

Here is my list of greart articles to read. And read the articles linked to these articles.

Gann 2-Bar Swings

Choong: ‘The simplicity of Gann x-bar Swings as a trend line indicator works much better with products that trend such as the spot forex or futures currency in spotting 1~3 day/bar corrections. When the market is not trending (ie. going sideways) we see the swing line/counts dancing to the tune with 1 upswing, 1 downswing, 1,2 upswings, 1 downswing… back and forth. This is totally different from the percentage zigzag line because x-bar swings track price movement direction and market trends so closely.

(Click on any chart image to show enlarged).

Gann 2-bar Swings work extremely well with EUR.   Here is the EUR H2 5-min chart.

Once again, a big thank you for implementing Gann x-bar swings in Ensign Windows and Ensign 10.’

Fibonacci Levels on Log Scale

Q:  When I tick ‘log’ in chart properties, I get different scale numbers for the Fibonacci levels than I do when using ‘price’ scale.  That I expected.   However, when I change the height of the log chart, the Fibonacci numbers change slightly.  Why?

A:  The Fibonacci tool on a log scale is based on graphical distance, such as 50% of the wave’s vertical height.  When on the log scale, we have to reverse engineer a price for the pixel that is in the middle of the wave.  There is not a pixel for every possible price. We have to use a formula to calculate prices based on the scale range and the number of pixels in the range.  When the chart’s height changes, the number of pixels in the range changes which changes the result that is returned.

Take this example, which is simple.  Say the price interval is 10, and there are 3 pixels on the screen for this interval, one at the top, one at the bottom, and one in the middle. 10 divides by 2 intervals nicely to give a midpoint price calculation of 5.  Now increase the height to use 4 pixels.  One at the top, one at the bottom, and 2 in the middle. Now 10 is divided by 3 intervals. The pixels return prices of 3.3333 and 6.667. But there is no pixel to read that happens to fall on 5.

For a regular price scale, the calculation is based solely on price and returns the exact value of $5 in this example.  But for log scale, the program finds the pixel nearest the 50% distance and reverse engineers the pixel’s price which in this case would be 3.333 or 6.667.

Now this example is an extreme case of nearly no resolution with just 3 or 4 pixels. In actual use a chart has dozens of pixels vertically and the log scale will have a pixel very near the intended price.  But there is likely no pixel that is exactly and conveniently on the division point.

In summary, on regular price scale the calculated levels are the exact price. On the log scale, the pixel for where the line is placed computes a price for the pixel position.

Market Trends from 2-Bar Swings

2-bar swings require 2 higher highs or 2 lower lows without an interrupting counter move.  They are an indication that the underlying trend may change or simply a correction swing (between 1-period and 3-period) and the trend will continue when price breaks the nearest peak or valley.  With more than 3 consecutive sets of swing periods, either up swings or down swings, a high probability trade change has evolved at least temporarily.

Trend Change Swings

Up Trend and Down Trend