Termos de Referência
""" 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
Respondido
1
Classificação
Projetos
1
0%
Arbitragem
0
Expirado
0
Livre
Publicou: 2 códigos
2
Classificação
Projetos
2
0%
Arbitragem
1
0%
/
0%
Expirado
0
Livre
3
Classificação
Projetos
90
29%
Arbitragem
24
13%
/
58%
Expirado
7
8%
Trabalhando
4
Classificação
Projetos
8
38%
Arbitragem
1
0%
/
100%
Expirado
0
Livre
5
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
6
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
7
Classificação
Projetos
28
7%
Arbitragem
9
33%
/
33%
Expirado
1
4%
Trabalhando
8
Classificação
Projetos
30
20%
Arbitragem
8
63%
/
13%
Expirado
9
30%
Livre
9
Classificação
Projetos
478
40%
Arbitragem
105
40%
/
24%
Expirado
82
17%
Carregado
Publicou: 2 códigos
10
Classificação
Projetos
35
37%
Arbitragem
0
Expirado
2
6%
Livre
11
Classificação
Projetos
74
18%
Arbitragem
30
17%
/
53%
Expirado
31
42%
Livre
12
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
13
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
14
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
15
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
Publicou: 2 códigos
16
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
17
Classificação
Projetos
134
66%
Arbitragem
36
25%
/
56%
Expirado
22
16%
Livre
Publicou: 10 códigos
18
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
19
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
20
Classificação
Projetos
1
0%
Arbitragem
0
Expirado
0
Livre
Publicou: 10 códigos
21
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
22
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
23
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
24
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
25
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
26
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
Publicou: 2 códigos
Pedidos semelhantes
I need a clean and simple MetaTrader 5 (MT5) Expert Advisor / Utility to manage my manually opened trades (opened via PC or Mobile) based strictly on USD profit/loss values. Core Requirements: 1. Strictly USD Inputs: All targets, stops, break-even, and trailing parameters must be calculated and inputted using USD currency values, not pips or points. 2. Partial Closure (3 Take Profits): * When floating profit hits TP1
Triangular Arbitrage MT5 EA
30 - 3000 USD
I’m looking for someone with experience developing Expert Advisors for MetaTrader 5, particularly someone who has a strong understanding of arbitrage, mean reversion, multi-pair trading, and simultaneous order execution. I’m looking to develop an MT5 EA based on a triangular arbitrage strategy that identifies price discrepancies between three related currency pairs and automatically executes trades when the
I am looking for an experienced MQL5 developer to build a fully automated MT5 Expert Advisor for XAUUSD. The trading rules are already defined. I need the developer to implement them accurately in MQL5, not redesign the strategy. Main requirements: XAUUSD Multi-timeframe logic: H1 direction, M15 setup, M5 entry Entry only after candle-close confirmation No repainting / closed-bar logic Configurable Stop Loss and Take
Ninjatrader 8 order
30+ USD
I have an existing order-flow engine for NinjaTrader 8, approximately 25,000 lines of C# code, currently using Rithmic Level 2 data. It detects absorption, iceberg orders, and other order-flow signals. We have also developed an initial bridge prototype ourselves and tested parts of the R|Trader Pro to NinjaTrader connection workflow, but we have not yet established a working MBO data connection. I am specifically
Hi, I have developed an MT5 Expert Advisor called SRX which latest version is R24b47 , and I am looking for an experienced MQL5/MT5 EA developer to perform a thorough technical investigation, fixing and optimization of the EA. 1. The main problem SRX is not stable across different market periods . It can perform extremely well during one period, but the same EA/configuration can perform very poorly or approach Margin
LynxMT5algo
30 - 100 USD
An mt5 add on indicator like gainalgo style to show entrance and exit areas for gold silver and Btc scalping. It will be used to make trading more easy for beginners
AI-Powered Forex Trading EA for MetaTrader 5
700 - 1500 USD
I need a professional AI-assisted Forex trading Expert Advisor (EA) for MetaTrader 5. The EA should not be based on a simple single indicator strategy. I want a robust multi-factor trading system that can analyze market conditions, trend, momentum, volatility, price action and risk before entering a trade. Requirements: Forex trading on MT5 Automated analysis and trade execution Dynamic entry and exit decisions Stop
Converting MT4 to MT5 Project
30 - 3000 USD
Hey guys, I’ve got an MT4 HFT EA that’s showing strong results on an IC Markets demo account, and I'm looking to move it over to MT5. Does anyone have a solid MT5 version that performs well on IC Markets? Having the source code (MQL5) included would be awesome. Thanks for any leads
Let’s use Chart M3. Stochastic 8,3,3. 85/15 trigger for sell stochastic >85, and the reversal move need to engulf the last bar for 1 point. SL over the engulfed bar. Same trigger for buys… Stochastic <15, engulfed bar by 1 point = entrance. SL under the engulfed bar… more details as soon we start to work on it
EA Recovery Layer
30+ USD
Freelance Task — EA Recovery Layer Hello. I have a ready-made MQL5 EA. The signals, SL/TP and lot calculation should essentially not be touched. I need a recovery system added. I am not a programmer — below is how the robot should behave. What stays Entry only from an EA signal. Stop-loss is not a new signal. Trailing is already built into my EA — recovery does not implement its own trailing. If trailing is disabled
Informações sobre o projeto
Orçamento
30+ USD