Errata

Mastering Financial Pattern Recognition

Errata for Mastering Financial Pattern Recognition

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Page Chapter 1
Installing the environment

It should be stated up front that though there is a Mac version of MetaTrader5, the python library only works on Windows. It requires an emulator on a Mac. Not sure why the company decided a Mac version of the software was warranted but not a library?

Note from the Author or Editor:
Yes, I believe we can include a note that states: Even though there is a MAC version of MetaTrader5, the python library only works on Windows. It requires an emulator on a Mac. For Mac users, you may also try the manual import way seen later in the chapter.

Doug Whitehead  Aug 17, 2022  Oct 18, 2022
Page chapter 7
-

"If the current high equals the previous high, the current low equals the previous low, and the candlestick from two periods ago is bullish, then print 1 in the next row as a representation of a buy signal on the open price."

"bullish" should be "bearish" instead.

Note from the Author or Editor:
The Errata is confirmed. The conditions of the Doppelganger section in chapter 7 should be as follows:

"""

Algorithmically, the real conditions are as follows:

* If the current high equals the previous high, the current low equals the previous low, and the candlestick from two periods ago is bearish, then print 1 in the next row as a representation of a buy signal on the open price.

* If the current high equals the previous high, the current low equals the previous low, and the candlestick from two periods ago is bullish, then print −1 in the next row as a representation of a sell signal on the open price.


"""

Therefore, the two bullet points will have the words bullish and bearish switched so that the first bullet point has the word bearish and the second bullet point has the word bullish (As is the proposed change in above).

Paul  Nov 19, 2022 
Page Several sections
NA

I am posting this errata for an O'Reilly customer who has general feedback and several questions. I'm including their gmail address but posting anonymously so it is not publicly visible. They said:

==============================
Can I please get clarity on how to use the code in this book.

Book: Mastering Financial Pattern Recognition by Sofien Kaabar
ISBN: 978-1-098-12047-4
I use Python 3.10.4 (64 bit) - VSCode

The book first discusses the main code to import data, run tests, plot data etc.
Chart plotting is incomplete: plt.grid() does not plot a chart but only plt.show() will actually plot the chart. Why is "plt.grid()" used?

Then the book start going in some simple data analysis. Great!!

But now the first part of the book is not incorporated in getting the analysis to work. The author of the book maybe now assume you need to code the whole thing again to get it working. Why is this?

Everytime I run any of the data analysis code it fails due to missing imports in the file. 
Must I import all the files myself or can you give a proper example?

I need a clear example on how to use the data analysis code together with the "Master_Function_MFPR.py" 

Note from the Author or Editor:
Hello,

Thank you for submitting your feedback. The chart plotting may differ from one version of Python to another and from interpreter to another. In my experience, using Spyder's latest version made the plot come out without the need to write plt.show(). Of course, this may change depending on the user and thank you for pointing that out. The plt.grid() function shows horizontal and vertical lines corresponding to regular intervals of time and value which makes the chart more interpretable.
Finally, yes, the master function must always be executed prior to the other code. It's like the engine needed to run the whole thing. This should have been better clarified in the book, apologies.
Thank you and please let me know if you need more info.
Best
Sofien

Anonymous  Dec 29, 2022