Good morning and welcome back, yesterday by the way the attendees of the international conference were very happy to see that the technology is actually being used on a large scale in the country. However, individually I was slightly disappointed by the total number of clickers whose responses we had collected. I am conducting this quiz for two purposes, one of course is to get the current thinking of the participants on the matter of what they propose to submit as mandatory submission. The second purpose is to ensure that we are able to get responses from all the clickers which have been distributed across. So, let me read this question again to you. The question says, currently what activity do you propose to carry out within two weeks of the workshop conclusion for the mandatory submission. I remind you all of you have to make a mandatory submission. The optional activity will start later and continue further. So, it does not matter even if you are not decided yet you may have to still concern. So, it is possible that members of the same team may give different answers based on their understanding at this stage. As I said, I primarily want to capture your current thinking on the issue and also to test the clickers. So, there are four options that I have given. The first option says design questions and answers for examination. So, these will be long programming questions. So, it does not matter whether it is two questions, three questions, only one question with a proper model answer. The second is design quiz questions and answers because you also have to conduct quizzes. So, you may also submit quiz questions and answers. The third one could be add lecture slides with examples. So, you may prepare additional lectures to supplement whatever we have discussed here giving the specific topic name. There could be other choices. For example, if you are planning on the large projects and I saw I remember particularly the Nagpur center was very active immediately after my announcement they had actually discussed and I believe they are already way ahead in planning what kind of programming projects they will do. So, it is possible that you want to pursue the optional activity of writing or developing complete programs and you may if you so wish within the two weeks of mandatory submission you can submit the preliminary project proposals giving the problem definition and may be some aspect of design of the project you can submit within the two weeks. So, that could be one activity or there could be something else. All of those are clubbed under option D. So, these are the four options. Now, I will request all of you to start your clickers by pressing the S T button. After you press A B C or D you just leave the clicker on the system will automatically collect the answers and give the feedback to us. I promise that we will continue the interaction at the beginning of this session. I have a question maybe something apart from the usual programming question. My question is see we have different tools like our projectors, we have audio visual tools and internet and all those things. How would we use these some of these tools to make the teaching experience something interesting to the students that is my question over to you sir. Thank you very much. It is an important question, however it is extremely difficult to answer that question in short. So, I will note this question I will also request you to send a mail to workshop support again asking this question let us I forget. We are compiling a list of many questions which are similar to this important but not connected directly with the topic. Rest assured I will answer the question before the workshop is over. Thank you very much. NIT Suratkal has a question let me try to connect to NIT Suratkal now. Yes, I can see NIT Suratkal over to you. So, my question was when I was taking a class on arrays one student asked me we start the index of an array with 0. Is it possible to start the index of an array with a negative number? Yes, this is advisable to do so. Thank you. I think this question has come in multiple guises. I already explained how the authors of the book on numerical recipes attempted to change that from 0 to n minus 1 to 1 to n and they landed up into a lot of problems. The correct answer to the students is you can choose whatever index values that you want. So, you can artificially use a subset of the range which the C provides. However, the final limit remains once you declare an array of say 10 elements then the index value cannot be less than 0 and cannot be more than 9. Now that is a limit which is set by the C programming language standard that is sacrosan. There is absolutely nothing that you can do about it. You may of course decide artificially that you declare a 10 element array and you will use the indexes only 2, 3, 4, 5, 6, 7. That means you will use only 6 elements artificially restricting the index value from 2 to 7 that is your choice. However, it would be a bad choice because it would be a choice made by you for writing your own program. Neither other people will be able to clearly understand it nor they will be able to use any function that you write with such artificial choice along with any of their other programs. In a nutshell then the correct answer is while it might look funny to you please get used to it when you write your programs and in C programs please remember that your index range is absolutely, absolutely limited for a given size of the array. The minimum value cannot be lower than 0 and the maximum value of the index cannot be higher than size minus 1. That's the answer. Shouldn't there be a separate lecture stating that these are the standard libraries and should we, so my main question is should we discourage the use of turbo as a compiler because it creates a lot of confusion with the students. They don't know how to use console, how to use, what is a compiler, how to link it, the concept of object files. And one more question. Sir, what should we keep in mind while dividing the syllabus? Should it be, for example, we have in our course graphics, one of the topics that we are teaching. Sir, does it not create confusion in the minds of the students which I have even noticed with teachers also? Sir, basically what should be our strategy to divide syllabus for C or C plus so that our students may get maximum benefit and their ideas are clear over and out. Thank you, Shazia. First of all, I appreciate the clarity and the importance of the questions that you ask. Let me answer them in the sequence. Turbo C is a popular environment primarily because it is so easy to use. It does simple things very well. And yes, you are right. It does not communicate very many important concepts associated with the conventional process of compiling, linking with libraries, various compiler options, et cetera, et cetera. To my mind, it is important for us to convey to students the approach which is followed in GCC. My submission would be that even if you have Windows machines, please do download GCC and try to teach them those concepts. Let me hasten to add that I find nothing wrong with Turbo C because it is simple and people therefore can forget the nuances of the compilation process and concentrate on understanding program. So please understand that as far as C programs are concerned, particularly small C programs, they are written identically whether you compile them with GCC or whether you compile them with Turbo C. So while Turbo C could be a nice and cute environment for formal education, I would submit that a GCC kind of process would be better. Your first question and also the second question relates to graphics.h. Now graphics is a very peculiar thing. The authors of Turbo C correctly spotted that people would be interested in doing something concrete with graphical things and therefore graphics was part and parcel of turbo environment right from beginning. As I mentioned, GCC whether on Windows or on Linux has the underlying graphic libraries which are not part of GCC standard library. So that is the problem. However, there are graphic packages which are extensively being used in programming courses. In my own institute, for example, my colleague Professor Abhiram Nanade used the turtle graphics. The turtle graphics is an extremely simple, actually it is a Lego programming language and people can be exposed to do that. The dilemma that we face as teachers is that we have a limited time in a semester and in that semester our emphasis has to be on conveying the basic programming concepts. Doing that using any one language which is typically C itself is difficult to go over to other details. However, as I promised, I will give you all participants and will also put it on the subject portal later. The list of all open source graphic packages which are available and which can be easily linked using the GCC library. In my old course which I took last year, I had actually given as course projects for all students. I had a very ambitious plan. A group of 20 students was doing one project because I had more than 800 students so I had large groups, 40 groups and this project involved analysis of fingerprints for something equivalent to the National Unique ID project. Now to represent fingerprints, you require some graphic to actually show the fingerprints on the screen, you require some minimal graphics. So I had to use some graphic libraries for this purpose. As I said, I will explain all of that and you will be able to see some of these options. But it is difficult to lure people away from Turbosy, at least those who are used to it. My suggestion is when you start the lecture, you just say that as far as this course is concerned, this course will be conducted using GCC compiler and you should start getting used to the GCC compiler and its options right from day one. I think that should sort out the matter. Thank you very much. This question is in a curious way related to the question our colleague participant Shazia Askrod Srinagar. The question is that is it possible to get graphical representation when we solve our numerical problems? The answer is yes but for any graphical representation which you want to execute from within your program, you will have to include some graphical library, graphics library and we are back to square one because graphics.h in its form that people are familiar with in Turbosy is not available. Again you will have to wait. I will compile information on the various graphics libraries, comment on which ones are easy to use and include them. However please note that if you want to represent the numerical solutions in the graphical form, then there is a lot more work than just graphics. How will you convert for example the results of your numerical computation into showable or understandable graphics is not clear and straightforward. If you can do that there would be graphics libraries which you can use. Intrinsically however there is no library which will take the results of your numerical computation and sort of show them in terms of graph. The other utility package which many people use is called SciLab. Some of you would have heard of MATLAB. SciLab is an open source initiative started by the French government and the French group and it is now universally adapted as an adequate replacement for MATLAB which is actually a costed product. SciLab will permit you to do some computations and also have graphical representation. However you must note that that is not meaningful when you are teaching C programming. I come back to my earlier observation. I will work out which are the possible graphic libraries available and easily linkable with GCC on Ubuntu and Linux and I will get back to you. Thank you Ashwini. Her question is that why there is no bound checking in arrays in C program. Well good question. So the question is just like why do they say hash include scanF and printF? The standards were defined a very long time ago and once these standards are defined people write different compilers. So whether it is Darbossi or GCC or any other compiler. Once the compilers are written people write programs. Programs are written as per the standard specification. Now once these standards are defined and people have used it, please understand there are several hundred millions of lines of code in C already written for a variety of problems. Now at this stage you cannot change the C standards because the C standards if you modify them it will cause a lot of problems on large number of lines of code that exist today. You must have heard of backward compatibility issue in any engineering product. They apply also to programs. So software if you want to release a new version you want to ensure that it is backward compatible. It is worse with standards and that is why you will find that why standards may be augmented. They are augmented merely to include some new features which have come up later but the old features which are standardized are rarely changed. This is one of the reasons why C programming standards define that there will be no check. Therefore consequently people who write C programs assume that there will be no checks and they will not implement the checks. Let me elaborate this by telling you one more instance from a different field. That field is the field of databases. I do not know how many of you are computer science teachers but assuming that many of you are you will know SQL or the database management system SQL. Now you will remember that today in SQL you can define constraints such as primary key and foreign key and these constraints which once defined ensure that the data integrity pertaining to these constraints is implemented properly in database. However when the first ANSI SQL standard was released in 1986 the referential integrity constraints were not part of the standard. As a result much of the programs written in those days in databases had to use stored procedures where they had to write their own code to implement the standards and the new system which has come which implement these standards only ensures that if they have a facility to develop new applications they can use these standards but as far as SQL is concerned it still has to run with all the old style stored procedures where the standards did not say that referential integrity is implemented by SQL engine. This is just an example from a related field of what happens to the standard. So the correct answer to tell your students is C standards do not get modified they have been defined that there shall be no checks on the array bounds. Therefore you and me as mortals who write programs have to ensure that we check for the array bounds ourselves. Thank you very much. The question is are there any limitations in using iterative operations and in using recursive operations in the sense that there are places where I am permitted to use only recursion the answer is no. C programming language has absolutely no such limitation whether to use iteration or whether to use recursion is entirely your choice. The only care you have to take is that since recursion could explore exponentially into the number of stacks required for implementation you may run out of memory but that is a practical limitation in underlying hardware there is absolutely no limitation from compiler side whether you can do only this using iteration and that using recursion. Please understand that as far as programming is concerned the C programming language has implemented these features namely you can write iterations or you can write a recursive call to a function both facilities are available and there are no bounds. The restriction comes from the programming language or in the way in which we can write the program the restriction comes from the problem domain if the problem is not well formulated either as iteration or as recursion then we will find it difficult to implement so I repeat there are no restrictions as far as the programming language is concerned and you can specify either one of them. Let me now go over to Nirma Amdabad I heard most of your question but I did not hear the verb it related to single dimension and multi-dimensional arrays but what was the question how do we recent the value I did not get that will you please repeat that part of the question again yes I get the question thank you for asking a very important question his question is how do we get how do we return the value for single dimension as well as multi-dimensional array so actually this question is related to what you call the ability of our program to return values in our functions the answer is like this so far in the entire course we have considered the situation where any function returns a single value and that value is returned by using the return statement and therefore very clearly there is no facility to return more than one value so not only single dimension array or multi-dimensional array even if I want to return values of two different variables as of now we have no facility to do that that is the correct answer however I will assure you that there is a facility to return more than one value from a function it is returned in a different manner all together and when we discuss the pointers we shall be discussing this issue in fact briefly to answer in an anticipatory fashion when the arrays are passed as parameters actually the array values are not passed because it will involve so much work of copying let's say 500 elements of an array and sending them there and copying them back again so instead pointers to arrays are passed and therefore any operation on the arrays that you do inside the function you are actually not doing them on copied values but you are doing them in the original locations itself so there is no explicit copying of values and returning of values whenever you go to a function with arrays as parameters when you come back you will find your original arrays are modified if their values are changed in the function so that is what actually happens once of returning the value your question is valid the answer currently is yes a function can return only one value and that value could be integer float or whatever there is no other way of returning the value otherwise I will stop the video interaction now and very quickly look at the questions that I see on the chat GC Trishur wants to know can we return a structure from a function again we have not yet discussed the structure so I request you to wait for the structure there is a question from PHG Coimbatore do we in see does he support function overloading we had asked this question earlier answered this question earlier so I remind you of that answer the notion of function overloading or any overloading of operator is an object oriented concept intrinsically there is no such concept in C next is why is C C plus plus generally used to design and develop operating system why is not a not a question that can be answered it is a matter of choice of those who write operating systems incidentally not all operating systems are written in C or C plus plus the earlier operating systems are written in assembly language and there was a predecessor of C called BPCL which was language developed specifically to write operating system it just so happens that most people choose C to write their operating system there is a question of what is the application of bitwise operators from NIT Kurukshetra I will think of an application which is meaningful and show you that application in one of these stations GC Trishur says what is the maximum dimension possible for a multi-dimensional array I think person who asked this question did not recall what I had said while giving my lecture there is absolutely no limitation on the number of dimensions that the C standard imposes there is no limitation however the practical limitation will be the total amount of memory that you have more importantly suppose a student asks you this question the answer should be that for any application for which you naturally require a multi-dimensional array and for a particular application if you require 5 dimensions or 7 dimensions or 10 dimensions there will be absolutely no problem in C programming language but the question of unlimited dimensions does not occur because the very large number of dimensions are not really required to model a problem properly so it is related to the problem but C programming language has no such limitation GC GC Trishur also wants to know that Pascal was used earlier for discussing programming methodologies later why it turned to C in my opinion Pascal is more readable to discuss these things well I do not know whether you are an old timer like me but if you are a young teacher I admire your appreciation of Pascal programming language indeed Pascal was the language used to teach programming but different languages have been used to teach programming at different points in time in IIT Bombay we used to use FORTRAN to teach programming initially subsequently we started using Pascal and now we use CC plus plus so let me explain the objective the first course in programming in any institution is typically meant for students from all branches now look at the requirements of programming for other branches as I said typically mechanical engineers chemical engineers civil engineers aerospace engineers physics people chemistry people they would mostly use they are mostly required to write programs to solve scientific numerical computational problems now depending upon what is the most prevalent programming language in their field they would like their students to know that language while theoretically it is obvious that no matter which language you use the emphasis is on teaching programming concepts and we expect our students to learn other programming languages on their own in practice what happens is that the first programming language which is used to teach programming concepts is what is pretty strongly understood by them and they prefer to use that programming language later in later years when they have to write programs to solve actual problems that is the reason why in IIT Bombay also the choice of programming language used in the first course is not decided by the computer science department but it is decided by a group members from other disciplines who are the users of this course they have currently decided C C++ and this by the way is probably the reason why across the country you will find that this is the programming language that is chosen I will submit that while there are some idiosyncrasies in C which are very difficult to understand for beginning students overall this is not a bad choice and we can do our job explaining the concepts there is a question from PSG Coimbatore if C is not supporting function overloading means how it is possible to use different number of scanf with different arguments scanf is a very very special function scanf is a very very special function please remember that when the function scanf was defined in the C standard library the notion of overloading of operator the notion of object oriented programming was not understood as we understand it now yes in a limited sense since scanf does mean that there is a function overloading however no sane adherent of C programming will ever call it as a function overloading because that concept is foreign to C programming language C is essentially a procedural programming language you will notice that whatever scanf does it does it through a standard library the standard library functions you can write whatever functions you want to write as a matter of fact people have implemented operator overloading people have defined abstract data types people have defined a variety of objects and classes and implemented them using functions written in C so let us distinguish between the two things let us distinguish between C programming language itself supports and the other part is what all you can do using C programming language C programming language per se does not support operator overloading or function overloading but using C programming language you can always build anything including object libraries including classes whatever whatever the approach that you will have to follow will be slightly different function overloading and operator overloading is a natural concept in object oriented programming languages whereby you can do these things naturally as a part of the features the programming language itself so that is the fine distinction as far as C is concerned therefore we will say that there are no object oriented concepts available NIT Kurukshetra has a question when we declare float instruct and while scanning value it will display floating point normal termination error why this is so any abnormal termination error cannot have anything to do with the declaration of float in the structure when we discuss the structures please raise this question again we will answer that C in and C out return any value well C in and C out are some dumbo things that we are using for our convenience let us treat them as simple input-output statements and nothing else and let us not waste any time in discussing the features of C in and C out we can do that in another course on an object oriented programming where we properly define C in and C out as components of a class NIT Jalandhar wants to know what are macros and why they take lesser time during compilation okay I appreciate all these questions but I think I will stop now because I have hardly half an hour left and I still have some important example to suggest while I appreciate this question on macros but the macros in in C that you write how to be discussed separately I have not yet discussed them I will have a brief description of macros in one of the lectures in the next week and therefore we postpone this discussion to that point with this let me revert back now to the session proper where we are going to consider some examples of C program today I am going to discuss digital images and processing of digital images as one of the applications of multi-dimensional arrays specifically two-dimensional array for those of you are not familiar with digital images here is a brief explanation digital images are a collection of pixel values and these are arranged in an array which is so much wide and so it has so much height a pixel is a picture element a picture element like a dot or a spot or a rectangle on on a picture so if you have a photograph for example and if you draw a grid on that photograph every square in that grid could be called a picture element how many picture elements could be there it depends upon the resolution of either your camera or your display device such as a screen or a printed photograph each pixel value represents the intensity of light falling onto that picture picture element position the pixel value in a black and white color could be represented even by one bit that means every pixel is either black or white pure black and white pictures do not make much sense as pictures although generally if you see a document black ink on white paper that is the kind of black and white image we are talking about most images represent a pixel value by 8 bits which are gray scale images so what we call black and white photographs actually are gray scale images they represent white pure white by a value 255 pure black by a value 0 these are the kind of images that are most easy to represent because a pixel value fits into one byte and therefore let us say if you have a picture which has 300 rows and 100 columns that is 300 by 100 then the total number of pixels and therefore total number of bytes is 300 into 100 however when you come to representing colors then the color in a picture is actually made out of intensity of three different basic colors these basic colors are red, blue and green imagine the intensity of each of these colors is represented by a value between 0 to 255 that means I will require one byte to represent the intensity of red one byte to represent the intensity of blue and one byte to represent the intensity of green consequently every pixel will require three bytes to represent the composite values of these three colors and therefore it will require 24 bits per pixel the possible number of colors that we can have given one byte to represent red, blue and green is all possible combinations of 256 into 256 into 256 this leads to over 16 million colors the capacity of human eye is limited ordinarily to a small range from 200 to 2000 colors as a matter of fact since total color possible are 16 million and a human can distinguish only these many usually in any photograph you do some kind of a mapping from the 16 million possible colors to some decipherable colors which the human being will see or which exist in a particular picture please note that you do not have 16 million pixels in any photograph so obviously the total colors available in a photograph will be much less usually you use what is called a color palette to do the mapping from the 16 million colors to fewer colors which exist typically in photographs but that is not of great consequence important point is to understand that any picture can be digitized and can be represented as a digital image in particular modern photographic equipment or video equipment is all digital and therefore when you capture photographs or photo frames as part of the video you always capture them as so many pixels by so many pixel a color capture will involve representation of every pixel by 24 bits now when we want to process an image digitally then we have to first store the image somewhere ordinarily you get these images as files and these files will contain width by height pixels so we mainly need the values of width and height additionally we need the type of colors present and the corresponding color values for each pixel consider black and white finger prints if they are gray scale finger prints they typically have a small size 500 to 300 pixels for large images compression may be necessary you may have to compress the available information because the available information may be too much, consider this you might have heard of cameras and the resolution they have typically it started with 1 million pixel, 1 megapixel 2 megapixel, 5 megapixel you have now 12 megapixel cameras 12 megapixel cameras what it means is that if you take single photograph in the finest possible resolution it will have 12 million pixels in that single picture since each pixel is a full color pixel it can have it will require 3 bytes for storage and that means you will require 36 million bytes per image this is too much of a storage so you will typically compress this and store this, compression can either be lossy or lossless a lossy compression means you lose some information but overall the picture quality will still be acceptable on the other hand a lossless compression means that when you do a compression the size of the file will reduce however you are guaranteed that you will be able to reproduce the original full blown 12 million pixel image the lossless compressions are fewer on picture thing most of them are lossy compressions they reduce the size of the file drastically and still produce acceptable quality of pictures that is what people use here is the list of variety of formats which have been standardized a raw or PNG format or BMP format is a standard uncompressed kind of thing JPEG is on the other hand a well known compressed format JPEG is most popular by the way in the digital photograph that you will see or the images which are shared through images or whatever they are almost always as JPEG files incidentally you get a lot of information technical information on Wikipedia so just ask for image file format and you will find all these formats are explained in fact if you want the BMP format and want to write a C program from Wikipedia you will actually get to write describing the BMP format so there is lot of useful stuff there what we want to discuss is some application where we will show how we can use our ability to represent values in two dimensional array so how can we use that ability to do some processing on a picture what processing well there are lots of processing that can be done the processing that I am going to talk about is the processing involving histogram first some preliminaries I have already explained that digital images of pixel values they will ordinarily be stored in files which you will get from cameras or wherever but these can be read in a matrix for further processing so just as you have picture size in width and height you define a two dimensional array so many rows and so many columns and corresponding to every pixel you can read a value there the value may be a three byte value composite red, blue and green so you may actually have a third dimension saying red intensity, blue intensity, green intensity if it is a gray scale value it will be a one byte value between 0 to 255 so that is what I call the tonal value for gray scale images the value ranges between 0 to 255 and 0 represents black 255 represents white thus each element of an image matrix would contain a value which can be of the type or size of integer or character remember a care is one byte long thing so you can actually have a very small size array what is the histogram histogram indicates how many pixels in an image have the same value since the values can be 0 to 255 in any image which has large number of pixels some let's say pixel at this point has a value of 57 pixel at some other point has a value of 57 if you count the total number of pixels in an image whose intensity is 57 and let's say that comes to a 24, arbitrarily then we say that the histogram value of intensity 57 in this picture is 24 what is the advantage of computing such histogram which is a statistical summation of the number of times a particular value occurs that is by the way the definition of histogram we shall see it through some examples here is an example of a sample image which is simply 8 pixel by 8 pixel long 8 pixel by 8 pixel by the way in real life is a very small image and it will amount to a very small dot but I have expanded it to show the meaning of histogram and its processing so notice that here every pixel is actually is a square sort of area notice that there are 8 pixels in this horizontal direction 8 pixels in the vertical direction so 8 rows and 8 colors notice that some pixels are blackish some pixels are whitish and the other pixels are gray you can clearly see that there is no plain white pixel anywhere in this there is no complete dark black pixel here so I expect that the pixel value will neither be 0 nor 255 in fact this pixel value will be somewhere around 200 may be this pixel value may be somewhere around 30 or 40 but this is a sample image and I will now show you the matrix which contains the pixels values corresponding to this image incidentally this example is entirely and the other slides entirely from information in Wikipedia so these are the picture values in the sample image 52, 55, 61, 66, 70, 61 etc etc so these are the 8 pixels in first row 8 pixels in the second row etc whatever one notice something in this area itself the lowest value seems to be 52 in this corner and there are a few values like 154 somewhere here the highest value is 154 somewhere in the center and some neighboring pixels also have values like 154 and so on just let us go back to the previous slide remembering that 154 is somewhere here 52 is somewhere here if we go back to the previous slide you will notice that this probably is 154 so this is closest to white this is the lightest element or brightest element and this is the darkest element this is not 0 and this is not 255 but we note this fact the second thing we notice how many times a particular picture value is occurring in the elements so here we see 52 let us scan this is 52 occurring anywhere here well I do not see anywhere so in histogram if we were to compute we will say histogram of 52 is 1 because it is occurring only once 55 we will see 55 occurs here 55 occurs here this is count is 2 now 55 does not seem 55 occurs here the count is 3 now so if we count how many times 55 is occurring we will say the histogram at 55 is 3 what would be the histogram at pixel value 21 for example it will be 0 because 21 does not occur anywhere what is the histogram at value 190 it is 0 it is not occurring anywhere so essentially we take one value from the possible value of a pixel and we see how many pixels are that value that becomes the histogram here is the histogram values calculated here 52 occurs once 55 occurs as we saw there are 3, 2, 1, 4 occurrences like that 154 occurs once 145 146 147 occurs 0 time so these histogram values actually are listed only for those pixel values which are non-zero occurrence if a pixel does not occur at all it is not listed here just to keep the representation small in practice a histogram will have 256 entries there will be an entry for 0 entry for 1, entry for 2 etc etc what it means this particular chart is that for the histogram which will have 256 values 0, 1, 2, 3, 4, 5, 2, 56 the value at 0 is 0 the value at 1 is 0, value at 2 is 0 up to 51 the value of histogram is 0 at 52 the value is 1 at 55 the value is 3 what is the purpose of this histogram histogram represents the spread of colors inside a picture let us go back to this particular picture again it does appear slightly blurred because it does not have good enough contrast a high contrast will mean that a picture has values of pixels stretched from the lowest of the highest then you will see the most contrast for example if this was dark black and this was dark white and all other pixels were adjusted to reflect the relative ratio of their current value but in the larger range of pixels you will agree that you will get a better contrast that is the reason why we calculate the histogram and then there is a technique called histogram equalization which is applied on the histogram such that after histogram equalization you recalculate the values of the pixels and then you will suddenly get an image with a better contrast I will very briefly show you some of those processes so this is a sample image these are the pixel values these are the histogram values the cumulative distribution function is defined I have included it here for the sake of completeness I will not spend time in discussing but the cumulative distribution function is required to be calculated to do histogram equalization later all of this by the way is on Wikipedia and you can refer to more detailed explanation there but using the cumulative distribution function I can recompute the values of the original pixels in the histogram equalization process the histogram equalization formula is given and the equalization formula for the example image will work out to be this that is because you will see m into n minus cdfmin is the thing and cdfmin here so you put those values I will not go into the details of this conceptually let us understand that if I do histogram equalization I will get sharper image if I do recomputation for example the cumulative distribution function of 78 value is now 46 so I calculate h of 78 that means whatever pixel was earlier 78 what it should become in equalized image it should become 182 so you see it is being stretched now each pixel will get stretched with this stretching if I replot that particular image the pixel values after histogram equalization will look like this which was having a value 52 has now become 0 it has been stretched to the lowest value the pixel which was somewhere I think 100 and whatever the largest value has now become 255 so this has been stretched to be made pure 5 this has been stretched to be made pure 0 and please note that all other pixel values are appropriately adjusted within this larger range now in short histogram equalization means I have sort of stretched that histogram to cover all values between 0 to 255 and please note that it is not done arbitrarily the purpose of cumulative distribution function computation etc etc is that all pixels retain their relative values with respect to the other pixels if I plot this particular image again this will look like this notice that contrast has been enhanced very significantly here so this is now pure white this is now pure black and all other pixels are stretched roughly in the same ratio that they originally represented in the original so let's quickly look at the original image this was the original image you will agree that this contrast is lower this contrast is better consider another image this is the image of a scene a scenario you can see that the contrast is low I can identify some trees here some fields some flowing hilly area some trees in the distance and so on this is a more real image it's not a sample this is a much larger image it is not 8 by 8 it has very large number of rows and columns but the technique still remains the same so I can read the pixel values of this calculate the histogram once I calculate the histogram I can apply the histogram equalization formula and then we calculate the pixel values for this the histogram and the cumulative distribution function looks like this so this is the histogram notice the reason why the contrast is not very good is that all pixel values you see the histogram here there are no pixel values between 0 to 100 110 and there are no pixel values beyond 205 or something all pixels are concentrated here and therefore the cumulative distribution function looks like this now when I do histogram equalization or sort of stretching the histogram will look like this because it will span all between 0 to 255 and the cumulative distribution function will look like this that is what will result in a recomputed image which will look like this so you will appreciate this simple technique of histogram equalization which will give you an enhanced contrast compare it with the previous original image this is the original image and from this original image by this simple mechanism of contrast enhancement I have got this image so there is no black magic simple computations there in fact you will notice that if you take photoshop or any any popular software which edits photograph one of the easiest things and the most common feature that you find is you take a photograph and you say enhance contrast why even on some of the digital cameras today after you take a photograph before you finally save it or after saving it you want to in the camera itself you can say enhance contrast and save enhance contrast image what is happening is inside somebody is calculating the histogram doing the histogram computation or reapplying it to pixel values recomputing those pixel values and storing that digital image for us computationally what does it involve you can apply those formulae very easily what I am showing in the next 5 to 10 minutes is a c program which will actually compute histogram because histogram computation you will be I will have to be done first afterwards it straightforward application of those formulae which I have suggested just to illustrate how a two dimensional array can be used for some very useful and important purpose this is the original picture for comparison as I said let us go over to find out discuss the program to calculate histogram I am now considering that my images are smaller they are 500 to 500 500 by 500 at most in real life the images could be much larger particularly if you have high resolution images but as I told you there is no limitation of size on c and usually we have adequate computer memory these days so your arrays in image 500 by 500 what I have declared could be any large could be 5000 by 5000 for example there should be no problem you will get the size height and weight typically from the device where you originally capture the photograph say we have done a black and white capture from a digital camera then not only that resolution but the I will tell you that this picture is so much height and so much weight that means it has so many pictures we need to calculate histogram please note that independent of the size of the image large or small a histogram will have always 256 values because what histogram says is it is merely a count of the number of pixels at a particular intensity value so 0 intensity 1 intensity 2 intensity to 255 intensity notice that for once we find that the index structure of c is very much commensurate with the actual pixel values that you find in the real photograph because black is 0 white is 255 and you will find that the index of the array histogram histogram 0 histogram 1 histogram 2 histogram 3 histogram 255 the index value corresponds to the pixel value itself we shall use this fact to deploy this array computation in what we call in associative array fashion I will discuss that very briefly in a minute or so so once again we assume that the image data is contained in some text file called image dot txt in a suitable format what could be the suitable format we may give w we may give h as two values initially and then for every row we will give as many pixel values as they are there in that row one after another and we will use the command line redirection to read data from this file that will be the easiest so here is what we are doing we are saying c in npx the number of pixels read image pixel values in the matrix for i equal to 0 i less than npx so I am imagining that it is npx by npx image I am imagining a square image if the image is rectangular I will have two different values w and h and I will run these two loops differently for w times and h time I am reading image ij and as I am just showing it output of the sort of confirmatory value this is trivial so we have read all the image in the array image array it said it said two two dimensional array number of rows number of columns now we want to calculate the histogram this is the entire code required to calculate the histogram let us see what it is what I have to do I have to find out how many times a picture value occurs the logic that I follow is not to check one take one pixel value in mind say 0 and then see how many pixels are 0 value so I will have to go through the entire array saying ok 0 I found once sometime later 0 another 2 sometime later 0 another 3 and I will put the count and then whatever that count I will put in the 0th element of histogram then I will start all over again I will take one now and I will go over to all the pixels from first one how many times one occur I will total the count and put it there this will obviously be a very costly algorithm why because for every possible pixel value I am going through n by n pixels that is n square and I am doing this 256 times because there are possible 256 value 0 to 255 so I will be scanning every pixel every pixel 256 times can I do something in which I account I scan all pixels only once so here is the alternate strategy instead of looking at every pixel instead of looking at every pixel value and going through all pixels what I will do is I will set all my accounts to 0 now I will start getting looking at pixels one by one a pixel comes suppose the first pixel value is 52 what I will do in the array of my histogram I will go to the 52nd location and increment that count by one suppose next pixel is value 5 I will now go to the 5th location increment that count by one suppose I get another pixel which has a value 52 I will go back whatever is the current count 52 remember we said we already got one so the count would be one now if I find another value 52 I will add one more to count so that count will become one more it will become two this way if I keep examining pixels I will be looking at each pixel only once so my algorithm execution time it will have to execute some kind of counting operation only as many times as there are pixels so if there are n by n image n square pixels I do not have to look at these pixels 256 times that is the advantage let us see how this strategy is implemented first in order to increment counts I have to reset these counts to 0 initially so that is what is being done here say set histogram counts to 0 from 0 to less than 256 that means 0 to 25 set histogram I equal to 0 all 256 elements of the histogram array will be set to 0 now it is calculating histogram values remember what we said we will do we will look at every pixel one by one so for that we have set up this iteration for I equal to 0 to npx minus one and for every value of I for j equal to 0 to npx minus one what this means that inside this nested iteration I am looking at one particular pixel represented by I throw jth column what am I going to do with that pixel nothing I note what is the value of that pixel I have to increment the corresponding count in the histogram array how do I know the corresponding element in the histogram array simple the pixel value itself becomes the index inside why because if pixel value is 52 remember I have to increment 52nd element if the pixel value is 112 I have to increment 112th element if the pixel value is 2 I have to increment second element if pixel value is 0 I have to increment the 0th element this is the association that means the index expression inside the histogram array is nothing but the value of the pixel itself and that is how I neatly do the following histogram in bracket image I j plus plus the plus plus is for the element so what is the index expression here image I j is the index expression that means whatever a pixel I am looking at its value is the index if I am looking at Ith and I comma jth element its value is 94 then I am looking at 94th element what am I doing with the 94th element I am incrementing that because that holds the count now 94th element of histogram is the count so I am incrementing that count by one please note how elegantly this problem can be solved what we have used is the notion of associative array associative array means the index in this array is associated with a value in some other event in a single nested iteration going from i equal to 0 to npx and j equal to 0 to npx I would have taken every pixel from the image and incremented the corresponding count in the histogram so it is a very simple and elegant code I have finished the computation of histogram I will just print the histogram at non-zero values at non-zero values is so and so and what do I do i equal to 0 i less than 256 that means up to 255 if histogram i is not equal to 0 I will print i n histogram again I am saving some time because in real pictures generally a few pixels values at the lower end and few values at the higher end will be missing you will invariably get somewhere in between of course if you have a picture which has all the possible values this program will print the entire histogram this is just an additional code that I have written to find out the maximum value of the histogram in general it is good to find maximum and minimum value of a histogram and print it so that you know how much of stretching is required although you will implement the stretching blindly by using the algorithm by using those function definitions that you have but this is just an additional useful knowledge suppose someone asked you find out the maximum and minimum value of histogram here is the code to find out the maximum value this is just included for the sake of completeness all I am doing is I set up a max as 0 and I scan all the histogram elements now please note I have to find out the I have to find out what is the histogram which has the maximum count so I am not looking at the largest pixel value I am looking at that largest count in the histogram matrix and the pixel value at which the count is maximum so I just say max is equal to histogram and I will print that the maximum and it occurs at such and such you can print the gray levels at which the maximum value occurs through a separate iteration why it is required because maximum may not occur only for one pixel for example the largest count may be 10 and 5 different pixel values may be occurring 10 times that is why this becomes important anyway this is an additional exercise in calculating and printing maximum or minimum of histogram the main crux of the entire algorithm is the elegance I go back to the previous slide is a previous to previous slide is the elegance by which the histogram count is updated please remember any mundane strategy will require to look at a particular histogram value and find out all the pixels which actually match that value a far better strategy is to see the association between the index of the histogram array and the corresponding value of the pixel and use that concept to scan all pixels only once through an state iteration and whatever is the value of i, jth element use that as an index to go to the histogram array to the appropriate element and implement that count we will conclude with here in my example I have included only the histogram computation those of you who are interested can extend this program to do the histogram equalization using the formula that I had given I had given this kind of problem as a part of an exam and many people solved it correctly of extending this program but in your lab or in your spare time you can do that later on I will also try and find out how do you get a pixel values from a jpeg file because jpeg file has a different format what you require is a simple format in which number of rows number of columns and the picture values are there so some black and white image if I can get a BMP file I will try to include in the file some of you are interested can do the experiments we will close this session now thank you


The following is a presentation of TFNN, the Tiger Technician Hour with your host, Hazel Chapman. Call now. Call free at 1-877-927-6648. Hi, everyone. I'm Hazel Chapman. I just did an hour. I did the Market Kickoff, Tommy O'Brien Show. Well, I can't say I did the show. I did his hour because he does it in a very special way. He does it using fundamentals and technicals. Just a fabulous job. And it's just not my metier. That's not my wheelhouse. I like the technicals. And so it was a little different. What we're looking at here is the DAO is up 735. 30,219. We've not seen the 30,000 level since the gap down on the 22nd, where it hit 30,302. The very next day, it gap down to the Chapman-Roman candle. We're actually now above that candle, but it took about eight sessions to do that. This is really important. What we're looking at here means that there's a chance for the V-shape recovery, meaning a V-shape pattern that has the MAG-D finely cross-polluted. I'm sure you're right now, and it's very close. It hasn't done it yet. Stochastic is very weak at 16%. It needs to get to the 22, 28% level to say, hey, this can last a little longer. Excuse me. But that on-balance volume that I've been talking about for a week now gave an extremely oversold reading. Remember, I don't use oversold readings in the MAG-D or the stochastic. I use it only on the on-balance volume. The RSI, which is running nicely here, did give a reading, but I try not to use that. Just on-balance volume for me is just one of the triggers. However, look at this. The DOG, this is one-to-one short, the Dow. We've been long since way down here. The Dow is at about 33,300 on the upside. Excuse me. Let me just get a little. The voice is not yet 100%. It's getting there. We use this as a means of being short the Dow, and from the 30,300 level, we've taken a little bit off. It did hit 38.45. We're in from the 35.43 area. That was wrong. We were long from $33.37 on the 22nd of August. This is something we've been anticipating, and now we are still holding most of the position. Why? Because I don't think we're done yet for the choppy-choppy sideways move that I'm anticipating to do some retesting, but at the same time, we're very near to and we're along the Dow via the diamonds. Very unbelievably lucky to have got it yesterday on that brief pullback. And then it just took off. It just took off. So all I can say is that within that context, we can expect, oh, let me just show you the pattern that we were looking at. So I had for the DOG, not on the low, the fulcrum low, or the plumb line low of the 16th of August at 32.49, I use a Dow G candle, a special candle as my midpoint, and I said that from the high of 37.52 made in June down to 32.49 in August, if you had to use the midpoint, it would just go on for too long. So sometimes when you have to use your plumb line and move it to the left or the right, it's artistic. Of course, I have theory, I have rules for that. So it's not autistic, purely autistic. But yeah, there's licenses put it that way. So within that context, it came in within a couple of days sooner than the left side low. And it went to a peak D that in the choppy way. You remember we were speaking about that, the fourth highest peak. Let me just show you this for those people new to my work. Try to identify the lowest low bar, count each successively higher peak at a certain point after the lows made.  A buy mode means I'm anticipating at least four higher peaks to peak D. It can go E, F and G. It can't even recycle the D for the choppy instant restart to go to yet another four peaks. So we just saw that in the one minute chart. Let me just show you here. I want to talk apples to apples. So let's just talk about this particular pattern. Here it is there. Right. There's a choppy instant restart in the one minute chart. And now we've gone to a peak E and we digesting gains. Right. And now what I do is I like to do the measurements to the left. So on the left side where we haven't even started to turn around. Let's say the technicals here are much weaker. So there's a chance that we start to do a little digesting here. Maybe 3780 to 3789 will be key support. Now let's go back to what we're looking at here because we went apples to apples. So that this particular level right here at peak F with the doji canal reversal back in June. Round about the 18th or so. And the high of three days ago Friday at 38.45. The technicals here, the MACD is very good. Stochastic was at 83%. Now 82%. It's still good. It's not great. But the quicker the stochastic falls from over 80% to under 80%, the quicker the price is going to fall. Whatever you're looking at for pops over 80 and then fails. Be careful. You got yourself a sharp pullback. What we've done here is we've made an island reversal. Look at this, an island reversal. It's just one of the techniques. Remember I spoke about this way back when Paul was emailing me about the gaps on the upside. That was back, I think August highs and that there were a number of stocks that had island reversals. It's just one of the techniques. I've seen island reversals. Look at this. He has a little island reversal. That never got filled. And eventually there was a pop up at almost full. But these things might not get full. I've seen it where they get filled suddenly and very quickly. So it's just one technique. The other technique is a peak D in the Chathamway methodology. Another technique is how it fails under the 14 period exponential moving average. And how the green nine period moving averages. If it's still holding beautifully. And that just says we aren't yet ready to give a commitment in this. Even to a cell signal just yet after wait even a little while longer. And then to get a cell mode, you'd have to probably see it down to the 35 80 level. And it's a 36 67 right now down 91 cents. This is the dog. The pro shares trust short Dow 30, which we are still long from way down there. So that's for the longer term. I'll make a decision about that. I don't even mind losing. I'm not losing money, but losing some of the profits. If we really get the kind of signal that is a just an outside possibility in the diamonds or the Dow to say that it's going to go to a buy mode. And then you're not even going to get to in other words. The intermediate term, which we are still short. And the near term how the conflict unfolds. We've done it before we've held it all the way through big pop-ups in the market before and said, no, we're expecting low lows. But now there's a lot of information. What's going on at this particular moment. So the way through this whole what I call a recession. Maybe they don't officially call a recession, but let's face it. The semis are in recession. The XOP is in a lot of sectors that are in recession. I'll be back. Vista Gold owns and operates the largest undeveloped gold project in Australia, the Mount Todd Gold Project. Vista Gold just completed their feasibility study, resulting in a 7 million ounce gold reserve. Vista Gold has all major permits approved and has retained CIBC capital market assistance in evaluating alternatives and in completing an accretive transaction. Vista Gold trades on the NYSE American and TSX under the ticker symbol VGC. Vista Gold executing a strategy to create shareholder value. Are you looking for a way to consistently add winning trades to your portfolio? Tom O'Brien is here to help. Tom O'Brien has been successfully trading markets for over 30 years. A frequent contributor to TD Ameritrade Network and CNBC, Tom O'Brien founded TFNN over 20 years ago to help educate investors just like you. Tom's Daily Market Newsletter, Market Insights is published every morning when the market is open to give you the competitive informational edge you need to succeed. These newsletters are packed full of Tom's advanced technical analysis and are geared to deliver comprehensive strategies for a successful portfolio. Get Tom O'Brien's newsletter, Market Insights, today to try all of our products and newsletters 30 days risk free with our money back guarantee at TFNN.com. TFNN Educating Investors If you subscribe, you'll get a weekly report from veteran day trader Larry Pezzavento on stocks you need to pay attention to, and you can trust Larry's analysis. After all, he's got 45 years experience as a day trader. Larry will also provide daily charts, videos, and data on the key markets that he's tracking. Expect notifications from Larry on market movement you need to act on at any time. First-time subscribers also get a 30-day money back guarantee. If you're not satisfied, let us know and you'll get a full refund within 30 days of signing up. Subscribe to the Fibonacci 24-7 newsletter today. TFNN.com Educating Investors For just $1 for the year, there's no catch or added costs when you join our community of traders. Sign up today and become a part of this educational community of traders. Just visit the front page of TFNN.com. Toll Free at 1-877-927-6648 Internationally at<PHONE_NUMBER> Hi folks, just to get to some of the questions, I need just to show you this here because we had discussed it yesterday. So the bonds are up 24-32nd at 129-230 seconds. I'm not anticipating that there's a huge change in the trajectory of yields just yet. In other words, I don't anticipate that in the 129s, that bonds will go to the 134-136 area, which is really where they would need to go if one was really contemplating that the Fed is not going to do anything. I think the Fed is going to try to hold this level. They're going to intimate that they have no problem raising rates further. And I think that's reflected here in the yields. Not only that, you've had a 30-something year of bull market and bonds. Look, this is just two years of declining prices in the bonds themselves. So it's kind of still early in the game. That's all I can say. Now let's just do this. I'll go one step at a time. So I mentioned this to Kevin Hinks when I interviewed him in Tommy's show. And they have a fabulous show called Fast Market at Noon and Options and How to Deal with Just Risk Reward. I think it's just a tremendous show. So I'd ask him the question. I just mentioned the question that the XLF, the financials, didn't use the bond rally. So the bond declined with the yield rally as they often had done before. Is there something different? He discussed it in a very cogent way. And basically, I want to look at Bank of America. The question came in because it's a stock that we've owned for my subscribers to the opening call for about maybe seven years or so. Every year we've had it and we try to get the lows and run it up all the way to some kind of a high. This was in this particular instance, the last high that we actually ran it up was up in the 50, what was it? 50.11 was the high back in peak D in February. And then we've had maybe one or two trades with a little bit of a profit, maybe a tiny loss at other times. But it's not been good this year. It's been a stock that just ran. We've just stepped aside for quite some time now. So I'm looking at it. I think I would love for Bank of America to really start a big move up to the... Well, today's a fabulous move of 3.4%. But I think the sustained move is going to be an issue in the XLF, the financials themselves. So I don't know yet if you got into Bank of America, say yesterday or anywhere below 31.30 and Australia 32.65. I'd say that's fine. Because if there's follow through to the upside, there's a lot of resistance levels in the 33s and even the 34s. But you're making money. So I'm not going to tell you to do anything else. But I will say that if it closes under 31.30 at any point in the next two days, it just says, you know, it's not ready for prime time. And that goes with the whole XLF. Look, the financials, same thing. This is an island reversal. Yeah, wonderful. I love island reversals, but they can be filled in. Look, this one here was filled in a little bit and then it went even further. So you can't just think of them as in isolation. Yeah, in isolation, if you own one of these island reversals, then you can go there on vacation. But look what happens. Sometimes they get filled in. So what I'm saying is this starts to get filled in. The XLF at 31.65. It looks actually Bank of America is the same pattern right now. And it goes under 31.20. That's going to say, nah, not yet. But I do like it. And I might consider it. I just think they're the other stocks that can give better upside action at this particular point. But if you have it, I'd just say, raise your stop about a half a point for every three quarters of a point in rallies just for the moment. And then you can start to reverse that at every half point you can add and you can raise it three quarters of a point. So that's another way to do it. Just a trading stop and let it go where it's going to go. I like the action. I'm just saying chart pattern wise. It's a little bit disappointing the financials that they didn't use the high yields to actually rally. What are they using right now? I think it's talking about, you know, I just think an oversold condition more than anything else. Next question was IWM. IWM is the Russell 2000. Now this is important. It did not take out the 162.48 low of June. It ran all the way to the 200 and then came all the way back to 163.58. Let me just double check. Is that correct? 163.28. So it didn't take out that left side low. That's a successful test in the Chambering Methodology. And it says if it rallies, it could go back over the previous high of consequence. I don't know about that. That is the high of 201.99 back in August. I'd go one step at a time because it's successful. It says there's a good chance that in the weekly chart it could test the 14-period moving average of 179.60. And if it does that, then the key resistance level will be 189.86 the week of the 16th of September. Let's just go one step at a time. But this is really good action. And in fact, my eye says that the low of in IWM, the Russell 2000 ETF, the low of the 22nd of September was 170.74. The high of the 28th was 170.99. So you see it fill that gap. But in a sense, it looks like an iron reversal. So this is a good move. And the reason why I'm talking about it is that the MACD is so close to turning positive. Stochastic is a little bit better than some of the others. It's at 19%. There's a W formation in the on-balance volume. And that says there's just a chance that in the short term, the IWM might again, it does that. Not in the weekly chart, but the daily chart very often has nicer chart patterns than the Dow or the S&P or the Qs. And then it fails. So it's almost like gold is doing well and silver's fading. Then all of a sudden, silver comes on really strong and gold catches up. And as soon as they catch up, silver starts to fail. So we'll see if that's the case here with the IWM. Is it telling us a story and then it can't follow through? But I do like it. Is it a stock to own at this point? If you've got it lowered down, I'd have no problem. I'd say just easy put into stock so that no matter what happens, you're making some money. At this point, there's a risk of at $174. It could go, look, the low today is $172.53. That's two points. It's not a big deal on $174 stock. But the trouble is if it takes out $172.20, the 14-period moving average, it makes $170.40, the 9-period moving average support. I find that it's just too big a risk reward unless everything about it said the MACDs turned positive. The histogram is positive. And the sarcastic is at 28% and 19%. I don't know about that. But at 28%, I'd say, you know what? I'd start a split position. I'd get something right here at $174.40. And I would add at $172.00, maybe $65.00. And I'd have a stop on each one so that at least one's left. Or you could have a stop on both of them, one stop on both of them. But you don't have to make it a little tighter, something like $171.10. So that's... ARKK. ARKK. ARKK is ARK, the innovation ETF. We'll talk about that as soon as I return. Yes, it's gone above the previous peak A-minus. I'll be back. This is how it does it. 700 S&Ps of 1970 right back. To see for yourself the types of profitable trades that are recommended within the Gold Report, sign up now by visiting TFNN.com. Don't miss out on the next great gold trade. Sign up today. In this kind program, the Art of Timing the Trade charts allows you to scan thousands of stocks for Fibonacci formation setups, including guardleys, ABCs, butterflies, and much more. The Art of Timing the Trade charts is designed to help you when scouring the markets for stocks just beginning to form the trading patterns that many investors spend days, weeks, or even months searching to find. And right now we're offering licenses available at only $79 a month. We are so confident that you're going to love this new charting software where there will even give you 30-day unconditional money back guarantee. Don't miss out on this incredible new piece of software. Get your copy of the Art of Timing the Trade charts today by visiting TFNN.com. Sharpening your skills as an investor is like getting better at playing a musical instrument. You have to practice, sure, but you also need excellent instruction from experts. At TFNN, you'll get advice and guidance from the authority and technical market analysis. And it's not just dry, tedious text, either. TFNN airs live financial content streamed live on TFNN.com and TFNN's YouTube channel with Tiger TV. Live every market day from 8.30 a.m. to 4.00 p.m. Eastern. For free, each host is an experienced trader and gives their take on the market while taking calls and questions live from around the world. From the moment the market opens until the closing bell sounds, Tiger TV has 8 different shows with expert hosts to help you make the right moves with your money. Watch online at TFNN.com or on TFNN's YouTube channel and become the investor you were born to be, TFNN. Educating investors. ARKK was a question. ARKK is the art innovation. You get a big gap up today. A little bit above the previous size. So this actually used a new gray leg A. One of the reasons why I was very hesitant, we did it before we had a fantastic series of gains in ARKK. Back when was it? It was right here, I guess it was. I think it was in June. And the reason why I didn't dive in yesterday and I was going to do that, it would have been a nice move up with 38 into the 3940 area, is because when I looked closely at some of those stocks, many of the stocks actually in the ARKK Innovation ETF, this is Kathy Wood, it's one of her funds. I felt that they really were struggling and they weren't showing leadership. Maybe at this point they'll start to show some leadership. So I like it if you were in it, underneath the load today is 3925. If you're in below 39, all I would do is a 3991. I put a stop on part of my position at about 38, just under 39, 38, 98, something like that. And another one to give it a little bit of room, because this market does look like it has the veracity for further upside activity over the week. And then I would make a stop about a point lower than that for it. So split the position into two. If you aren't in it and you're looking to get in, I would do exactly the opposite. If you start a position, actually I think 3995, I think you'll probably get it below 3960 today, but it doesn't matter. 30 cents doesn't make any difference if it's able to get to the 42s, the 50 period expansion, moving average. So I would start a position here, and if it's the only position you got, that's fine, but it would be a split position. One part here, 3994, and another one just under 39, but the stops, I would have two separate stops. I'd have a stop on the one that's the edge of 3994, and probably that one would be like 3920, and I'd be ready to get another position with a tighter stop. And if you only have, in other words, it gets taken out, and you only have the lower one, and the lower one succeeds in going up, you can add back, you can add back to it on strength. But that's the only way I would do it right now. I think it's just a little bit vulnerable to about a 50, or even an 80 cent pullback. It's not a big deal if it's actually going to the 42s, but that's the way I'm looking at it, and that we'd be sure it went to a peak D. It's one of the weakest peak Ds we've seen from the low that was made back in May, I think it was, going all the way to the high in August, a peak D and then pulls back, but it did not take out the left side low, and that's important. I do think there's something there, and I'll be doing some work tonight on it whether or not we want to get in. But if that was your question, what do I do now? That's my answer. My answer is, and if you haven't got anything in, you could buy round about this 39, 87. I think it would probably get a little lower, but it doesn't matter. Start at a split position. First part is right here, second part is lower down. And you have to decide where you have two separate stops or just a stop and the whole thing saying, I want to pull back. I don't want it as deep as my second position. I hope I missed my second position, but if I get it, that one's going to have a tighter stop and maybe all of them together, the two of them together have a tight stop. But you've got a higher risk reward right now, just as we're looking at it, only because it's had such a huge move up. Okay, next question was gold, but this is gold GOLD. This is the old Barrick ASX. I think it used to be the symbol, Barrick Goldcore, broke above the resistance level that I chaired with Insight Track Group Palin Zone. This is now pro-Palin Zone making the 50s, 40s, 1540s very good support, training at 16.28. So I guess the question is, you haven't got it. What is a good entry level? Here again, I'm going to talk about this. It's a little different because in the weekly chart, if it's able, it doesn't have to close. If it's able to push above, the high that was made back in August, yeah, August the 19th, the high was 16.88. The high today is 16.42. The way it's acting, 16.88 shouldn't be a problem. That's going to be really important because it will be, look, we've touched the 14-period moving average for the first time since it broke down back in May in the 23s. So this is going to be very important. And it's also, you've got your Chapman Wave Insight Track Pro-Palin Zone right there. It succeeded. It means there's a chance that this particular pattern can become some kind of a cup formation. And that's going to be important because you've got two dreaded Hs like a lowcase M with low lows, but only just low lows. So yes, gold is actually very old. Barrick gold, I don't like the monthly chart. In fact, there's some charts that are much, much better looking than Barrick at this particular point. But you asked me about GOLD at 16.31. And here's what I'm going to say. I think it's over. Let me do the 120-minute chart. 120. Here we go. 120, 120, 120, 120, 120. Okay, he's up there. There it is. Good. Click. There it is. 120-minute chart. Let's just do that. The Chapman Wave Notation. But yes, this is easy to do. I can just go with an up arrow. Obviously, there's an up arrow here. And this is peak A. A. I don't want to miss anything. My eye usually picks out 88, 89. Yep, that's right. So this is B. And there's a very clear C. And there's your D. So it's already at D. I think gold and GOLD in particular, Barrick gold, TAD overbought. TAD overbought. That doesn't mean to say they have to sharply pull back. But they are somewhat overbought. Well, gold, Barrick gold is overbought on the 120-minute chart. And the 200-period moving average is 50-58. I'm going to suggest that you split the position. You start a position. I know that this would be a little toppy right now. For instance, the stock that we bought, the silver stock, and a spectacular move. And I said today, in two days, I said, we've got to take money at the open, even though that wasn't either at the open or in the morning as soon as my newsletter was out. So we took between an 18% or 20% gain on a little bit. And now look what it's done. It's pulled back sharply. It hit $4.04, I think. That was one of my targets. And it's trading at $3.77 right now. I mean, that's a big pullback, right? So that's why you've got to be quick with these things. I'm suggesting that you either have patients to buy it under $16, not a big deal. This is $16.29. What's the big deal if it's going to retest the high that was made in the 1680s or whatever it is at that peak F-top? But I don't have that confidence just yet that it is $16.88. That it is going to go to the 17s right at this moment. So my thinking here is split it. $16.28 start your position. I would start the smaller position of the split here. And I would have a bigger position at about $15.83. And on that one, I'd have maybe a $15.20 stop on at least some of the position. But I like it. It is only a leg A in the daily. It's a leg A. This is, I have to call this almost a buy signal because the stochastic is at 75%. It's not a buy signal yet in the daily. Weekly has a lot to go before I can give it even a buy signal. So this is just a starter position, $16.27. As I say, I refer somewhere in the 1580s, maybe 1570s, that would be the next position. And if it gets away from you, you can talk about adding. But I think it needs to be handled right now. This is where you want to, if you like it, you've got to get your foot in the door. It's right in the door, as you speak, $16.29. I'll be back to think about a little more about ARKK and Jets and CF. I'll be right back. You might think that if you want to be successful at trading in the stock market, you're going to need a crystal ball. After all, it's impossible to predict the future, right? Like any endeavor in life, before you decide it's impossible, get some advice from the experts. You might find that it's not so impossible after all. For daily market overviews that give you direction on the key indices, selective stocks, and commodities, subscribe to the Opening Call newsletter at tfnn.com. The Opening Call newsletter is written by Basil Chapman, creator of the trading methodology known as the Chapman Wave. The Chapman Wave up-down sequence gives you an edge in identifying price turns, finding the peaks and valleys in stock prices. Get the Opening Call newsletter by Basil Chapman in your inbox every day. First-time subscribers also get a 30-day money-back guarantee. If you're not satisfied, let us know and you'll get a full refund within 30 days of signing up. tfnn.com Educating investors. The technology around us is changing every day. With so much happening, it can seem impossible to keep up with all the information. April White's investment newsletter, the Technology Insider, is designed to give you all the information you need to understand the technology that shapes today's markets and tomorrow's future. David White has made his living staying on the cutting edge of technology. His weekly newsletter will give you specific recommendations for valued tech stocks, as well as entry prices, target prices, and stops to set for each trade. Dave delivers his weekly newsletters every Friday with updates throughout the week. You can get the Technology Insider at tfnn.com for only $37.50. Sign up for Dave's newsletter, the Technology Insider, and get an inside look at everything the technology sector has to offer. Try it risk-free today with our 30-day money-back guarantee. tfnn. Educating investors. Tech is booming, but for how long? Whether you think the biotech bull has room to run or has run its course, trade L-A-B-U or L-A-B-D. Directions daily S&P biotech three times bull and bear ETFs. Visit DirectionInvestments.com slash biotech today. An investor should consider the investment objectives, risks, charges, and expenses of the Direction Chairs carefully before investing. The Prospectus and Summary Prospectus contain this and other information about Direction Chairs. To obtain a Prospectus or Summary Prospectus, please contact Direction Chairs at<PHONE_NUMBER>. The Prospectus or Summary Prospectus should be read carefully before investing. An investment in the funds is subject to risk, including the possible loss of principal. Funds are designed to be utilized only by sophisticated investors such as traders and active investors. Distributor, Foreside Fund Services, LLC. This program is brought to you by Vista Gold, traded on the NYSE American and TSX under the symbol VGZ. On the 22nd of June, the Tringage hit 0.10. So I just wanted to clarify that. We have different software programs, and in the Dan, who was it? The Chin was made low, yet to date low of 0.26 on Chin, time to short says Sanel. No, I've got this as a 0.10, but it is extremely, we did a 0.29 way back there, that was August the 8th of 2021, and then it's a market pullback, just for a few days, and then it's screened higher to higher highs. So yeah, I use it, it's called the Chapman Wave Tringage, really it's Richard Arn's Tringage.  I only use numbers, I don't use these techniques, I don't even know what his technique is, but when the numbers are certain, below a certain point, like today, it says that there should be a negative Dow tomorrow, the very next day, in the morning, it should be, it's usually in the morning, it could be later, but there should be a negative Dow and before it starts to rally again. So that's my rule of thumb, and when it is higher above a certain level, it means within two days, the e-mini futures, no matter how negative things look, the e-mini futures should have a 9 to 11 point rally or even more to help the market come off a low. So within that context, yeah. So, and if you're looking at this chart on the right here, this is the daily Dow, this is the, this is where the Chapman Wave index here, this is the 9 of the 14, it's just under one line, if it's pink, it's negative. To turn around and become green, you're going to have to move so much, 30,500 somewhere, I'm sure would have to be hit before you can change that pink line to green. So this is still early in the stages and I do believe just that we're going to have some kind of a digestive phase in the market intraday. Let me just see here, this is the e-mini. I had a peak E in the 10-minute chart. I had a peak E in the, a peak E in the one-minute chart. Remember the rectangle formation, the longer you stay in the rectangle formation, there's a chance you could pop out there's going to be a peak B, peak C. Yeah, there's a chance you can pop out but if you take out that border on the, on the low side, be careful you could do a one-to-one to the downside. If at any point the e-mini trading at 3790 up 101 starts to trade under 3780 for three, how will I put this? I'd say three out of five bars. There's a really good chance that the children period moving average of 3768 gets hit, all right? And it'll take a move above 3805 to say, ah, ah, I refuse to go down. I'm just making higher highs today. I think we're ready for some kind of intraday consolidation. It might just go back to where it was an hour or so ago. All right. So Ionic generate, optimize, execute quantum circuits. Nice move up today of 9% at 5.75. Yeah. This has been my list for subscribers. We haven't done anything about it. I just, I was just wondering how the whole area of the software, the packaging of software, how it's going to unfold in this particular time frame because of ARKK. They're all in the same kind of category. ARKK. So yeah, at 40.39. This is the same as the others. I went through this, but this is, you've got to split it along if you want. If you haven't got anything now and you want to get it, you just have to split it. And so I'm taking, it is a gamble because we're only just coming off lows, but they're pretty serious lows and the market had two huge days. It's ready for a digest. I'd say have a little patience. Put it on your list.  This is in play. So don't avoid it because of that. Just do your homework. Our next question I had was, no jets, jets. Very nice move. This is the U.S. Global Jets ETF. Is imperative that the IYT, I did that during Tommy's show, which I didn't do in mine. Anyway, it's imperative that the transports and especially the airline ETFs, the airline ETF and the airlines themselves have not just a bounce today. They have to have, now it says a G here, but you don't have H's in the Chapman methodology. So this is an alternate count. D, E, there's no other way to count it. This is A, this is G-B, and that's a C. All right, we're going to a C. What can I do? Sometimes they fail, but very rarely. That didn't go to a D. So far, that's your C. And now you've got a spike in the weekly chart. Yeah, if the Jets ETF is able at 1621 right now, so this is only Tuesday. If by Friday, it's even touched. I don't care about closing above it, but gone to the 50-period moving average at 17. I would say that's a really good sign, and that's a sign to say that this move has legs. And what we've got here is both a short squeeze, but there will be new buying if there's a sustained move. In other words, any pullback, if it doesn't become a sharp pullback, instead you just keep, like we're watching even now, you're getting buying come in. That's just going to force the shorts and it'll force new longs to come in. That's what you want to see. There is a trend line. Yes, thank you very much. I'll do that. All right, there. Where is the Chapman Wave inside track from that peak F top that was made back in August? I'm going to be conservative. I'm going to go into the body of this candle right here and to the high of the candle. Then I'll draw the parallel line, little mini three sixteenths of an inch or whatever it is. Chapman Wave inside track repellent zone, and there it is. So, 17 takes you out of it. It doesn't matter. I'm saying above 17 is going to be good action and it must last. I'm going to go to 17. The next thing that's trading is 16.03. I want 17 holding at 1680 and then 1723. That'll be a very good move and suggest time and price is in this move to the upside. Next question I had was, oops, CO, CF. One of my favorites. We had it. We had some good profits and then got taken out. Tried to get back in the other day. Just got taken out. Unfortunately, a year of CF is trading at 103.39 CF industries, holdings, hydrogen, nitrogen products for clean energy, fertilizer, emission of basement. What I'd said, what is, there's nothing wrong. I mean, that's everything that you're looking for in a stock. So it did pull back from 119.60 on the 26th of August down to 90.26, just above the 200 period moving average. It's now 103 points higher. So the question is, do I get in? And the answer is, I think it's in play. What I mean by in play, it means that it could pull back, but there are enough sudden spikes to the upside to get you out at least and maybe break even. So I'm going to suggest here again, split position, 103.44, start your engines right here at 133.44, but 99, the whole 99 area under 100, or maybe they say between 100.20 and 99.80. That's where you would add a second position. If you missed a second position because of each round, that's fine. You'll deal with that. But that's the way I would do it. So I'm going to give you an final segment to go down to 700. There's to be some 100. All right. Thank you. You might think that if you want to be successful at trading in the stock market, you're going to need a crystal ball. After all, it's impossible to predict the future, right? Like any endeavor in life, before you decide it's impossible, get some advice from the experts. You might find that it's not so impossible after all. For daily market overviews that give you direction on the key indices, selective stocks, and commodities, subscribe to the opening call newsletter at tfnn.com. The opening call newsletter is written by Basil Chapman, creator of the trading methodology known as the Chapman Wave. The Chapman Wave up-down sequence gives you an edge in identifying price turns, finding the peaks and valleys in stock prices.  First-time subscribers also get a 30-day money back guarantee. If you're not satisfied, let us know and you'll get a full refund within 30 days of signing up. tfnn.com Educating investors Everything in the universe is governed by the Fibonacci sequence. This mathematical principle is responsible for everything from the most aesthetically pleasing artwork to patterns in the stock market. To stay on top of stock patterns you can take advantage of, sign up for the Fibonacci 24-7 newsletter at tfnn.com. When you subscribe, you'll get a weekly report from Veteran Day trader Larry Pezzavento on stocks you need to pay attention to and you can trust Larry's analysis. After all, he's got 45 years experience as a day trader. Larry will also provide daily charts, videos and data on the key markets that he's tracking. Expect notifications from Larry on market movement you need to act on at any time. First-time subscribers also get a 30-day money back guarantee. If you're not satisfied, let us know and you'll get a full refund within 30 days of signing up. This is Larry's newsletter today, tfnn.com. Educating investors. This segment is brought to you by Think or Swim. For more information, just click the Think or Swim banner on the front page of tfnn.com. Hi, folks. I'm looking at the 10-minute chart of the gold. This is the continuous contract. We've got a peak A. We've got a peak B and it's in legs. This should be an uppercase, B. And a C, leg C. It could be a peak C if we run out of time. There's a 10-minute chart. So it's got a little bit to go. And then maybe it makes a D and pulls back. Let's look at crude oil. Crude oil is typing in over there. There we go. It's gone peak A. This is just in the latest move. A, B, C, D. And this is a continuous contract. E, F. And I'm calling this a G, but I usually say G slash C. And it starts to pull back. It's up to 67. Still looking very, very good at 86.32. The key support is at 85.10. 85.11. If it starts to trade under 85.11, it could pull back a little bit deeper than that. But so far it's acting extremely. Is that 85 or 86.10? 85. So that's that. So let's just do this. E, S, Z, 2, 2. We're looking at, where did I type that? Doesn't matter. E, S, Z, 2, 2. Yeah. So it's, you remember the rectangle formation can last a lot longer than your patient, the narrow rectangle formation. And that's where we went to the bottom of it. Now we're going to the top. It is pink, meaning that it hasn't turned green to say it's in a bi-signal or anything like that. It's stuck in this range. I'll do this again. A close below 37.68 at any point today, says a quick move down to the 37.72. Moving average is possible. If it starts to hold about 38.03, wow, it could force even more people into the market. So as I say, this is going to be a very interesting couple of days. We are still along from yesterday morning in the now and the near term. We'll see what happens. It's going to be a very interesting week close because we want to see how any pullbacks hold.