Tarea técnica
""" Wick Reversal Strategy — core logic ===================================== Rules (as specified): - Timeframe: 15-minute candles - Entry: candle wick >= WICK_MULTIPLIER x body -> signal candle - long lower wick -> enter LONG at next candle's open - long upper wick -> enter SHORT at next candle's open - Exit: an opposite-direction wick candle forms while in a position - Stop-loss: just beyond the signal candle's extreme (high/low) - Position sizing: risk RISK_PCT of account equity per trade """ from dataclasses import dataclass from enum import Enum import pandas as pd class Signal(Enum): NONE = "none" LONG_WICK = "long_wick" # long lower wick -> bullish signal SHORT_WICK = "short_wick" # long upper wick -> bearish signal @dataclass class StrategyParams: wick_multiplier: float = 2.0 # wick must be >= this x body size risk_pct: float = 0.05 # fraction of equity risked per trade stop_buffer: float = 0.0 # extra buffer beyond wick extreme (in price units) def classify_candle(open_: float, high: float, low: float, close: float, params: StrategyParams) -> Signal: """ Classify a single candle as a wick signal or not. body = |close - open| upper_wick = high - max(open, close) lower_wick = min(open, close) - low """ body = abs(close - open_) upper_wick = high - max(open_, close) lower_wick = min(open_, close) - low # Guard against a zero/near-zero body (doji) inflating the ratio infinitely. # Use a tiny epsilon floor so a real body of 0 doesn't produce a false signal # from noise, but still allows genuine doji-with-wick setups to qualify. epsilon = 1e-9 effective_body = max(body, epsilon) is_lower_signal = lower_wick >= params.wick_multiplier * effective_body and lower_wick > 0 is_upper_signal = upper_wick >= params.wick_multiplier * effective_body and upper_wick > 0 # If both sides qualify (rare, e.g. near-zero body with wicks both sides), # take the larger wick as the dominant signal. if is_lower_signal and is_upper_signal: return Signal.LONG_WICK if lower_wick >= upper_wick else Signal.SHORT_WICK if is_lower_signal: return Signal.LONG_WICK if is_upper_signal: return Signal.SHORT_WICK return Signal.NONE def position_size(equity: float, entry_price: float, stop_price: float, params: StrategyParams) -> int: """ Shares = (equity * risk_pct) / |entry - stop| Returns whole shares (floored). Returns 0 if stop distance is invalid. """ risk_amount = equity * params.risk_pct stop_distance = abs(entry_price - stop_price) if stop_distance <= 0: return 0 shares = int(risk_amount // stop_distance) return max(shares, 0) def annotate_signals(df: pd.DataFrame, params: StrategyParams) -> pd.DataFrame: """ Adds a 'signal' column to an OHLC dataframe. Expects columns: open, high, low, close """ df = df.copy() df["signal"] = df.apply( lambda row: classify_candle(row["open"], row["high"], row["low"], row["close"], params).value, axis=1, ) return df
Han respondido
1
Evaluación
Proyectos
1
0%
Arbitraje
0
Caducado
0
Libre
2
Evaluación
Proyectos
2
0%
Arbitraje
1
0%
/
0%
Caducado
0
Libre
3
Evaluación
Proyectos
90
29%
Arbitraje
24
13%
/
58%
Caducado
7
8%
Trabaja
4
Evaluación
Proyectos
8
38%
Arbitraje
1
0%
/
100%
Caducado
0
Libre
5
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
6
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
7
Evaluación
Proyectos
27
7%
Arbitraje
9
33%
/
33%
Caducado
1
4%
Trabaja
8
Evaluación
Proyectos
30
20%
Arbitraje
8
63%
/
13%
Caducado
9
30%
Libre
9
Evaluación
Proyectos
478
40%
Arbitraje
105
40%
/
24%
Caducado
82
17%
Trabajando
Ha publicado: 2 ejemplos
10
Evaluación
Proyectos
34
35%
Arbitraje
0
Caducado
2
6%
Libre
Solicitudes similares
KOKIE FX
30 - 200 USD
PROGRAM: PSMI Market Intelligence Engine v1.0 OBJECTIVE: Analyse the market from higher timeframes to lower timeframes, build a market narrative, and only allow execution when every condition is confirmed. ========================================================= STEP 1 LOAD DATA ========================================================= Read: Monthly (future) Daily H4 H1 M15 M5
Hello, I am looking for someone to Run and Monitor the EA and Signals in the account. Should be able to monitor daily and fix any issue in the signal Copying and EA running. The Settings and configuration to be checked and updated periodically. Should be available to report and update on daily basis. Tell me the cost and your previous experience for the same. Thanks
Looking for an Experienced MQL4/MQL5 Developer to Build a Professional Scalping Expert Advisor (EA) I am looking for an experienced MQL4/MQL5 developer to build a professional Expert Advisor (EA) for MetaTrader 4 or MetaTrader 5 from scratch. My goal is to develop a high-quality scalping system with strong risk management and long-term profitability potential. I am not looking for unrealistic promises or "100%
Elite sniper scalper
30+ USD
void OnTick() { // Check if we already have an open trade if(OrdersTotal() == 0) { // Get the value of a 14-period Moving Average double ma = iMA(Symbol(), 0, 14, 0, MODE_SMA, PRICE_CLOSE, 0); // Basic Condition: If current close price moves above the MA, buy if(Close[0] > ma) { int ticket = OrderSend(Symbol(), OP_BUY, 0.1, Ask, 3, 0, 0, "My First Bot", 0, 0, clrGreen); } } }
Strangest request, EVER!
30 - 250 USD
Recently I have backtested more than 100 EAs and I have come to a conclusion that in the long-term all of them produce catastrophic results. I used 99.9% data quality and whenever possible decades of data. In the short-term almost all of them can have nice gains. But there is hardly any EA that could survive even just 3-5 years, let alone decades ! This got me thinking: if almost all EAs are unfit for long-term
Convert Tradingview (Pinescript) to MT5 Indicator
50 - 200 USD
I am looking for an experienced MQL5 developer to convert a TradingView indicator into an MT5 indicator. The objective is to recreate the TradingView indicator in MQL5 so that it produces the same calculations, plots, values, and signals as closely as possible. Requirements: Convert the TradingView Pine Script into an MT5 indicator (.mq5). Ensure the MT5 version matches the TradingView version as accurately as
Ninjatrader 8 bot development
30+ USD
Hello, I want a simple bot for NinjaTrader8. I need a bot that operates automatically on Nasdaq (NQ/MNQ). Requirements: open buys and sells following a simple trend strategy, configurable stop loss and take profit, risk per trade of 1 to 2% of capital, if it loses 3% in a day, stop trading until the next day. Compatible with backtesting, delivery of the source code and the working bot in NinjaTrader 8. My initial
a { text-decoration: none; color: #464feb; } tr th, tr td { border: 1px solid #e6e6e6; } tr th { background-color: #f5f5f5; } Project Overview I am looking for an experienced algorithmic trading developer to build a professional Expert Advisor (EA) for MetaTrader 5 and/or cTrader. The objective is to create a robust automated trading system focused exclusively on XAUUSD (Gold) . This project is intended for serious
Hello, I am planning to automate my own Gold (XAUUSD) scalping strategy using xCustomEA. Before purchasing xCustomEA and hiring a developer, I would like to know: Whether my strategy can be implemented in xCustomEA. Whether any custom MQL5 coding is required. The estimated cost. The estimated development time. I already have a detailed strategy document and will provide it after the initial discussion. The strategy
Project: GoldScalpBot (already published: https://www.mql5.com/en/code/75652 ) I need an experienced MT5 developer to improve my existing Expert Advisor and its local app bridge. Current stack: - MT5 EA (MQL5) for XAUUSD scalping (EMA/momentum/breakout, ATR SL/TP, London/NY sessions, win-based lot scale, daily loss stop) - Local Node.js HTTP bridge (heartbeat + command queue) for a React Native mobile app
Información sobre el proyecto
Presupuesto
30+ USD
Cliente
Encargos realizados1
Número de arbitrajes0