Type/to search

Fundamental Pinbar Trading Strategy

Cryptocurrency
Created: 2023-11-15 15:25:57
Last modified: 3 years ago
1
Follow
1779
Followers

img

Overview

This strategy utilizes the pinbar pattern with trend determination by moving averages to trade breakouts in the direction of the trend. It generates trading signals when price breaks out of the high/low formed by the pinbar candlestick. Additionally, it uses fast and slow moving averages to determine the overall trend direction, avoiding wrong signals during range-bound price action.

Strategy Logic

  1. Compute fast (20-period) and slow (50-period) moving averages.

  2. Identify bullish (close>open) and bearish (close<open) pinbars based on the candlestick.

  3. Check if the pinbar high/low breaks the high/low of the previous candle. A bullish pinbar breaking previous high gives a long signal. A bearish pinbar breaking previous low gives a short signal.

  4. Also check if the fast MA is above the slow MA to determine an uptrend, and vice versa for a downtrend.

  5. Long signals are only valid when fast/slow MA indicates an uptrend. Short signals are only valid when fast/slow MA indicates a downtrend. This avoids wrong signals during range-bound price action.

  6. On valid long signals, go long with predefined stoploss and takeprofit. On valid short signals, go short with predefined stoploss and takeprofit.

  7. If the fast MA crosses below the slow MA, close out any existing position.

Advantages

  • Uses pinbar high/low as breakout levels representing strong momentum.

  • Considers trend direction to avoid wrong signals during range-bound price action, improving accuracy.

  • Captures trend and breakouts, performing well in trending markets.

  • Parameters can be optimized for different products and timeframes.

Risks and Mitigation

  • Failed breakout risk. Can be mitigated by using wider breakout levels and stronger momentum.

  • Inaccurate trend identification risk. Can be mitigated by tweaking MA parameters or adding other trend indicators.

  • Stoploss too tight leading to premature exit. Can dynamically adjust stoploss based on product and timeframe.

  • Takeprofit too tight restricting profits. Can dynamically set profit targets and risk-reward ratios.

Enhancement Opportunities

  • Overall, the MA, breakout, stoploss and takeprofit parameters can be optimized across products and timeframes for a tailored strategy.

  • Different MAs like EMA, SMA etc. can be tested to find the optimal indicator.

  • Additional indicators like Momentum can improve trend accuracy.

  • Parameters can be dynamically optimized using machine learning techniques.

  • Breakout success rate can be improved through statistical learning.

Summary

This strategy combines trend and momentum for theoretically filtered signals. The key is robust parameter optimization across products and timeframes for good performance. Additionally, auxiliary indicators and machine learning techniques can further improve the strategy. With continuous enhancements, this can become a robust trend-breakout trading system.

Source
Pine
/*backtest
start: 2023-10-15 00:00:00
end: 2023-11-14 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4
//Backtested Time Frame: H1
//Default Settings: Are meant to run successfully on all currency pairs to reduce over-fitting.
//Risk Warning: This is a forex trading robot, backtest performance will not equal future performance, USE AT YOUR OWN RISK.
Strategy parameters
Strategy parameters
Equity Risk (%)
Stop Loss (x*ATR, Float)
Risk : Reward (1 : x*SL, Float)
Fast MA (Period)
Slow MA (Period)
ATR (Period)
Use MA Slope (Boolean)
Bull Slope Angle (Deg)
Bear Slope Angle (Deg)
Exit When MA Re-Cross (Boolean)
Cancel Entry After X Bars (Period)
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)