TopicTrading Software
Backtesting, broker APIs and market-data tooling. Engineering only, never advice.
Short answer: A timestamp ahead of server time error means your signed request carried a clock value later than the exchange's clock allows. Sync the system clock with NTP first, then measure offset and latency before touching recvWindow.
Read the full answer
Short answer: Survivorship bias in a backtest happens when your universe contains only securities that exist today, so bankrupt, delisted and acquired names are missing and returns look better. Fix it with point-in-time membership plus delisted price history.
Read the full answer
Short answer: ibapi error 502 couldn't connect to TWS means the TCP connection to your host and port failed, so the API handshake never began. Start TWS or Gateway, log in, enable socket clients, and match the port.
Read the full answer
Short answer: To do an ibapi get value from callback in Python, store the data on self inside the callback, set a threading.Event there, and have the requesting method wait on it with a timeout before returning the value, because ibapi requests return immediately.
Read the full answer
Short answer: The ccxt OHLCV timestamp is the candle open time in UTC epoch milliseconds, and ccxt has no timezone setting. Convert it yourself with pd.to_datetime(ts, unit='ms', utc=True).dt.tz_convert('Asia/Hong_Kong').
Read the full answer
Short answer: Alpha Vantage Asian stock exchanges are only partly covered: Shanghai (.SHH) and Shenzhen (.SHZ) are documented suffixes, while Tokyo and Hong Kong are not documented, so verify each ticker with SYMBOL_SEARCH before relying on it.
Read the full answer
Short answer: A sniffing algorithm in trading is an informal label for software that detects other participants' orders or footprints, such as hidden parent orders or institutional flow, and trades in response. It is not a formal technique.
Read the full answer
Short answer: When yfinance ticker info is not working, .info calls Yahoo's quoteSummary endpoint, which is sparse or blocked for many non-US tickers while history() still works. Use fast_info and history_metadata for name and currency.
Read the full answer
Short answer: No: TradingView export drawings data is not possible through Export chart data, which writes only OHLCV bars and visible indicator plots. Long/Short Position tools must be logged by hand, rebuilt as a Pine strategy, or replaced by Trading Panel orders.
Read the full answer
Short answer: For a Pine Script overlay and separate pane in one script, declare overlay=false and add force_overlay=true to the price-scale plots. Bollinger Bands then draw on the candles while MACD stays in the sub-pane.
Read the full answer
Short answer: Pine Script valuewhen (ta.valuewhen) returns a series that, on every bar, holds the source value from the bar where the condition was last true; the trailing [n] in ta.valuewhen(cond, src, 0)[n] just reads that series n bars back.
Read the full answer
Short answer: Order book downsampling means treating each field by type: take the last snapshot at the bar edge for book state, sum flow such as trades and order flow imbalance, and aggregate only scalar features like spread and mid. Never average depth levels.
Read the full answer