Type/to search

Quantitative Trading Strategy Based on Stoch and EMA

Cryptocurrency
Created: 2023-09-15 11:31:16
Last modified: 3 years ago
1
Follow
1781
Followers

This article explains in detail a quantitative trading strategy combining the Stoch indicator and EMA moving average. It generates trading signals based on Stoch values and uses EMA to filter out non-mainstream signals.

I. Strategy Logic

The main tools and logic are:

  1. Calculate Stoch indicator with K and D values, where K reflects fast price changes and D is the smoothed signal.

  2. Set overbought/oversold zones for the Stoch. Signals are based on relative values of K and D.

  3. Compute EMA over a period to gauge the price mainstream trend.

  4. Only take trades when Stoch signals agree with EMA direction.

  5. Establish long/short positions on signals with stop loss and take profit.

Together, Stoch captures overbought/oversold opportunities and EMA filters out invalid signals, forming a robust strategy.

II. Advantages of the Strategy

The biggest advantage is the complementarity of indicators. Stoch judges O/S levels and EMA the mainstream trend, combining to reduce mistakes.

Also, adjustable K/D values allow optimization across different products.

Finally, the stop loss/take profit clearly defines risk/reward for prudent money management.

III. Potential Weaknesses

However, some potential issues are:

Firstly, both Stoch and EMA can lag, causing missed optimal entries.

Secondly, tight stops may prematurely trigger many invalidations.

Lastly, extensive parameter optimization is required to avoid overfitting.

IV. Summary

In summary, this article has explained a quantitative strategy combining Stoch and EMA. It identifies overbought/oversold reversal chances, with EMA filtering out invalid signals. With proper tuning, this strategy can achieve steady profits but needs to manage the mentioned risks.

Source
Pine
/*backtest
start: 2023-08-15 00:00:00
end: 2023-08-26 00:00: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/

//@version=5
strategy(title="EMA Stoch Strategy For ProfitView", overlay=true, calc_on_every_tick=true, process_orders_on_close=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=0.1, initial_capital=1000)
Strategy parameters
Strategy parameters
RSI Length
Stochastic Length
RSI Source
Long Signal Type
Short Signal Type
TP / SL
Take Profit (%) [0 = Disabled]
Stop Loss (%) [0 = Disabled]
Stochastic
K Smoothing
D Smoothing
EMA
Source EMA
Length EMA
Signal Options
Stoch below/cross this value for Long signals
Stoch above/cross this value for Short signals
Backtesting
Backtesting Start Time
Backtesting End Time
PV Settings
Exchange
Symbol
Account (Optional)
PV Alert Name Longs (Optional)
PV Alert Name Shorts (Optional)
PV Alert Name TP/SL (Optional)
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)