Simple Pivot Reversal Algorithmic Trading Strategy
Overview
This strategy performs reversal trading based on pivot point breakouts. It calculates the pivot high and pivot low over a specified period to determine the pivot levels. It goes short when the price breaks above the pivot high, and goes long when the price breaks below the pivot low. This is a typical short-term mean reversion strategy.
Strategy Logic
The core logic of this strategy is to calculate the pivot high and low points. The formulas are:
Pivot High = Sum of highest high over the past N1 bars / N1
Pivot Low = Sum of lowest low over the past N2 bars / N2
Where N1 and N2 are parameters that define the number of bars used to calculate the pivot points.
After obtaining the pivot high/low levels, the trading rules are:
- Short when price breaks above pivot high
- Long when price breaks below pivot low
- Set stop loss after entry
So it realizes a short-term reversal strategy based on pivot point breakouts.
Advantage Analysis
The advantages of this simple strategy are:
- Simple logic, easy to understand and implement
- Suitable for high-frequency short-term trading
- Captures reversal after pivot breakouts
- Optimizable through parameter tuning
Risk Analysis
There are some risks:
- Failed reversal risk - The reversal after pivot breakout may fail and the trend continues
- Stop loss risk - The preset stop loss could be hit resulting in big loss
- Parameter risk - Inappropriate parameters greatly impacts results
These risks can be managed by parameter tuning, applying exit rules etc.
Optimization Directions
There is large room for optimization:
- Combine with other technical indicators to improve entry timing
- Add exit rules like trailing stop loss, profit-taking etc
- Dynamic adjustment of parameters to improve adaptiveness
- Parameter optimization to find the best parameter combinations
Summary
In summary, this is a very simple short-term pivot reversal strategy. Its advantages are simplicity and ability to capture reversals. But there are some risks that need to be addressed through optimization. Overall this serves as a good practice strategy for beginners and builds foundation for advanced strategies.
/*backtest
start: 2023-12-01 00:00:00
end: 2023-12-31 23:59:59
period: 2h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
strategy("Pivot Reversal Strategy - FIGS & DATES 2.0", overlay=true, pyramiding=0, initial_capital=10000, currency="USD", default_qty_type=strategy.percent_of_equity, default_qty_value=100.0, commission_value=0.075)
leftBars = input(4)- 1

