Fast EMA Scalp Manager
Momentum scalp structure whose take-profit is reported in basis points, so the target can be compared against your actual round-trip cost before the strategy is enabled. High frequency, cost-sensitive by construction.
Momentum scalp structure whose take-profit is reported in basis points, so the target can be compared against your actual round-trip cost before the strategy is enabled. High frequency, cost-sensitive by construction.
A scalp is not a small trade, it is a trade whose edge must exceed its costs. At a one-minute horizon, taker fees plus spread can easily exceed the entire target, which turns a "profitable" backtest into a guaranteed loss in production. This package therefore exposes the target as a fraction and reports the target in basis points alongside the entry condition, so a caller can compare it directly against its own round-trip cost before enabling it. The exit is evaluated against your average entry, which the caller supplies - the package never guesses your fill price. WHEN TO USE THIS • An agent manages an already-open scalp and needs the exit decision. • You want to compute whether a target survives fees before turning a scalper on. • You need to demonstrate why one-minute strategies die on costs. Do not use on a venue or account tier with meaningful taker fees unless you have checked that target_bps clears the round trip. WHAT THIS PACKAGE DELIBERATELY DOES NOT CONTAIN This is a framework release, not the tuned production build. Specifically: • No position sizing. On a one-minute horizon the clip size is the risk control and it is yours. • No fee model. Fees are venue- and tier-specific; hard-coding one would be worse than omitting it. • No stop-loss. Only a target and a cross exit are implemented. A scalp without a stop is not a complete strategy. • No tuned periods or target. • No default thresholds in code. scripts/ema_scalp.py raises PARAM_INCOMPLETE rather than falling back to a number. A silent default would make you believe you are running a calibrated system when you are running someone else's parameters. Every decision boundary is an input. That is the whole contract. DECISION CONTRACT • action: Condition • long: Fast average above slow and last closed bar advanced, with no open position • exit: Price is at or above avg_entry (1 + target) • exit: Fast average crossed back below slow while a position is open • hold: A position is open and neither exit has fired • flat: Flat book and no entry Response carries target_bps, ema_fast, ema_slow and avg_entry, so the cost check is possible without recomputing anything. OUTPUT SCHEMA { "action": "exit", "price": 63205.0, "avg_entry": 63030.0, "target_bps": 25.0, "ema_fast": 63201.4, "ema_slow": 63120.8, "reason": "target reached: +0.28% >= +0.25%" } action is the only field you must branch on. reason is meant for logs and for an agent to quote back to a human — do not parse it. RUN IT python3 scripts/ema_scalp.py \ --params references/params-example.json \ --symbol BTC/USDT \ --interval 1m references/params-example.json holds round, obviously-illustrative numbers. They exist so the command runs on the first try, not because they are good. Feeding position state in: python3 scripts/ema_scalp.py --params my.json --state '{"avg_entry": 61250.5, "layers": 2}' CALIBRATING THE THRESHOLDS 1. target_pips - the take-profit fraction. Convert to basis points first: target_pips 10000. Then compare against 2 taker_fee + spread. If the target is not at least several times that number, the strategy cannot work and no parameter search will change it. 2. ema_fast / ema_slow - the momentum horizon. On one-minute data very short periods are dominated by microstructure noise; the cross count explodes and each cross costs a round trip. 3. Optimise net of costs, never gross. A gross-optimised scalper will pick the smallest target and the shortest averages, which is precisely the worst net result. Hold out the most recent ~30% in time. Also report the fill count, not just returns: a variant that trades four times as often is a different strategy, not a better one. KNOWN LIMITS • No stop-loss. A position that never reaches the target and never crosses back stays open indefinitely. • The target is a price target evaluated on closes; intra-bar spikes that would have filled a real limit order are invisible. • One-minute data from a public REST endpoint is delayed and frequently has gaps. Do not treat a clean backtest as evidence of live fill quality. • No slippage model, and at this horizon slippage is the dominant cost term. DISCLAIMER This is a decision framework for research and education. It is not investment advice, not a profit claim, and not a backtest result. Crypto derivatives can lose more than the deposit. You are responsible for the parameters you choose and for every order your executor places.
ipfs://bafkreidyyiquxqgy3oj25wnwv5tgx2ewiabgv3k2zrtxcfxrshj4ure2ne
The primary-document hash is the SHA-256 of the plaintext primary Markdown file. The content-commitment hash covers the verified SkillRoot structure, or plaintext ZIP for older Skills; it is not the hash of the downloaded file.
Opaque identifiers and fingerprints are hidden from the primary experience but remain available for exact verification.
0x253a66496f50e6c1fa7d8188f8ef24fd900d0f8e2d2d6c84e347656a4b1ced940xafb051186af4fec81b63be239ba2d0eadcbc2ce0920aceb8e3a99b39a3b181a3