Ask/Bid Volume Spread,#1359 WklyHL, Marker Conditional Color Change,Standards for GVs, Study Starts at Market Open

October 25 , 2006

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

 

16:33 Ensign Howard: Back in September there were some major additions to the program and an overhaul of the DYO categories. As a result of splitting a couple of the larger categories into new smaller categories, it created some confusion in looking at some of the DYO examples in our Q&A Knowledgebase library.

http://www.ensignsoftware.com/help/dyo-cross.htm

16:34 Ensign Howard: This page is the Library of DYO examples and has an excellent cross reference for various statements to examples that use the statement. I have finished the project of grooming the 92 examples that are listed in the table of examples.

16:36 Ensign Howard: The grooming accomplished 2 things, 1) was to show examples that use the current version of the program so all categories, selections and markers are correctly shown.

16:36 Ensign Howard: and 2), for many of the better examples, create a template for the example and post these to our web site so they can be downloaded using the Internet Services form, Download tab, Q&A Templates listbox.

16:39 Ensign Howard: The Q&A Template listbox has 50 templates now, and the other Template listbox also has 50 templates for a total of 100 templates on the Ensign web site.

16:40 Ensign Howard: On the Q&A Template list, note that all the names begin with a 4 digit number. The number is the Q&A Knowledgebase article number, so you can go to the Q&A Knowledgebase from the Help menu, and look up the article that accompanies the template. The articles will have some discussion, example chart, example DYO property form, and possibly links to others web pages for further reading on the topic. This library and its cross reference to the Q&A articles is a wonderful resource. It is very educational for those trying to learn to use DYOs to implement their ideas.

16:42 Ensign Howard: Today's class will be to discuss with you any of the Q&A DYO examples, their use, and the DYO implementation of the example. So, please look at the list, and if you see something you have interest in, please ask the question and we can discuss the article and the template that accompanies the article. This is your opportunity to get a better understanding of the template, its use, and its design.

16:43 Ensign Howard: Who would like to be first?

 

Ask/Bid Volume Spread

16:44 Seth: Reference the Ask/Bid Volume Spread DYO, how can I make the histogram green when the value is positive and red when the value is negative?

16:44 Ensign Howard: ok Seth, is the DYO one that happens to be on the list with an accompanying article, if so, what is the preceding number?

16:46 Seth: Don't know the number, it's on the example list in the DYO help section

www.ensignsoftware.com/help/features.htm#Spread

16:48 Seth: that's it

16:48 Ensign Howard: ok, and you want Green for the bars above the histogram and Red for bars below the zero line.

16:48 Seth: right

16:48 Ensign Howard: I can show you the solution, 1 moment while I create an example, then flor, we can discuss 1359 for you.

16:49 Seth: ok

16:52 Ensign Howard: The Ask-Bid Volume spread is calculated by Line A, and stored in GV[1].

16:52 Ensign Howard: Line B tests the result of Line A to see if the value is less than zero, and if so, then change the color bucket to Red.

16:53 Ensign Howard: Line A initialized the color bucket to Green.

16:53 Seth: Perfect, tks Howard

16:53 Ensign Howard: Line C paints the histogram using the color bucket content which is either Red or Green. The histogram color selection shows Black, but black is just our tag to use the color bucket color set by earlier lines that have Show checked, no marker selected, and a Color selected.

16:55 Ensign Howard: This is what lines A and B did. They set the color to be used instead of Black for coloring the histogram bar.

16:55 Ensign Howard: Do you have any questions about this color bucket concept as demonstrated by this 3 line example?

16:57 bg: I just changed mine too Thanks

16:57 DaveM: line A Number $8 what does $8 represent, please

16:58 Ensign Howard: DaveM, the [$B] letter B not number 8 is a tag to reference the Bid Volume.

16:58 Ensign Howard: A table of these tags can be found on this web page.

16:58 DaveM: thanks

http://www.ensignsoftware.com/help/dyo-prop.htm#Message

16:59 DaveM: great, thanks I will have to study this page a bit. Thank you

16:59 Ensign Howard: The tag in the Number field permitted us to look up a value and subtract it all on the Line A expression. This is line consolidation.

17:00 Ensign Howard: You could have used Line A to get Ask Volume, and Line B to get Bid Volume, and Line C to subtract the two values, etc.

17:00 Ensign Howard: In my familiarity of the DYO, I have shown you how to accomplish all 3 steps on the single LIne A as shown.

17:01 Ensign Howard: So this 3 line example for the Ask-Bid Volume spread has been an excellent introductory example for today's class. It has demonstrated several tricks or techniques in the DYO, tag look up in the number field, and color bucket for Black.

17:01 DaveM: Powerful tool this. Thank you

 

#1359 Weekly HL

17:02 Ensign Howard: This is an example chart with the 1359-WeeklyHL template.

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

17:04 Ensign Howard: This is the Q&A article for the template.... you can use the URL structure shown and just change the 4 digit number to reference any of the Q&A articles. OK flor, what question did you have about the DYO that implemented the Weekly High and Low ?

17:04 flor: How to determine the high,low close prior weekly (monthly) and 2 ,3 prior week ?

17:05 Ensign Howard: OK, this DYO is harvesting values for the current week, and I think I have a different example that does the same for a prior week. Let me go find a different example, 1 moment.

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

17:08 Ensign Howard: In this example, we use an array of GVs to hold values that are determined, and the same idea could be combined with the 1359 template, to hold the weekly high and low of prior weeks as they are determined. The flag to shift the result from the current week would be the First bar of New Week. 1 moment while I combine these ideas in to a bigger example.

17:09 Ensign Howard: I will start with the 1359 template and add to it.

17:14 Ensign Howard: Let me discuss this example for showing prior week or earlier values.

17:14 Ensign Howard: Line A will be a flag that is true for the first bar of a new week.

17:14 Ensign Howard: Line B will skip Line C and D when this is not the first bar.

17:15 Ensign Howard: Line C will shift an array of 10 GVs rightward one position, and what I have in mind for this array is for [240]..[244] will hold earlier weekly highs that have been determined, up to 5 of them, and [245]..[249] will hold earlier weekly lows that have been determined. And if you wanted 2 weeks back, you would find the values in [242] and [247] -- 3 weeks back would be in [243] and [248] etc.

17:17 Ensign Howard: Line D is resenting a counter of the number of days in this week. it resets this on the first bar of the new week.

17:17 Ensign Howard: Line E increments our counter for the number of bars in the week

17:18 Ensign Howard: Line F finds the highest high in the last count number of bars, this is our weekly high and we store it at the beginning of our array of highs which starts in [240]

17:19 Ensign Howard: Line G finds the minimum low in the last count number of bars, this is our weekly low and is stored at the start of our array set of lows which is [245]

17:19 Ensign Howard: Then Line H and Line I are plotting curves on whichever pair of values you desire to show. So, [241] is the high for the prior week, and [246] is the prior week low. Edit the Read GV selections on Line H and I to pick a different week pairing to plot if you are interested in earlier values. The example will retain current week plus values for 4 prior weeks. The array could be increased in size if you need more than values for 5 weeks. This is a bit more complex of an example, but it is a good example to show what can be done with the DYO.

17:22 Ensign Howard: If you also wanted the Weekly Close, then a 2nd DYO would be employed to handle the close. It would be similar to the above in that we would need a set of 5 GVs that we shift on the start of the new week and the close value we would put at the beginning of the array of closes would be the Bar Value for the Close with Offset of -1 to read the prior bar's close

7:24 Ensign Howard: The Flag for New Week would typically trigger on a Monday, so the Bar Close value to read and store would be the prior bar's close (typically Friday) and this is done by a bar offset of -1.

17:24 Ensign Howard: flor, has this example been sufficient to get you going or answer your question?

17:25 flor: y thx

17:22 Seth: So one could use the 230's to increase the array?

17:25 Ensign Howard: The purpose of my selecting the [240]..[250] for my array was this is a private set of GVs owned by the chart. By using private GVs, we do not have a conflict with other charts using the same DYO simultaneously. IF you try to have an array at 230, that is a public GV and if ES #F chart had the DYO and also IBM had the DYO, they would corrupt the values you intended to be storing and remembering in 230. For the suggestion for a Close array, I would probably use [250]..[254] for the 5 Close values, and use [255] as my bar counter for the week instead of the [250] used in the example. The private GVs are the positions [240]..[255] for a total of 16 GVs.

17:28 Ensign Howard: ok, lets move on to another example.

 

Marker Color Change Stepping Up/Down

17:29 Ensign Howard: if you have one to work on, raise the ? icon by your nickname by pressing CTRL+Q keys and I will call on you for your turn. ae, you had a question, ask it now.

17:30 ae: I was wondering if the marker used in the second example, could be modified for color, like the first example

17:30 Ensign Howard: ae, how do you want the marker color changed? Do you just want a different color for the weekly high and low. If so, simply click on the color box on Line H or Line I and pick a different color

17:31 ae: I do a lot of counting and use this marker, it would be useful if the marker changed color depending on steps up or down

17:32 Ensign Howard: so you seek an example of the marker changing colors based on stepping up or stepping down. 1 moment

17:32 ae: for example, a second higher high would change the marker color, from blue to green or yellow, not sure if this is the correct area for that type of effect

17:33 Ensign Howard: I will switch to a simpler example, instead of trying to show the concept in this Weekly DYO which is already running out of lines. 1 moment.

17:33 ae: thank you

17:36 Ensign Howard: This example is simpler for our discussion. The step marker is connecting Highs and connecting Lows.

17:37 Ensign Howard: Line A initializes the color bucket to Green, and Line B conditionally changes the color to Red on a lower high.

17:37 Ensign Howard: Line C plots the High in [1] from Line A using the step marker using the color bucket color (because black was selected).

17:38 Ensign Howard: The process is repeated for D, E and F, with the variation that the initial color in the bucket is Red, and conditionally changed to green on a higher low.

17:38 Ensign Howard: Does this example satisfy you, ae?

17:39 ae: This is great thanks, will get me on my way

 

Standards for Using GVs

17:39 Ensign Howard: ok, now to answer makesownbweat's question about a suggested standard for GVs.

17:29 makesownbweather: Ensign Howard, I have a question about establishing standards for the use of GV. Of course, each person is free to use whatever GV they please for whatever purpose they please. But, If some sort of (suggested but not required) convention is established (preferably by someone at Ensign for GV numbers which will be used by the "Ensign produced template samples" then we (users) can feel free to stay away from those GV numbers and use other ones for our (user) purposes. Could you establishing some sort of guidelines like this. I find that when I make a DYO and then begin using a sample there are many conflicts; these are unnecessary conflicts when a reasonable convention is established by someone in authority at Ensign Software. (The range of Private GVs, seems too small so this would be for GVs outside the private range.)

7:40 Ensign Howard: In my published examples I typically use GVs[1] through [10], and possibly up to 20 if I am really in need of more GVs. I never use [0] because I treat this as a garbage bucket. It is a valid GV, but for lines that I am not really trying to save the value, I let them dump into GV[0]. This last example illustrates that with Line B.

17:41 Ensign Howard: Line B returns a Flag, and Line B has a Write GV selection box, so IT IS GOING TO WRITE THIS RESULT SOMEWHERE that somewhere I have chosen to be GV [0] by leaving the Write GV selection set on 0.

17:42 Ensign Howard: And Line C is also reading a value from [1] AND it is going to write this result to some GV, and it dumps it into [0] since Line C Write GV selection is on zero.

17:43 Ensign Howard: So one standard I would like all to adopt is to use GV zero as the garbage bucket

17:44 Ensign Howard: I would have had a potential logic error to debug if I had left the Line High value in [0] and expected it to still be there for Line C to Read. That is because Line B would have dumped its flag into GV[0] and ruined the High initially parked there. So first standard suggestion is to use [0] as the throw away bucket, and don't try to use [0] to hold something you intend to read later on in the DYO.

17:46 Ensign Howard: The vast majority of GV use is in the format where you write out a value and then later on read it back on another line.

17:46 Ensign Howard: This is the case in this last example. The Line A High is parked in [1] because I want to read it back by Line C.

17:47 Ensign Howard: Line A writes the value, and Line C reads the value. Now I am done with the High value.

17:47 Ensign Howard: So I can turn right around with Line D and F and reuse the same GV for the Low values.

17:47 Ensign Howard: Neither the High nor the Low need to be remembered for any other purpose. So reusing GV[1] over again does not create any conflict.

17:48 Ensign Howard: The 2nd standard I suggest is that you always consider GV[1] through [20] to be completely temporary and reusable.

17:49 Ensign Howard: If you ever need a GV to remember values between calculations, as was the case in our weekly high and low example, then use a private GV in the range [240] through [255].

17:50 Ensign Howard: That would be the 3rd standard or principle...... something that needs to be remembered between calculations must be written in private variables in [240]..[255].

17:50 Ensign Howard: Not too many examples have this need. The Weekly H/L example happened to be a case of just such a need to remember values between calculations.

17:51 Ensign Howard: All the other GVs, [21] through [239] are global, like GVs[0] through [20] and I have rarely had a need to use them. In fact, I think 99% of my examples could have been implemented with 20 global variables and the 16 private variables.

17:53 Ensign Howard: So why some of you have run out of GVs is a mystery to me.... and probably just not paying closer attention to the nature of the GVs being reusable. It is reusable if it is written before it is read, and then not going to be read later on.

17:54 Ensign Howard: So, in the 92 Q&A templates I just finished grooming, this is the standard by which I have done the implementation.

7:54 Ensign Howard: You will see very high use of GVs [1] through [10], infrequent use of [11]..[20], and use of [240]..[255] when the information needs to be retained between calculations.

17:55 Ensign Howard: you all are free to do whatever you see fit to do in GVs [21]..[239]

17:55 Ensign Howard: Does that answer your question about a suggested standard, makesownbweat??

17:56 @Buffy2: it is a great explanation Howard, thank you.

7:56 Ensign Howard: thx, buffy, and hi to you.

 

Starting Study at Open

17:56 Ensign Howard: ok, Seth, your question/turn

17:56 Seth: Ref DYO #1290 : Cumulative Ask Volume - Bid Volume, how can I begin the study at today's open rather than the beginning of the file which might have several weeks of data contained within it?

7:57 Ensign Howard: good question, 1 moment, let me adapt the example to show a solution.

17:58 Ensign Howard: In this DYO, I have modified it to test for a New Date, and use that flag on Line A to reset a sum variable maintained privately as [250]

17:59 Ensign Howard: Line B test the Flag, and when the Flag is True it returns the 2nd parameter which is a value of zero. When the flag is False, Line B returns the contents of the number field, which the contents of [250]. This result, which is either a zero or the value in [250] is then written back out to [250]. So the effect is to reset the GV to zero or to leave it alone.

18:00 Ensign Howard: Line C calculates the Ask Volume - Bid Volume spread..... this we saw in the first example in class today. This spread is stored temporarily in [1] because it will be read by Line D.

18:01 Ensign Howard: Line D gets the sum value from [250], adds the number field which is the spread in [1], and resaves the result back in [250]. This new sum is ready to plot using the bowtie fill marker. This marker plots in 2 colors, and so we need a dummy next row to hold the 2nd color. That is the function of the Always True line

18:03 Seth: So I didn't need Line C, which is duplicating the original study, in my example?

18:04 Ensign Howard: The original Line C is now Line D in my reworked example.

18:05 Seth: Got it - tks

18:05 Ensign Howard: This was a good question and useful answer for resetting the sum each day. Otherwise, a big uptrend like we have had for the past week get such a high positive sum that all the plot is in the green day after day for the current data.

18:07 dblue: Could you post chart with revised dyo please?

18:07 Ensign Howard: Are you satisfied with the example and explanation, Seth?

18:07 Seth: That's what I was finding too and yes I am!!

18:08 dblue: thank you

18:08 Ensign Howard: Now in the chart just posted which has such a domination on Oct 23rd, keep in mind this is a Spread, and not total volume. Today might have had volume similar to the 23rd, yet it does not look like it. What you see on the 23rd is the rapid accumulation of lopsided volume, buying pressure, buying volume and so the spread is a big number because of it being lopsided. Today is just more balanced volume until the last 2 hours after the announcement

18:11 Ensign Howard: Ok, did anyone else want to discuss one of the DYO examples?

 

Updated Information/Links

8:12 Ensign Howard: OK, let me post a few web pages that have been updated recently to reflect recent changes in the program, which were covered in previous classes.

http://www.ensignsoftware.com/help/features.htm

18:13 Ensign Howard: The New Features web page has example of the gradient Line Styles.

18:13 Ensign Howard: The 4th example shows the gradient line style can be used as a study line.

http://www.ensignsoftware.com/help/features.htm#Advance

18:14 Ensign Howard: This example shows how the IB symbol for Issues can plot the Advance-Decline spread directly without resorting to using custom symbols or DYOs.

http://www.ensignsoftware.com/help/features.htm#Hexagon

18:15 Ensign Howard: This example shows a few of the shading variations available with the Lighter/Darker slider bar on the Hexagon Color Dialog.

18:17 Ensign Howard: And, last of all, I would encourage you to read recent posts to the Q&A Knowledgebase on a regular basis. Lots of good information gets published there, and I would hate to have our efforts to get the knowledge out there to be ignored.

18:18 Ensign Howard: Again, I express my gratitude to Buffy and Scylnx for their continued effort to make dacharts available and to post the transcript of this class each week. They have been doing that for many years, and it is a service we all benefit from.... so please take the time to express your gratitude to them when you are in a chat room with them.

18:19 makesownbweather: Here here! :>

18:20 Ensign Howard: Thanks buffy and all who are such good helpers in sharing knowledge, being mentors, and helping everyone in this community to be a more successful trader.

18:20 Ensign Howard: Thanks for attending class today, and have a good week.... bye.

18:20 dblue: thanks Howard -- ae: thanks Howard -- scooter: thanks Howard -- makesownbweather: Thank you Ensign Howard! -- Seth: thank you Howard -- DaveM: thanks for this -- Buffy2: thank you Howard