Type/to search

Open-High-Low Stop Loss Tracking Strategy

Common strategy
Created: 2024-02-18 14:30:08
Last modified: 2 years ago
1
Follow
1802
Followers

img

Overview

This strategy is designed based on the open, high and low data of candlestick charts to identify trend reversal points for entries. After entries, stop loss lines will be set based on the ATR indicator and tracked. Targets will also be calculated based on the risk-reward ratio. When price hits either the stop loss or profit target, orders will be sent to close positions.

Strategy Logic

The entry signals of this strategy come from the open, high and low prices. A buy signal is generated when the opening price equals the low of the candlestick, and a sell signal is generated when the opening price equals the high, indicating potential trend reversal opportunities.

After entry, dynamic trailing stop loss is calculated based on the ATR indicator. The long stop loss is set at the lowest low of recent N bars minus 1 ATR; the short stop loss is set at the highest high of recent N bars plus 1 ATR. The stop loss line will update dynamically to trail price moves.

Profit targets are calculated based on the risk-reward ratio setting. The long target is set at the entry price plus (the risk difference between entry price and stop loss multiplied by the risk-reward ratio); the short target is set at the entry price minus (the risk difference between stop loss and entry price multiplied by the risk-reward ratio).

When price hits either the stop loss or profit target, orders will be sent to flatten positions.

Advantage Analysis

The advantages of this strategy include:

  1. Simple and clear entry signals, avoiding multiple whipsaws.

  2. Dynamic ATR trailing stop locks in profits and prevents chasing highs and lows.

  3. Risk-reward ratio control avoids leaving profits on table and over-trading.

  4. Applicable to different products, easy to optimize.

Risk Analysis

There are also some risks of this strategy:

  1. Entry signals may lag to some extent, missing best market entry.

  2. Stop loss too tight or too loose, causing unnecessary stop loss or missing profits.

  3. No trend determination, prone to being trapped in ranging markets.

  4. Unable to handle overnight positions.

The optimization directions are:

  1. Incorporate other indicators for trend bias to avoid whipsaws.

  2. Fine tune ATR parameters or add volatility control for better stop loss.

  3. Add trend filtering to reduce signal noise.

  4. Add overnight position handling for certain products.

Conclusion

In conclusion, this is a simple and straightforward strategy with clear entry logic, reasonable stop loss methodology and good risk control. But there are some limitations like insufficient trend bias, signal lagging etc. These flaws also point out directions for future optimization. By incorporating more indicators filters and risk management modules, this strategy can be further enhanced and made more robust.

Source
Pine
/*backtest
start: 2024-01-01 00:00:00
end: 2024-01-31 23:59:59
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=5
// Open-High-Low strategy

strategy('Strategy: OLH', shorttitle="OLH", overlay=true )
Strategy parameters
Strategy parameters
StopLoss settings
ATR Period for placing SL
Stolploss settings
Show SL lines in chart
Trade settings
Risk:Reward
Close all trades, default is 3:00 PM, 1500 hours (integer)
Markets that never closed (Crypto, Forex, Commodity)
Lot Size
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)