Type/to search

MACD Willy Strategy

MACD
1
Follow
1781
Followers

This strategy is mainly developed for scalping / intraday trading. It could potentially be used to identify entry/exit signals for short term options trading. It performs decently well on popular stocks when used on time frames between 5 min to 15 min using regular session bar data. It combines 3 popular indicators, EMA , MACD , and William %range, to generate both long and short signals.

EMA:
Default is 200 EMA line.

MACD:
Default is 12/26 lengths for fast/slow signal inputs.

William %R - Smoothed (Published):
This is a custom indicator that generates two moving average lines from the original William %R line.

How it works:
Entry conditions:

  1. Long/short entries when bar closes above/below EMA line
  2. Long/short entries when MACD line is above/below signal line (histogram > 0 for long, < 0 for short)
  3. Long/short entries when William %R fast MA line is above/below slow MA line

Exit conditions:

  1. Exit long when MACD line is below signal line, vise versa for exit short
  2. Exit long when William %R fast MA line is below slow MA line, vise versa for exit short
  3. Exit long when William %R fast MA line must in below the overbought (-20) limit, exit short when above the oversold (-80) limit.

Note that parameters are NOT optimized for any particular stocks / instruments.

Enjoy~~!!

backtest

img

Source
Pine
/*backtest
start: 2022-04-08 00:00:00
end: 2022-05-07 23:59:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © platsn

//@version=5
Strategy parameters
Strategy parameters
Source
Volume MA Period
Fast Length
Slow Length
Signal Smoothing
Oscillator MA Type
Signal Line MA Type
w_length
Smoothed %R Length
Slow EMA Length
Trading window
Start Year
Start Month
Start Day
Finish Year
Finish Month
Finish Day
Trading Options
Leverage (if applicable)
Reinvest profit
Reinvest percentage
Daily ATR
ATR period
% ATR to use for SL / PT
Moving Averages
EMA
Color Settings
MACD Line  
Signal Line  
Histogram
Above   Grow
Fall
Below Grow
Fall
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)