This strategy generates buy signals when a fast moving average (Fast MA) crosses above a slow moving average (Slow MA).
It also takes profit when the returns reach 1% to lock in small but consistent profits.
The strategy works well in trending markets with clear trends. It can capture medium-term up trends and achieve steady profits.
The strategy is based on the golden cross of moving averages. Moving averages reflect the medium-term trend of stock prices. When the short-term MA crosses above the longer-term MA, it signals that the short-term upward momentum is stronger than the long-term trend. This is a strong buy signal.
The fast MA in this strategy has a length of 10 days and the slow MA is 30 days. This can capture reasonable trend movements. A long signal is triggered when the fast MA crosses above the slow MA.
The strategy also sets a 1% take profit point. Positions will be closed when the returns hit 1% to lock in profits. This helps avoid losses from trend reversals.
The strengths of this strategy are:
Overall the strategy is quite robust and can achieve steady profits in trending markets.
There are also some risks to consider:
To address these risks:
Some ways to optimize this strategy:
The strategy is a typical moving average crossover system. It identifies medium-term trends using fast and slow MA, taking 1% profit along the way. Strengths include simplicity and the ability to ride uptrends for steady gains. Weakness is poorer adaptation to complex, volatile markets. By optimizing with more indicators and stop loss mechanisms, the strategy can achieve more robust performance.
/*backtest start: 2023-01-01 00:00:00 end: 2023-06-15 00:00:00 period: 3d basePeriod: 1d 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/ // © pleasantHead5366 //@version=4 strategy("1% Profit Strategy", overlay=true) // Input parameters fastLength = input(10, title="Fast MA Length") slowLength = input(30, title="Slow MA Length") profitPercentage = input(1, title="Profit Percentage") // Calculate moving averages fastMA = sma(close, fastLength) slowMA = sma(close, slowLength) // Plot moving averages on the chart plot(fastMA, color=color.blue, title="Fast MA") plot(slowMA, color=color.red, title="Slow MA") // Trading logic longCondition = crossover(fastMA, slowMA) if (longCondition) strategy.entry("Buy", strategy.long) // Close long position when profit reaches 1% if (strategy.position_size > 0) strategy.exit("Take Profit", from_entry="Buy", profit=profitPercentage / 100) // Plot Buy and Sell signals on the chart shortCondition = crossunder(fastMA, slowMA) if (shortCondition) strategy.entry("Sell", strategy.short)