Section Alert With Two Flags, ESPL to Send Email, IB Data Lacking Hs Ls, #1357 Forecase of Bars' Final Volume

June 13 , 2007

16:32 Ensign Howard: Welcome to today's training class with Ensign.... This is Howard and I will be the trainer today.

 

16:33 Ensign Howard: The version that was in beta testing for the past month has been officially released. One of the 'fixes' in the program deals with a recent change by Interactive Brokers in how they timestamp their intra-day bars. They made a change between builds 872.6 (May version) and 873.3 (June version) in timestamping the intra-day bars.

16:35 Ensign Howard: For example, on a 15-minute bar the TWS Build 872.6 would return a time stamp of 08:00:00 for a particular bar, and then in the TWS Build 873.3 the SAME bar is now being returned with a timestamp of 08:15:00. It does not really matter to me which way they want to timestamp the bar because Ensign can adapt to what their standard is.

16:37 Ensign Howard: However, it does bother me that they made this change without warning, and it was only through careful comparison with an observant user that we figured out the difference between my chart using Build 872.6 and his chart using Build 873.3 was that IB implemented this change.

16:37 Ensign Howard: I am not 100% sure they intended to time stamp the refresh bars differently, or if the 873.3 characteristic will be considered a bug that they then fix in some future version to revert back to the way it was in versions through 872.6. Anyway, to make Ensign handle either timestamp, the current Ensign version which is 06-13 version has a new check box option on the Setup | Connection form labeled Using TWS Build 873.3

16:38 Ensign Howard: If you upgrade TWS to this build, then come to this connection form in Ensign and check the box. That way Ensign can adapt to the difference in how TWS returns the refresh timestamps. If you are using an older TWS, then leave the box unchecked.

16:40 Ensign Howard: The characteristic of the 8:15 timestamp instead of the original 8:00 timestamp is that all the refresh bars would be shifted one bar position on the chart. The first bar of the day session would be the last bar of the globex session. This was a big visual clue of the problem because the volume on the first bar was way too small.

16:42 Ensign Howard: Checking the option when using TWS 873.3 will shift the bars back into the correct position by adjusting the time stamp as needed to get it in the right position.

16:42 Ensign Howard: The DTN Market Access refresh works just fine regardless of the IB TWS version being used.

16:44 Ensign Howard: So in summary, go to the TWS menu for Help | About TWS and see the build number. If older than 873.3 leave the box on the Ensign Setup | Connection form unchecked. If using 873.3 or later then have the Using TWS build 873.3 option checked so Ensign will adapt to the new timestamp characteristic that stated with TWS version 873.3

16:44 Ensign Howard: Any questions about this IB situation?

16:45 ae: When IB discovers the error of their ways, will there be any change required from ensign?

16:46 Ensign Howard: If IB reverts back to the original timestamp then simply uncheck the Using TWS build 873.3 box in Ensign and we will no longer adjust the timestamp back.

16:47 Ensign Howard: So I made it a check box option in Ensign so those on older TWS builds can get the Ensign upgrade, and also revert Ensign back to original way if they revert back to original timestamps. So the box being checked implements an adjustment of their new timestamp being 1 bar period later in time. I mentioned the Ensign release is no longer in beta status.

16:58 bob: Howard what will this do to the pivot points with the new timestamp from IB

16:59 Ensign Howard: bob, the refresh timestamp issue will do nothing for pivot points. The fix in Ensign is to get the timestamps back to the original. The Ensign chart and its data files and their timestamps are unchanged, and thus all studies like Pivot Points will be unaffected.

 

http://www.ensignsoftware.com/whatsnew.htm

16:49 Ensign Howard: This What's New page lists changes to the program over the past 4 weeks.

16:49 Ensign Howard: One item on the list worth mentioning is that the (T) suffix can be used with the IB symbols for $VOL and $AD to plot a total of the up, down and unchanged volume and issues.

16:50 Ensign Howard: Example: $VOL-NASD(T) is the symbol to chart the total volume on the Nasdaq The (U) for UP, (D) for Down, (U) for unchanged were previously implemented.

16:51 Ensign Howard: And there are a couple dozen new DYO statements added which continue to expand the power of this scripting language.

16:51 Ensign Howard: Any questions about any of the changes in the Ensign upgrade?

 

16:54 Ensign Howard: The last couple of days there have been 30+ additions to the Q&A Knowledgebase, so please take time to read the new material posted so that you stay current with the training that can be obtained there.

 

Using Same Section Alert for Two Flags

16:56 Ensign Howard: I will take a moment to discuss #1649 further.

http://www.ensignsupport.com/email/1649.mhtml

16:57 Ensign Howard: The Section Message is an area at the bottom of the chart that is divided into 7 zones. This has been a popular place to post information, messages, or signal indicators.

16:58 Ensign Howard: One use would be to post a message when one gets a Buy signal, and a different message when one gets a Sell signal, and then we also have the state that this is a bar where neither signal is present.

17:00 Ensign Howard: In the DYO example, it illustrates using one DYO line to post 1 message, like a Buy message, and a 2nd DYO line to post the 2nd message, like a Sell message.

17:01 Ensign Howard: Note the Line Logic selection of A or B or Blank

17:01 Ensign Howard: If Line A is a True flag, then the Line A Label is the message that is printed. and the background color of the section will be the color from Line A.

17:02 Ensign Howard: If Line B is a True flag, then the Line B Label is printed in the Section, and the background color uses the Line B color.

17:03 Ensign Howard: If neither Line A nor Line B are true, then the section window will be blank, ie cleared of any message, and the color of the section will be the color of the False color box, which does show in the 6-13 version but is not showing in the image above made with an older version.

17:04 Ensign Howard: This Line Logic selection is thus an easy way to show either of 2 messages, or blank if neither are to be shown, using 3 different background colors in the section window.

17:04 Ensign Howard: Any question about this section message flexibility using the A or B or Blank type of selection? You will find there are other line pairs available on the Line Logic list box.

 

ESPL Sending Email

17:06 Ensign Howard: The next training topic will be in using ESPL to send an e-mail in response to some kind of an alert.

17:07 Ensign Howard: ESPL has a powerful feature in a statement to send an e-mail.

17:07 Ensign Howard: The statement is Email( ..... ) with a list of parameters.

17:08 Ensign Howard: The first parameter is the Subject text, and in the example is this the string 'Alert Text'

17:08 Ensign Howard: The 2nd parameter is the Senders e-mail address, and in the example I show my e-mail address.

17:09 Ensign Howard: the 3rd parameter is the path to a file or image to be attached, which could be a chart image file like those you create by pressing CTRL+J keys to upload to the Internet or save to the hard disk.

17:09 Ensign Howard: In the example I am not attaching any chart image. So the 3rd parameter is blank.

17:10 Ensign Howard: the 4th parameter is the e-mail address of the recipient, and since I am sending an e-mail to myself, I have my e-mail address in this position as well.

17:11 Ensign Howard: If there are more than 1 recipient, then simply continue to add parameters with the recipient's e-mail address in quotes, separated by commas.

17:11 Ensign Howard: When the ESPL executes the E-mail statement, the e-mail is immediately sent and does not queue in your Outbound folder.

17:12 Ensign Howard: The message for the body of the e-mail is going to be the content of the sList stringlist.

17:12 Ensign Howard: The first statement in the example was to clear this list, since it might have been used before. Statement is sList.Clear.

17:13 Ensign Howard: Then lines of message text can be added to the string list using the sList.Add('....'); type of statement(s).

17:13 Ensign Howard: This example shows one line of message text.

17:13 Ensign Howard: A 2nd line could be added like this: sList.Add('ES #F study alert triggered a Buy'); Have as many sList.Add statements as wanted to write yourself your message

17:15 Ensign Howard: Now you could surround this little example with statements like IF ESPL=51 then Begin..... End;

17:15 Ensign Howard: and put it on the chart as a study that is watching other studies, or some bar conditions, some price levels, or some Alert GV flags.

17:15 Ensign Howard: the example could become like this:

begin

If ESPL = 51 then begin

If GV(1) = 1 then begin

sList.clear;

slist.Add('Study alert on ES #F');17:18 Ensign Howard: email('Alert','ensign2@ensignsoftware.com','','ensign2@ensignsoftware.com');

end;

17:19 Ensign Howard: In this example, the ESPL=51 permits execution for this being a study added to the chart.

17:19 Ensign Howard: The test of GV(1) = 1 would watch for a True flag in the GV[1] global variable being true.

17:20 Ensign Howard: Now you need to be careful that you get one signal only so you are not e-mailing for every tick received.

17:21 Ensign Howard: You might reset the GV[1] flag using ESPL with something like SetGV(1, 0); where 1st parameter is the GV index and 2nd parameter is the value to assign or set.

17:21 Ensign Howard: The e-mail you send to yourself or others will show up in the InBox like this.

17:23 Ensign Howard: Any questions about the ESPL e-mail example? See the ESPL documentation for the topic Email.

17:25 NeWbie: In place of ESPL= 51 you could make it ESPL = any number?

17:28 Ensign Howard: almost, Newbie, use 51..59 which are preassigned values for use with ESPL as studies.

 

IB DATA Not Showing H or L as other Feeds

17:52 jr01: Howard I still have problems with IB data that I do not get the proper prices, for example today at 11:04 pacific time my bars showed a high of 1520.50 where as everyone else was showing 1520.75. I talked to ib and their charts are showing 1520.75 . What do I have to do to be able to get the proper prices so that I do not have to refresh intraday . BTW even when I did refresh it didn't change the number at all

17:56 jr01: None of the four bars show 1520.75 on mine but I had them look at their charts and they show 1520.75 and so do many others that have IB

17:55 Ensign Howard: I show a 11:04 high of 1520.50 and it is the next bar at :05 with the .75 high

17:56 Ensign Howard: ok, answer to me is real simple.... IB is not a feed that sends every tick. They are a sampled feed. And depending in the coincidence of the sample rate event for you, you may or may not have sampled when 1520.75 was the current tick to be read. Those who got the tick would be luck of the draw to have sampled when the price was on .75

17:57 jr01: So you are saying this is common and nothing can be done about it?

17:58 Ensign Howard: Yes it is common, and not under my control. If the TWS pushes the tick out the pipe, Ensign will catch it and chart it. They do not push every tick. It is a sampled feed.

17:59 Ensign Howard: It is quite like a movie film strip.... which is not real time either, but is a sampled image at a rate of 30 frames per second. That is so fast, our eyes think the film is the real thing, but is it 30 snap shots per second, or 30 still frames. The IB feed is like that.. and I think the sample rate can be as high as 2 frames or snapshots per second if the feed is not busy with a period of high activity.

18:00 virt5: sorry to interrupt but is it the same for esignal data, Howard...not pushing every tick?

18:01 Ensign Howard: ok, but esignal seems to push more than IB, but can also experience bad lag times when activity is high and the data starts to get queued

18:01 virt5: thanks

17:58 jr01: Does it depend on territories or what?

18:02 Ensign Howard: jr, I think it is an issue of load balancing, and pipeline bandwidth to the users. I do not think there is any consideration of territory or location of the user

18:04 Ensign Howard: Can I make the mental picture this way that at IB server they have a guy with a fire hose and he is spraying the last price into the buckets for 1000 connections. When the price is at 1520.50 he is spraying that price into the buckets and if during the pass across the buckets the price changes to 1520.75 then that is the new price sprayed. Perhaps he just happened to pass your bucket and you last saw 1520.50 and before he gets back to spraying you the price changes back off of 1520.75 to 1520.50

18:06 Ensign Howard: You never got spayed while it was on .75... and your next pass of getting data shows it is on .50 again. How many symbols do you follow in TWS? You can see the symbol count on the Setup | Manager form

18:06 jr: 77

18:09 Ensign Howard: ok, try purging symbols not needed and see if that frees up bandwidth for those that remain so they get updated more often.

16:10 jr: If we ask 10 different people we will have several different results because the people that told me they had 1520.75 also had ib. This is a volume chart.

18:16 Ensign Howard: jr, let me get on the soap box for a moment and comment on ticks. For years I have encouraged users not to worship ticks.

18:17 Ensign Howard: If you have ever visited the open outcry floor of the CME or CBOT you will soon realize that what is on a data feed is only are representation of what is happening in the trading pit. There is a guy with a walkie-talkie calling out prices as he sees them in the pit. Then there is a keyboard person typing in the ticks as fast as they can type Yet there is utter chaos going on in the pit with multiple buyers and sellers making eye contact and using hand signals to communicate.

18:19 Ensign Howard: At the end of the day these pit traders have to sit down with their decks and try to resolve the out trades, trades they thought they made with eye contact that are unmatched on the other side. So it is foolish to think a data feed represents perfection, or actual.

18:20 Randy: WIDE range of Fills around "electronic quotes"... very wide and delayed up to 1-4 seconds. except in NAS :-)

18:20 Ensign Howard: A data feed should be viewed as being a representation of what is happening, and not the gospel truth representing. You would all do well to adopt this attitude of 'representation' instead of the gospel truth

18:21 Ensign Howard: Even with electronic feeds, they are not the gospel truth, in my opinion either. Yes, it has potentially eliminated some delay in time, and some mistakes in typing, but it is still just a representation of what is happening. So if a missing tick on a chart makes you feel uncomfortable, then I suggest you are too close to the market.

18:23 jr01: Ok, then there is nothing that can be done as far as you are concerned and you are the expert in here in my opinion. Thank you Howard and thank you Randy for your input as well

18:23 Ensign Howard: Skilled traders with antique ticker tapes would still be better traders than most of you with cable feeds and computers. The skill is in the ability of the trader, and not the tick by tick perfection of the feed.

18:24 Bloo: But many people have realtime anti virus programs running and they take priority which can result Ensign to pause, right Howard?

18:24 Ensign Howard: bloo, pausing is more likely a hard disk or memory activity. Go read recent Q&A posting on topic of pausing

 

#1357 Forecast of Bars' Final Volume

18:25 Ensign Howard: ok, midtown, your turn

18:25 midtown: I am trying to get a DYO indicator to project 5 min volume every 30 seconds. I see the example, but I am lost after line B

http://www.ensignsupport.com/email/1357.mhtml

18:26 Ensign Howard: Ok, I think we are referring to this Q&A example

18:27 Ensign Howard: Line A reads the bar's volume value and plots it as the blue histogram

18:27 Ensign Howard: Line B is reading the chart's time frame which is the number of minutes per bar.

18:28 Ensign Howard: So in the example the 5-min chart returns a value of 5, which is multiplied by 60 to convert it to 300 seconds

18:29 Ensign Howard: Line D is returning current time in seconds, and dividing this by 300, so we can see current time in 5 minute chunks. Line D does the modulo thing so the partial current chunk is the remainder

18:29 midtown: What about line c?

18:30 Ensign Howard: Line C is just the current time in seconds from midnight. There are 86400 seconds per day and say we are at 30050 seconds into the day, which is the 101st 5-min period. The modulo of 30050 divided by 300 has a remainder of 50. So we have 100 full 300 second (5-min) periods, and the current period has 50 seconds into it.

18:32 Ensign Howard: Expression G is taking the current volume, and computing the ratio of the time remaining of 300 / 50 is 6 times more volume than the current value, since we have 6 times more time remaining.

18:32 midtown: Line E and F?

18:33 Ensign Howard: Line E and F just control the visual of this estimate to only show when the chart is working with the last bar on the chart. For all prior bars, the period is complete, and the volume is known. We only need a prediction for the last bar, whose index equals the total number of bars on the chart.

18:35 Ensign Howard: Line G is the expression (300 * Volume) / Remainder in seconds. This projection will update with each tick. So it is the estimated final 5-min volume, but updates with each tick, not just every 30- sec. Actual volume so far is the blue histogram and the estimated target is a red histogram drawn on top of the blue bar. So blue and red will converge as time runs out.

18:38 Ensign Howard: Another example would be actual volume of 500 when we are 150 seconds into a 300 second (5-min) bar.

18:38 Ensign Howard: 300 * 500 / 150 would be an estimated final volume of 1000

18:39 Ensign Howard: If we have used half the time (150 seconds) to get 500 vol, then the prediction is to get twice the volume in twice the time, ie 1000 volume

18:40 Ensign Howard: Thanks for attending class today. Have a good week of trading.... enjoy your summer.

18:41 @Buffy2: Thank you Howard

18:41 midtown: Thanks. This is going to take me time to digest.

18:41 Daniel: tks!

18:41 LB: thanks Howard

18:41 Kingly_Trader: Thanks Howard!!!