Tags:

CASHISKING CMF, EMA, SMA

This strategy generates trading signals based on the Chaikin Money Flow (CMF) indicator and Exponential Moving Averages (EMA). It first calculates the CMF values for a specified period, then uses two EMAs with different periods to smooth the CMF data. A buy signal is generated when the fast EMA crosses above the slow EMA, while a sell signal is generated when the fast EMA crosses below the slow EMA. The strategy also sets stop-loss and take-profit conditions to manage risk and lock in profits.

- Calculate the Chaikin Money Flow (CMF) values for a specified period. CMF incorporates both price and volume data to measure the strength of money flow into and out of the market.
- Apply two Exponential Moving Averages (EMAs) with different periods to smooth the CMF data. The fast EMA captures short-term trends, while the slow EMA identifies long-term trends.
- Generate a buy signal when the fast EMA crosses above the slow EMA, and a sell signal when the fast EMA crosses below the slow EMA.
- After a trading signal is generated, the strategy waits for confirmation from two candles to avoid false signals.
- Set stop-loss and take-profit conditions. The stop-loss price is a certain percentage of the entry price, while the take-profit price is a certain percentage of the entry price.

- Combines price and volume data: The CMF indicator comprehensively considers both price and volume data, providing a more reliable reflection of market money flow and generating more accurate trading signals.
- Trend tracking: By utilizing EMAs with different periods, the strategy can capture both short-term and long-term trends, adapting to various market environments.
- Signal confirmation: After a trading signal is generated, the strategy waits for confirmation from two candles, effectively filtering out some false signals and improving the success rate of trades.
- Risk management: The strategy incorporates stop-loss and take-profit conditions, which effectively controls the risk of individual trades while securing obtained profits.

- Parameter optimization: The performance of the strategy depends on the selection of CMF and EMA periods. Different market environments may require different parameter settings, necessitating periodic parameter optimization.
- Trend recognition: In choppy markets or at trend turning points, the strategy may generate more false signals, leading to frequent trades and capital losses.
- Slippage and trading costs: Frequent trading may increase slippage and trading costs, affecting the overall profitability of the strategy.

- Dynamic parameter adjustment: Dynamically adjust the CMF and EMA period parameters based on changes in market conditions to adapt to different market states.
- Incorporate other indicators: Combine other technical indicators, such as the Relative Strength Index (RSI) and Average True Range (ATR), to improve the accuracy of trend recognition and the reliability of signals.
- Optimize stop-loss and take-profit: Dynamically adjust the stop-loss and take-profit percentages based on market volatility and risk preferences to better manage risk and lock in profits.
- Implement position sizing: Dynamically adjust position sizes based on market trends and signal strength. Increase position sizes when trends are clear and reduce position sizes during uncertain periods.

This strategy utilizes the Chaikin Money Flow indicator and Exponential Moving Averages, combining price and volume data with a primary focus on trend tracking. It also sets stop-loss and take-profit conditions to manage risk. The strategy’s advantages lie in its ability to comprehensively consider multiple factors and capture trends on different time scales. However, there is still room for optimization in parameter settings and trend recognition. In the future, the strategy’s stability and profitability can be further improved through dynamic parameter adjustment, incorporation of other indicators, optimization of stop-loss and take-profit, and implementation of position sizing.

/*backtest start: 2023-06-01 00:00:00 end: 2024-06-06 00:00:00 period: 1d basePeriod: 1h exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}] */ //@version=5 strategy("CASHISKING", overlay=false) // Kullanıcı girişleri ile parametreler cmfPeriod = input.int(200, "CMF Periyodu", minval=1) emaFastPeriod = input.int(80, "Hızlı EMA Periyodu", minval=1) emaSlowPeriod = input.int(160, "Yavaş EMA Periyodu", minval=1) stopLossPercent = input.float(3, "Stop Loss Yüzdesi", minval=0.1) / 100 stopGainPercent = input.float(5, "Stop Gain Yüzdesi", minval=0.1) / 100 // CMF hesaplama fonksiyonu cmfFunc(close, high, low, volume, length) => clv = ((close - low) - (high - close)) / (high - low) valid = not na(clv) and not na(volume) and (high != low) clv_volume = valid ? clv * volume : na sum_clv_volume = ta.sma(clv_volume, length) sum_volume = ta.sma(volume, length) cmf = sum_volume != 0 ? sum_clv_volume / sum_volume : na cmf // CMF değerlerini hesaplama cmf = cmfFunc(close, high, low, volume, cmfPeriod) // EMA hesaplamaları emaFast = ta.ema(cmf, emaFastPeriod) emaSlow = ta.ema(cmf, emaSlowPeriod) // Göstergeleri çiz plot(emaFast, color=color.blue, title="EMA 23") plot(emaSlow, color=color.orange, title="EMA 50") // Alım ve Satım Sinyalleri crossOverHappened = ta.crossover(emaFast, emaSlow) crossUnderHappened = ta.crossunder(emaFast, emaSlow) // Kesişme sonrası bekleme sayacı var int crossOverCount = na var int crossUnderCount = na if (crossOverHappened) crossOverCount := 0 if (crossUnderHappened) crossUnderCount := 0 if (not na(crossOverCount)) crossOverCount += 1 if (not na(crossUnderCount)) crossUnderCount += 1 // Alım ve Satım işlemleri if (crossOverCount == 2) strategy.entry("Buy", strategy.long) crossOverCount := na // Sayaç sıfırlanır if (crossUnderCount == 2) strategy.entry("Sell", strategy.short) crossUnderCount := na // Sayaç sıfırlanır // Stop Loss ve Stop Gain hesaplama longStopPrice = strategy.position_avg_price * (1 - stopLossPercent) shortStopPrice = strategy.position_avg_price * (1 + stopLossPercent) longTakeProfitPrice = strategy.position_avg_price * (1 + stopGainPercent) shortTakeProfitPrice = strategy.position_avg_price * (1 - stopGainPercent) // Stop Loss ve Stop Gain'i uygula if (strategy.position_size > 0 and strategy.position_avg_price > 0) strategy.exit("Stop", "Buy", stop=longStopPrice, limit=longTakeProfitPrice) else if (strategy.position_size < 0 and strategy.position_avg_price > 0) strategy.exit("Stop", "Sell", stop=shortStopPrice, limit=shortTakeProfitPrice)

- Intraday Breakout Strategy Based on 3-Minute Candle High Low Points
- Advanced Entry Strategy based on Moving Average, Support/Resistance, and Volume
- EMA RSI MACD Dynamic Take Profit and Stop Loss Trading Strategy
- G-Trend EMA ATR Intelligent Trading Strategy
- Trend Following Strategy Based on 200-Day Moving Average and Stochastic Oscillator
- RSI Trend Strategy
- EMA Crossover Momentum Scalping Strategy
- BB Breakout Strategy
- VWAP and RSI Dynamic Bollinger Bands Take Profit and Stop Loss Strategy
- Chande-Kroll Stop Dynamic ATR Trend Following Strategy
- Trend Filtered Pin Bar Reversal Strategy
- Quantitative Trading Strategy Based on Reversal Patterns at Support and Resistance Levels
- MA, SMA, MA Slope, Trailing Stop Loss, Re-Entry
- TSI Crossover Strategy
- EMA Dual Moving Average Crossover Strategy
- Williams %R Dynamic TP/SL Adjustment Strategy
- RSI Dynamic Drawdown Stop-Loss Strategy
- VWAP Trading Strategy with Volume Anomaly Detection
- Supertrend and EMA Combination Strategy
- TGT Falling Buy Strategy Based on Price Decline