Type/to search

Profit Grid Strategy With Oscillation

Common strategy
Created: 2024-01-23 15:16:47
Last modified: 3 years ago
1
Follow
1802
Followers

img

Overview

The profit grid strategy with oscillation is a trend following strategy that automatically establishes grids based on price fluctuations to make profits continuously as price oscillates.

Strategy Logic

The core idea of this strategy is to build a grid of price ranges. New trading signals are generated when the price enters different ranges. For example, if the grid gap is set to 500 USD, a new long signal will be triggered when the price rises above 500 USD.

Specifically, the strategy keeps moving the grid by tracking new high or low prices. In the code, a variable called re_grid is defined to store the current grid price. As long as the price breaks through this grid price beyond the defined grid gap, the next grid price will be recalculated.

Thus, new trading signals are generated when the price fluctuates sufficiently. Profits can be made by going long or short accordingly. When the price starts to move in the opposite direction exceeding the grid gap, the previous position will be stopped out at a profit.

Advantage Analysis

The biggest advantage of this strategy is that it can automatically track the price trend and make profits persistently. As long as the price keeps fluctuating strongly, our position size and profits will increase continuously.

In addition, risks can be effectively controlled by reasonably setting the grid parameters. Combining with technical indicators like Ichimoku Cloud to filter signals can also improve the stability of the strategy.

Risk Analysis

The main risk of this strategy is that price may suddenly reverse, leading to a stop loss. The accumulated profits could then diminish or even turn into a loss.

To control such risk, we can set a stop loss line, reasonably adjust the grid parameters, choose products with a stronger trend, and filter signals with multiple technical indicators.

Optimization Directions

We can optimize the strategy from the following aspects:

  1. Optimize grid parameters to find the best combination of grid gap, position sizing etc.

  2. Improve or adjust the stop loss mechanism to better control risks.

  3. Test different trading products and select those with higher fluctuations and clearer trends.

  4. Add more technical indicators to judge signals and improve robustness.

Conclusion

The profit grid strategy with oscillation can effectively generate persistent profits by automatically tracking trends through establishing price grids. At the same time, certain drawdown risks exist. By parameter optimization, stop loss setting, product selection etc, the risks can be effectively controlled and strategy made more robust.

Source
Pine
/*backtest
start: 2023-01-16 00:00:00
end: 2024-01-22 00:00:00
period: 1d
basePeriod: 1h
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/
// © ramsay09
//@version=4
Strategy parameters
Strategy parameters
Backtest (no comment-string, disable for API-trading)
Long/Short Entry
--- 1st ENTRY SIGNAL ---
--- 2nd ENTRY SIGNAL ---
Entry filter 1
Entry filter 2
Exit filter 1
Exit filter 2
Grid gap - base currency
Shared filter and entry parameters :
Segment max bars
Fractals period
RSI period
MA period
SuperTrend multiplier
SuperTrend length
DI length (signals)
ADX smooth (signals)
ADX threshold (signals)
TRIX Length
Signal Smoothing Length (TRIX)
Exit Parameters :
TRIX Length
Signal Smoothing Length (TRIX)
Exit fractals - period
Exit fractals - past fractal
Exit RSI period
Exit MA period
Exit SuperTrend multiplier
Exit SuperTrend length
Exit ADX period
Exit ADX smooth
Exit ADX threshold
Set backtest start or/and trend start :
Start year
Start month
Start day
Stop year
Stop month
Stop day
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)