Logo

dev-resources.site

for different kinds of informations.

Multi-dimensional Gold Friday Anomaly Strategy Analysis System

Published at
1/13/2025
Categories
strategy
trading
cryptocurrency
analysis
Author
fmzquant
Author
8 person written this
fmzquant
open
Multi-dimensional Gold Friday Anomaly Strategy Analysis System

Image description

Overview
This strategy is a trading system based on market anomalies, mainly using the market behavior characteristics from the close of Thursday night to the close of Friday to trade. This strategy uses fixed entry and exit times, and verifies the effectiveness of this market model through backtesting. The strategy uses 10% of funds for a single transaction, and takes into account slippage and commission factors to ensure the authenticity of the backtest results.

Strategy Principle
The core logic of the strategy is based on the following key elements:

  1. Entry conditions: Enter the market and go long at the close of Thursday. This time point is chosen based on historical data analysis.
  2. Exit conditions: Close the position at the close of Friday, and the holding period is fixed.
  3. Money management: Use 10% of your account funds for each transaction. This conservative position management helps control risk.
  4. Trading execution: Executing orders at closing prices can avoid the impact of sharp intraday fluctuations.

Strategy Advantages

  1. Simple and clear: The trading rules are clear, without complicated indicator combinations, easy to understand and execute.
  2. Controllable risks: Fixed holding time and capital management plans make risks easier to assess and control.
  3. High degree of automation: The strategy logic is simple and suitable for programming to achieve automated trading.
  4. Strong flexibility: parameters can be adjusted according to different market environments, with good adaptability.

Strategy Risks

  1. Time Dependence: Strategies are heavily dependent on a specific time window and may be affected by major news during non-trading hours.
  2. Changes in market environment: Historical statistical rules may become invalid in the future, and strategy performance needs to be continuously monitored.
  3. Execution risk: Liquidity may be insufficient during closing hours, resulting in increased slippage. It is recommended to manage risk by:
  • Set up stop loss and take profit
  • Dynamically adjust holding time
  • Add filter conditions

Strategy Optimization Direction

  1. Introducing volatility indicators: The ATR indicator can be added to dynamically adjust position sizes to make the strategy more adaptive.
  2. Optimize entry timing: You can combine price patterns and technical indicators to improve the accuracy of entry.
  3. Improve risk control: Add a dynamic stop-loss mechanism to protect existing profits.
  4. Add filtering conditions: Consider adding a trend filter to avoid trading in unfavorable market conditions.

Summary
This strategy is a classic trading system based on market anomalies, which obtains potential returns through strict time management and conservative fund management. Although the strategy logic is simple, it is still necessary to pay attention to the risks brought by changes in the market environment. It is recommended to adopt more conservative position control and more complete risk management mechanisms in live trading.

Strategy source code

/*backtest
start: 2024-11-11 00:00:00
end: 2024-12-10 08:00:00
period: 4h
basePeriod: 4h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// This Pine Scriptโ„ข code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// ยฉ piirsalu

//@version=5
strategy("Gold Friday Anomaly Strategy", 
     default_qty_type=strategy.percent_of_equity,
     slippage = 1, commission_value=0.0005,
     process_orders_on_close = true,
     initial_capital = 50000,
     default_qty_value=500,
     overlay = true)


/////////////////////////////////////////////////////////////////////////////////////
//                                 . USER INPUTS .                                 //
/////////////////////////////////////////////////////////////////////////////////////

// Define backtest start and end dates
st_yr_inp = input(defval=2000, title='Backtest Start Year')
st_mn_inp = input(defval=01, title='Backtest Start Month')
st_dy_inp = input(defval=01, title='Backtest Start Day')
en_yr_inp = input(defval=2025, title='Backtest End Year')
en_mn_inp = input(defval=01, title='Backtest End Month')
en_dy_inp = input(defval=01, title='Backtest End Day')

// Set start and end timestamps for backtesting
start = timestamp(st_yr_inp, st_mn_inp, st_dy_inp, 00, 00)
end = timestamp(en_yr_inp, en_mn_inp, en_dy_inp, 00, 00)

/////////////////////////////////////////////////////////////////////////////////////
//                              . STRATEGY LOGIC .                                 //
/////////////////////////////////////////////////////////////////////////////////////

// Check if the current day is Friday
isFriday = (dayofweek == dayofweek.friday)

// Initialize a candle counter
var int barCounter = 0

// Increment the candle counter on each new bar
barCounter := barCounter + 1

// Define trading session time ranges
pre_mkt = time(timeframe.period, '0400-0800:23456')
mkt_hrs = time(timeframe.period, '0800-1600:23456')
eod = time(timeframe.period, '1200-1600:23456')

/////////////////////////////////////////////////////////////////////////////////////
//                          . STRATEGY ENTRY & EXIT .                              //
/////////////////////////////////////////////////////////////////////////////////////

// Enter a long position on the first candle of Friday within the backtest period
if dayofweek == 4 and time >= start and time <= end
    strategy.entry("BuyOnFriday", strategy.long)

// Close the position after holding it for 4 candles
if (barCounter % 1 == 0)
    strategy.close("BuyOnFriday")

Enter fullscreen mode Exit fullscreen mode

Strategy Parameters

Image description

The original address: https://www.fmz.com/strategy/474877

cryptocurrency Article's
30 articles in total
Favicon
TMA Wallet โ€” a non-custodial MPC wallet for your Telegram Mini App
Favicon
Closing the PKIX Working Group is, apparently, not news
Favicon
What is Blockchain?
Favicon
Multi-EMA Trend Following Strategy with SMMA Confirmation
Favicon
Dynamic Pivot Points with Crossup Optimization System
Favicon
Will the Ripple Case Set New Rules for Crypto?
Favicon
Multi-Timeframe Trend Dynamic ATR Tracking Strategy
Favicon
Multi-dimensional Gold Friday Anomaly Strategy Analysis System
Favicon
Mean Reversion Bollinger Band Dollar-Cost Averaging Investment Strategy
Favicon
Optimism Bridge: Your Gateway to Faster and Cheaper Crypto Transfers
Favicon
Join Us at HederaCon 2025!
Favicon
Why is blockchain knowledge important even if you are not a programmer? ๐Ÿ”—
Favicon
Prospek Harga Gozu AI: Prediksi dan Tren Pasar
Favicon
Why Should You Choose Wazirx Clone Script for Crypto Business?
Favicon
Dynamic ATR Trend Following Strategy Based on Support Level Breakthrough
Favicon
Price Pattern Based Double Bottom and Top Automated Trading Strategy
Favicon
Multi-Moving Average Trend Following Strategy - Long-term Investment Signal System Based on EMA and SMA Indicators
Favicon
Dual EMA Crossover Strategy with Smart Risk-Reward Control
Favicon
How Nigerians Can Access Lucrative Web3 Jobs in 2025: A Complete Guide to Building a Career in Blockchain and Crypto
Favicon
Bitcoin Exchange Script the Best Startup Business in 2025
Favicon
Dual EMA Stochastic Trend Following Trading Strategy
Favicon
Multi-Wave Trend Crossing Risk Management Quantitative Strategy
Favicon
Dynamic EMA Trend Crossover Entry Quantitative Strategy
Favicon
Forex Ticker Widget: Simplifying Forex Monitoring for Users
Favicon
Actualizaciones recientes de Polygon Bridge: Novedades que debes conocer
Favicon
Crypto Safety First: Outsmart Scammers and Protect Your Assets ๐Ÿš€๐Ÿ’ธ
Favicon
iziSwap: Una Nueva Generaciรณn de Intercambios Descentralizados
Favicon
Understanding the Role of Validators in Polygon Bridge Transactions
Favicon
How Forex Widgets for Website Improve User Engagement
Favicon
Enhanced Mean Reversion Strategy with MACD-ATR Implementation

Featured ones: