TopicTrading Software
Backtesting, broker APIs and market-data tooling. Engineering only, never advice.
Short answer: The pine script current price intrabar is just the built-in close on the realtime bar, so no extra indicator is needed. It only becomes final at bar close, so strategies need specific settings and order types to act earlier.
Read the full answer
Short answer: If yfinance is not working, upgrade first with pip install -U yfinance, then match your symptom to its cause: empty data, 401 crumb errors, 429 rate limits or missing .info keys. Yahoo's endpoints are unofficial and change without notice.
Read the full answer
Short answer: To get positions with the Interactive Brokers API in Python, call reqPositions(), collect each position() callback into a list, wait for positionEnd(), then build one pandas DataFrame. Use reqAccountSummary for NAV.
Read the full answer
Short answer: Look-ahead bias means the backtest used information that was not available at decision time, such as the current bar's close, unshifted indicators, or retroactively adjusted data. Fix it by lagging signals, testing with shifted data and walk-forward splits, and building code that only sees past data.
Read the full answer