EMA Crossover Timing Discrepancies in Live Crypto Trading
Summary
This post describes a live trading issue in a Binance BTC/USDT futures bot that uses two configurable EMAs to generate entries. The code enters long when the faster EMA crosses above the slower one and short when it crosses below, checking the second- and third-most-recent bars. The author reports that when either EMA period exceeds 100, the live EMA values differ from Binance’s values and signals can occur five to ten candles early or late; periods below 100 reportedly match.
The example also shows the surrounding execution logic: it sets swap mode and margin, sizes orders from wallet balance and price precision, and applies fixed price-distance take-profit and stop-loss checks. However, it offers no diagnosis or correction for the EMA discrepancy, and the sample history check only requires more than nine records even though the EMA periods are much longer. No comparative data or backtest results establish the cause, so the post is best read as a reported implementation problem rather than a validated trading method.
Key ideas
- The bot enters long or short positions when two EMAs cross.
- It checks recent closed-bar values to detect crossover signals.
- The author reports mismatches against Binance when an EMA period exceeds 100.
- The code combines entries with fixed-distance take-profit and stop-loss rules.
- The post does not identify the cause or verify a fix for the timing discrepancy.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.