The text is organized into 4 chapters. Chapter 1 Signal Processing presents filters that mitigate the effects of noise. Filters use fixed and adaptive methods. Chapter 2 Indicators has oscillators that utilize the various filter structures of Chapter 1. Most of the popular oscillators are represented. Chapter 3 Scalping Indicators show some of the approaches that may be applied to short time frames (1 to 30 minute sample rates). Chapter 4 Ehler’s Filters and Indicators is dedicated to the many contributions of John F. Ehlers. The author drew heavily from https://www.tradingview.com/, which has thousands of scripts written in their proprietary Pine Script language. Also, there is a large listing of indicator ideas on the link https://docs.google.com/document/d/15AGCufJZ8CIUvwFJ9W-IKns88gkWOKBCvByMEvm5MLo/edit, which is titled LazyBear Custom Indicators for TradingView.
Steve Rogers (2021). Trading Algorithms Using Signal Processing in MATLAB (https://www.mathworks.com/matlabcentral/fileexchange/80434-trading-algorithms-using-signal-processing-in-matlab), MATLAB Central File Exchange. Retrieved .
Thank you, Steve
Hi all, The latest submission is to correct divide by zero errors that I have found. Please let me know if you have found other errors. Best regards.
Dear Sinan, I don't get that error. Sorry that you do.
bsm is a 1x4 vector. Therefore bsm' becomes a 4x1 vector which will multiply with XehlCyb.prwin which is a 4x150 matrix. Do you get different dimensions?
I get error: "Matrix dimensions must agree", When I run EhlerCyberCyc.
The error is generated at line: Smooth2 = sum(bsm'.*XehlCyb.prwin);
Thank you very much for the code!
Dear xiaokui, I appreciate your comment. There are nearly 130 algorithms presented in the text and there are likely to have some errors creep in. I tried to ensure accuracy, however, I would appreciate your informing me of any mistakes you find. I will correct them as soon as I can.
The following description of VWAP is from tradingview.com
There are five steps in calculating VWAP:
Calculate the Typical Price for the period.
[(High + Low + Close)/3)]
Multiply the Typical Price by the period Volume.
(Typical Price x Volume)
Create a Cumulative Total of Typical Price.
Cumulative(Typical Price x Volume)
Create a Cumulative Total of Volume.
Divide the Cumulative Totals.
VWAP = Cumulative(Typical Price x Volume) / Cumulative(Volume)
Hope this helps.
I ran through some of the code in the book. A little confused. VWAP calculations, for example, obviously don't get the right results。
function out = VWAP(H,L,C,V)
Price = (H+L+C)/3;
Len = 14;
Xvwap.vwapwin = repmat(Price.*V,Len,1);
Xvwap.volwin = repmat(V,Len,1);
Xvwap.vwapwin = [Price.*V;Xvwap.vwapwin(1:end-1,:)];
Xvwap.volwin = [V;Xvwap.volwin(1:end-1,:)];
vwa = sum(Xvwap.vwapwin);
vol = sum(Xvwap.volwin);
vwap = vwa./vol;
out(1,:) = vwap;
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!