SMA, MACD, RSI (SMR) Trading Algorithm

版本 1.0.0.0 (30.8 KB) 作者: Chad Smith
View a stock's buy/sell recommendations based on a synthesis of the indicators SMA, MACD, and RSI
3.5K 次下载
更新时间 2014/1/6

查看许可证

View a stock's buy/sell recommendations based on a synthesis
of three indicators: SMA, MACD, and RSI

Syntax:
smr_strategy
Inputs:
none
Outputs:
none
An internet connection is required.

This tool performs techninal analysis of stock data automatically and
suggests times at which an investor should buy or sell a particular stock.

The plot of stock price vs. time contains red and green dots. Red dots
correspond to days that the strategy suggests to sell, and green dots
correspond to days that the strategy suggests to buy.

Definitions:
-MACD: Moving Average Convergence/Divergence. The difference between a
long period and short period Exponential Moving Average of the stock
price
-MACD Signal: The EMA of the MACD described above
-SMA: Simple Moving Average. The average stock price over the last n
days
-RSI: Relative strength index. Fluctuates between 0 and 100. Over 70 is
considered "overbought" (and expected to fall) while under 30 indicates
"oversold" (and expected to rise)

Recommendations are based on simple moving average, relative strength index,
and moving avg convergence/divergence. This algorithm to
this strategy is from the book "The Neatest Little Guide to Stock
Market Investing" by Jason Kelly and is outlined below.

Stock data is from Yahoo's! free, undocumented, non-commercial API.

At least two (2) of these three (3) conditions must be met in order to
recommend a buy or sell:
1. MACD and MACD signal have recently intersected. If MACD signal is
rising on intersection buy, otherwise sell
2. rsi < 30 and increasing (buy) or > 70 and decreasing (sell)
3. current price crosses sma (cross upwards = buy, downwards = sell)

There are no guarantees made as to the effectiveness of the tool, so
invest at your own risk. The author is not responsible for any losses you
may incur when following this strategy.

引用格式

Chad Smith (2024). SMA, MACD, RSI (SMR) Trading Algorithm (https://www.mathworks.com/matlabcentral/fileexchange/44936-sma-macd-rsi-smr-trading-algorithm), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2012a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Transaction Cost Analysis 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0