| Changes in GV for visual effects with 3 examples - Beta and ESPL - Example of Message text changes - Changes to be made BEFORE downloading today - INI file to change so won't auto connect - QnA |
Jan 12 , 2005
16:32 @Ensign_H: Welcome to today's training class with the developers
16:33 @Ensign_H: Today we will show some of the cool new things that can be done with Alert Objects and Global Variables. These features require that you have the 01-12 Beta version of the program which you can download now or later
Example one:

16:36 @Ensign_H: let me show a couple things about this chart example, which will introduce some of the new features in the Alert objects. This chart has on it a Support and Resistance tool for the horizontal lines.
6:37 @Ensign_H: there is a Pivot line at the 1185 level, and it is a bit hard to see in this image because of the yellow band. The yellow band was created with a single alert object, which I will show now.

16:38 @Ensign_H: on the Support and Resistance tool, (not shown) there is the ability to store the line value in a GV, and on that form - we had the Pivot line store in GV[22]. Now the pivot value is being used by this alert to create the yellow band.
16:40 @Ensign_H: panel A reads [22] and adds to the price 1 point, for a value of 1186
16:40 @Ensign_H: panel B reads the same [22] and subtracts one point from the pivot price, for a value of 1184
6:41 @Ensign_H: that part you could do before, but the new thing is the Position selection of 'A' & 'B' Value
16:41 @Ensign_H: this will tell the program to use both the panel A and the panel B values in plotting and the new thing implemented is support to use these 2 values to plot the spread marker which you see selected in the Show True area, and use the light yellow coloring.
6:42 @Ensign_H: also, note a few more Condition boxes have been added to the center frame.
16:43 @Ensign_H: The A Only entry has been renamed to Test A, Do B because that is what it was doing, it was testing just the logic of panel A, but then following up with execution of B in case B has some global action to perform after the panel A test.
16:43 @Ensign_H: have added a similar entry to Do A, Test B
16:44 @Ensign_H: A will execute ahead of B, and B might use some result from panel A but the Alert's boolean test will be just from panel B.
16:44 @Ensign_H: The Do A, Do B will do both panels and the alert result will always be True, which is perfect
16:45 @Ensign_H: for this particular example where we calculate two prices, and then want to always plot them for every bar.
16:44 fl: does the beta version support ESPL scripts ?
6:45 @Ensign_H: beta supports ESPL scripts, but we have the caution on our web site about using Beta if you use ESPL because we have not finished our testing of the impact of beta features on existing ESPL scripts.
16:46 @Ensign_H: so if you have ESPL, you can give Beta a try but may have to return to the released non-beta version if your ESPL does not behave the same as before.
16:46 fl: thank you
16:46 moe mentum: in the Show True, can you use "ZON" in your above example
16:47 @Ensign_H: yes moe, you can use zon, but in this example Zon would color the whole chart. So ZON is not a good marker for this Always True type of condition selection
16:47 moe mentum: the whole chart and not just the area/band?
16:47 @Ensign_H: correct moe, ZON colors top to bottom of the chart without regard to any prices.
16:48 zol2: in this example, is there a way to add a factor that's related to the scale? ie, .50 for es, or 5.0 for YM?
16:48 @Ensign_H: no zol, you would have to customize the price number for each different symbol
16:49 @Ensign_H: there is not a solid band, the spread marker comes in three widths and the example shows the widest width
Example 2:
16:49 @Ensign_H: now let me move on to the next example which is similar at the bottom of the chart I posted is a red wavy line
16:50 @Ensign_H: this happens to be a Stochastic line and an RSI line with the spread between these two filled in.
16:50 @Ensign_H: Stochastic is a regular study, and so is the RSI just a regular study
16:51 @Ensign_H: let me show the alert that fills in the space between these two study lines.

16:51 @Ensign_H: panel A fetches the %K Stochastic value, which is 76.42
16:52 @Ensign_H: panel B fetches the RSI value, which is 53.56
16:52 @Ensign_H: and the Marker Position uses the new 'A' & 'B' Value to use both in the plotting, and the marker chosen is the Red spread
16:53 @Ensign_H: any questions about these 2 examples of filling in color between two prices or 2 values?
16:53 google: no
16:54 @Ensign_H: hi google, welcome, long time no see, hoping you are feeling better.
16:54 moe mentum: what would be an example of a Do A, Test B use?
16:54 @Ensign_H: perhaps you want to read a bar value using panel A and store it in a GV, prior to panel B evaluating the GV or something like that which points out this principle.
16:55 @Ensign_H: note that panel A does not have a Write GV spinner box like panel B does
16:56 @Ensign_H: for the first 8 conditions, A and B are used to evaluate a boolean expression. the result of this Alert can then be stored in a GV using the Write Variable spinner in the Marker frame, right side. This is the same as before.
16:57 @Ensign_H: and then for the last 5 conditions beginning with Test A, Do B.... we know this is not a boolean expression. Therefore panel A will store its own value using the Write Variable spinner box in the Marker frame.
16:58 @Ensign_H: for all of the conditions, panel B can store its value in a different GV if wanted. The panel B store to a GV is the part that is new and might save a few steps is implementing some logic.
Example 3:

16:58 @Ensign_H: ok buffy let me recreate that visual and discuss it.... 1 moment

17:01 @Ensign_H: lets work upto the chart buffy reposted by starting with this post
17:01 @Ensign_H: this single alert is doing TWO plots simultaneously.
17:02 @Ensign_H: panel A gets the bar high, and panel B gets a bar's low
17:02 @Ensign_H: the Position is 'A' and 'B' Value which is the new item to plot both values.
17:02 @Ensign_H: The Show True is checked and will plot panel A value using its marker and color (green)
17:02 @Ensign_H: The Show False is checked and will plot panel B value using its marker and color (red)
17:03 @Ensign_H: The Show True and Show False are not really a boolean thing for plotting both lines because the Do A, Do B will be forced to be true.
17:04 @Ensign_H: but for the Position selection of 'A' & 'B' Value, the True part will be used to plot panel A and the False part will be used to plot panel B.
17:04 @Ensign_H: so the alert creates the simple example of a green bar on the highs, and a red bar on the lows.
17:04 @Ensign_H: now let me adjust this example to something a little more complex.

7:06 @Ensign_H: in this picture we have lightened the colors for the green and the red, and changed the True marker to be the histogram from the top of the screen to the panel A value (bar High). And in the False marker I have the histogram from the bottom of the screen to the panel B value (bar Low).
17:07 @Ensign_H: nothing is coloring behind the bar in its range from low to high, so this one alert did two plot operations simultaneously.
17:08 @Ensign_H: you could have accomplished this same effect previously using 2 alert objects. Now you can do the same with one object.
17:08 @Ensign_H: now for the next variation, in our progression

17:10 @Ensign_H: the last example is changed using the Bar Offset for panel A and for panel B set to -5
17:11 @Ensign_H: this means for this bar position, plot the image from 5 bars back.
17:11 @Ensign_H: this essentially shifts the histogram coloring 5 bars rightward, which creates a beautiful breakout visual, very similar to having a Donchian Channel with a 5 bar high type of idea.
17:12 @Ensign_H: if we are rising into the green area, we are trading above the high 5 bars ago.
17:12 @Ensign_H: if we are falling into the red area, we are trading below the low 5 bars back.
17:12 @Buffy2: neat
17:12 cherokeeruby: wtg
17:12 zol2: tis nice
17:12 @Ensign_H: the range of the bar, not colored, is the buffer between the green and the red areas.
17:13 @Ensign_H: ok, though you might like that
17:13 @Ensign_H: just some of the quick and dirty testing of ideas to exercise the new plot feature for plotting both A and B values
17:13 @Ensign_H: with a single alert object.... and this one looked both interesting and promising.
17:14 @Ensign_H: and questions before I move on to the next example?
Example 4: Message text changes
17:15 @Ensign_H: ok, moving on to next example.

17:18 @Ensign_H: had the request from zol to show more than one GV in the section area - so while I worked on it, made the section more flexible to show multiple line (ie more than the previous 2)
17:19 @Ensign_H: let me show the alert that created the green section with the study values.

17:20 @Ensign_H: the key to the section content is the Message line text
17:20 @Ensign_H: GV are embedded in the text now using the number surrounded by square brackets. When we see such a notation, we substitute the GV value in place of the bracket notation.
17:21 @Ensign_H: so the text will show %K= and then the global variable [1] value.
17:21 @Ensign_H: on the stochastic property form (not shown) I had put the %K in GV [1], and the %D in GV[2]
17:22 @Ensign_H: on the alert form message text, a comma is used to start a new line. We have 4 messages because of 3 commas
17:22 @Ensign_H: first line is %K= and [1] value
17:22 @Ensign_H: 2nd line is %D= and the [2] value
17:22 @Ensign_H: 3rd line is RSI and [3] value
17:22 @Ensign_H: 4th line is Ave and [4] value
17:23 @Ensign_H: on your older beta there was a single Read Variable spinner in the Message frame, and now that has been replace with the embedded [#] references.
7:24 @Ensign_H: So, if you used Sections and displayed GVs, you will have to go fix them up again to embed the GV number in the message text....!!!!!!!
17:24 @Ensign_H: This upgrade will impact Section displays with GVs, and they will not work correctly until you change to the new flexible notation.
17:24 zol2: I'll gladly change mine to use this new function !
7:26 @Ensign_H: great zol
17:26 @Ensign_H: now if you want to show in the Section the value form panel A, use [A] as the embedded notation
17:26 @Ensign_H: and use [B] notation in the message text to show the panel B value.
17:27 @Ensign_H: not only does this make the text flexible, but is self documents what the section shows on the Chart Object list

17:28 @Ensign_H: the last entry on my sample post is the alert that did the section and you can see its text and its GV references.
17:28 zol2: I'm playing with this a bit now Howard, what does a -1 do in the write var? Set the A value?
17:28 @Ensign_H: so that is helpful as well
17:28 @Ensign_H: no zol
17:28 @Ensign_H: -1 is illogical
17:28 @Ensign_H: needs to be set to 0 to 99
17:29 zol2: what I thought,
17:29 @Ensign_H: panel A writes to the spinner value always for the last five condition selections and the boolean evaluation for the first 8 conditions writes to this GV after the A and B evaluation.
Information on Global Variables:
17:28 Termo: where can I find is the elementary info on globals ,pls
17:30 @Ensign_H: the Global Variables documentation on my web site has been updated with today's new features.
www.ensignsoftware.com/help/globalvariables.htm
Can also find information at the Ensign site - November Newsletter
Archived classes - link on www.dacharts.com home page
17:30 @Buffy2: we have also begun a collection of Howard's answer for specific questions under FAQ Quick Tips
17:30 Termo: thank you
17:30 @Ensign_H: welcome
WAV field for comments
17:31 @Ensign_H: now one final trick that I can share.... many use these Alerts and want to further document what they do.
17:31 @Ensign_H: if on the alert form you are not playing any sound, then the field for the wav path is available to use as a comment to document more about the alert.... and I would encourage you to use the wav path edit box for comments about the alert.
17:32 @Ensign_H: of course, if the alert plays a wav file, then that edit box is not available for a general comment.
17:32 dblue2: Howard.. is it possible to write an alert that marks on a price bar at the point when another alert goes true?
17:32 dblue2: at the price level point?
17:33 @Ensign_H: probably dblue, but would have to think on it and try some ideas on how to harvest the price
17:33 @Ensign_H: possibly use panel A to watch the other alert to go True, and then use condition if A then do B
17:33 dblue2: lean harvest here so far... ;)) That is what I've been trying, but missing something
17:34 @Ensign_H: and panel B could read the Bar Last, and the Position could plot the panel B value with a marker...something like that.
7:35 dblue2: thx.. will keep trying
17:35 @Ensign_H: try that, as it is what I would attempt, and I have high expectations it would work
17:35 zol2: Howard, to recap.. if I wanted to write the high and low to two gv's with one alert, I'd use something like this?

17:36 zol2: A to 70, and B to 71 ?
17:36 @Ensign_H: zol, [a] and [b] are panel values not GV values, but you got the idea
17:37 @Ensign_H: now you do not need to write to 70 and 71 if you do not need to
17:37 @Ensign_H: you can write directly the value from panel A and from panel B with PH [A], PL [B]
7:37 @Ensign_H: the section would show PH 614.90 new line PB 613.90 and you can skip the Write Variable 70 and the Write GV 71
17:38 zol2: yes.. I have the display part working, but also wanted to store the values for further testing... like turn the section red/green if previous high exceeded etc
17:38 @Ensign_H: ok, then this one alert does all that - you can still write - but I think it more readable to use [A] and [B] in this example
17:38 zol2: but that example of mine should write the gv's ... do I need a 'tic' to make them write?
Workspace problems due to program changes in global values:
17:41 moe mentum: Let me ask again, not to be negative, but what is the reason for all of the access violations in the beta version. this particular version will not run at all on my computer
17:42 @Ensign_H: what ever the problem moe, it is unique to you and something about how you use the program and until I can reproduce those problems moe, I do not have any idea what to fix
17:44 @Ensign_H: so send me the workspace file attached to an e-mail along with as much other observation information that might be applicable and I will try the same.
The following is what Howard found with the workspace:
9:36 @Ensign_H: problem is if the Position selected 'A' Number because that choice was obsoleted and replaced with 'A' & 'B' Value
19:36 @Ensign_H: so trying to plot the A number needs to be redone so it uses panel B instead because we still have a position selection of 'B' Number.
19:38 moe mentum: if value in A was 'A value' instead of 'A Number' would this still be an issue?
19:39 @Ensign_H: no, 'A' Value is still a selection
Changing an .INI file so won't auto run:
17:49 @Ensign_H: 1 moment and I will look up the inifile value to edit in Notepad so the workspace does not auto open when you run

17:52 @Ensign_H: moe, use Notepad to load file C:\Ensign\Inifile\Ensign.ini
17:53 @Ensign_H: use menu Edit | Find and search for AutoOpen
17:53 @Ensign_H: change the value after the = from a 1 to a 0
17:53 @Ensign_H: then close Notepad and save the file on the exit then try rerunning Ensign
17:54 @Ensign_H: the workspace will not try to auto open and you can get connected prior to opening the workspace
7:54 @Ensign_H: or, on the Setup | Connection uncheck the AutoRun check box and do the manual connect to IB by clicking
17:54 @Ensign_H: the Connect to TWS button

17:56 zol2: is there a way to write an alert that detects when I've scrolled the chart left.. ie, not looking at current data... ?
17:58 @Ensign_H: zol2, cannot think of such an alert to indicate scrolled status
17:58 @Ensign_H: we turn the cursor arrow around when the current bar is not on the chart is a visual indicator
17:59 zol2: wanted a big yellow flag...I look at some espl that does a compare from barright to barend, might do it
17:57 saxby: can I copy the Ensign exe (12-09) to another folder and use it to restore if nec?
7:57 @Ensign_H: yes saxby, just rename the setup.exe file to be setup1209.exe - then you have a backup of the version
17:57 saxby: ty
18:01 zol2: does the s/r tool now update more frequently now? or still best to use teh study value method to get the pivots?
18:06 @Ensign_H: zol2, use the Study Value for the pivot values, that is fixed in the 01-12 version
18:01 virt: Howard, somehow the 3day hi/lo is not showing on the daily price lines
18:05 @Ensign_H: virt, will investigate Day 3 High and Day 3 Low not showing on the DPL tool.
18:00 Termo: I have a question also, when you get to it

18:02 Termo: is this the correct way to write a gv?
18:04 zol2: Thermo.. that should do it.
18:05 zol2: Termo, you can use a custom quote page to monitor gv's .. It's in the gv doc

18:05 Termo: thanks zol, then what should the alert look like to read it on another time frame?
18:07 @Ensign_H: Termo, your alert form will write True (255) or False (0) to GV[1] in your example.
18:08 Termo: sorry, what does true(255) and false (0) mean
18:09 @Ensign_H: we cannot put the word TRUE is a number field so we put 255 as the value to indicate True and we use zero to indicate False state
18:11 Termo: I assume you agree with zol that it is correct.How do I read it in another time frame?
18:11 @Ensign_H: on the other time frame just have an alert that references GV[1] and it will get the value you just saved - which is a boolean value
18:12 @Ensign_H: your example is not writing a study value, it is writing the boolean expression result
18:12 @Ensign_H: what you save in [1] can be read by any alert on any chart

18:14 Termo: I meant like this? but I don't think it is correct
18:14 @Ensign_H: ok explain what you are trying to do as this example does nothing
18:15 Termo: I just want to know when that macd is trending up on a different time frame than the one I am looking at
18:16 @Ensign_H: then in a panel A use Study Flag | Macd | Study Rising and have it store that boolean in a GV
18:17 @Ensign_H: Condition would be A Only in the old version and Do A, Do B in today's version
18:17 Termo: so I assume I need to write it on "the other" time frame and read it on the one I am looking at
8:17 @Ensign_H: correct.
18:17 @Ensign_H: one alert on other chart writes - and then have alert on this char that reads
18:18 Termo: can you please write it an post it , then I will understand it

18:21 @Ensign_H: the alert with this chart writes [1] with the MACD rising result as indicated by the green bar at the top of the sub window
18:21 @Ensign_H: macd is the cyan line in the picture.
18:22 @Ensign_H: if you want to test the spread rising then change the selection to Spread Rising.
18:22 @Ensign_H: now [1] can be used elsewhere
18:22 Termo: ok, now how do I read it?

18:24 @Ensign_H: or like this since this is a flag

18:25 @Ensign_H: [1] has a current value of zero, which if read as a value is 0.00 or if read as a flag is False.
18:26 @Ensign_H: www.ensignsoftware.com/help/globalvariables.htm
18:26 Termo: ok but then how can I get it to display on the chart and be able to combine it with my other alerts in the usual manner
18:26 @Ensign_H: termo, go read the article for Global Variables on my web site, shown above. The article shows examples\
18:26 Termo: Ok, thanks
18:25 enzo: Howard do you have time for a question ?
18:25 @Ensign_H: y enzo
18:26 enzo: I read a book about envelope channel can this be plot in Ensign ?
18:27 @Ensign_H: yes enzo, how is your channel created? move ave of High and move Ave of Low?

18:28 enzo: I tell you the truth I don't know - it was a book about J. Hurst and it was about cycle
18:29 @Ensign_H: ok, you can do envelope with move averages as illustrated.
18:29 enzo: ok where do I find the property window you are showing
18:29 @Ensign_H: also we have channels such as Bollinger Bands, Price Channels, Percent Channels, Keltner Channels
18:30 @Ensign_H: where do you find the idea for the envelope shown in the book???
18:31 @Ensign_H: put on a moving average and press CTRL-O to show chart object list, dbl-click on the study to show its properties
18:31 @Ensign_H: edit the properties to something like I illustrated
18:31 @Ensign_H: one line used Highs for its data points, and the other used Lows for its data points.
18:32 @Ensign_H: guess I should have been more careful to have both use the same Ave parameter
18:33 @Ensign_H: thank for attending class, I need to work on other things, so will see you all later...bye
18:33 enzo: thanks for the information