Testing

πŸ€– RussBot is a free, open-source binary options trading bot for PocketOption, built on BinaryOptionsToolsV2 β†’ Get it on GitLab
πŸ’¬ Need help? Join the Chipa Discord Β· ⚑ Go no-code with ChipaEditor

RussBot ships with three test scripts. Run them before trading real money β€” they verify the indicator math, your API connection, and historical data loading independently of the trading loop.

test_indicators.py β€” Indicator Math

python test_indicators.py

Tests the EMA, CCI, and MACD calculations against sample data. It works without BinaryOptionsToolsV2 installed β€” if the library is missing it degrades to pure indicator testing:

⚠️ BinaryOptionsToolsV2 not available - testing indicators only

Use this to:

  • Confirm the indicator implementations produce sane values after you modify them
  • Sanity-check custom periods before putting them in config.json
  • Debug NaN issues in indicator output

test_history.py β€” Historical Data Loading

python test_history.py

Requires your SSID. Verifies the full data pipeline the bot depends on at startup:

  1. Connects to PocketOption and prints your balance
  2. Fetches historical candles for EURUSD_otc across multiple periods (30 min, 1 h, 2 h)
  3. Shows the raw candle structure so you can confirm the API format matches what the bot expects
πŸ§ͺ Testing historical data loading for EURUSD_otc
βœ… API connection established
πŸ’° Account balance: 10000.0
πŸ“ˆ Loading historical candles...

Run this whenever:

  • You’re setting up on a new machine or network
  • The bot reports ⚠️ No historical data received
  • You suspect your SSID has expired

test_simple_history.py β€” Minimal History Check

python test_simple_history.py

A stripped-down version of the history test β€” one API call, minimal output. Fastest way to answer β€œis my SSID valid and can I fetch candles?”

debug_indicators.py β€” Live Debugging

python debug_indicators.py

Combines a live connection with verbose indicator output, useful when the bot connects fine but signals look wrong.

Before any live session:

  1. βœ… python test_indicators.py β€” indicator math is sound
  2. βœ… python test_simple_history.py β€” SSID valid, candles flowing
  3. βœ… python payout_checker.py β€” enough assets above your payout threshold (details)
  4. βœ… Run the bot on a demo account SSID and watch a few signals fire
  5. βœ… Only then switch to a real-account SSID with a small amount

Paper Trading

Want to evaluate the strategy without any execution risk? Comment out the two await self.api.buy(...) / await self.api.sell(...) calls in the bot and replace them with prints. The full analysis pipeline still runs, and the logs (logs.log) give you a record of every signal to evaluate after 24–48 hours.

πŸ’¬ A test failing and you can’t tell why? Post the output in the Chipa Discord β€” someone has almost certainly hit it before. Or skip the plumbing entirely and go no-code with ChipaEditor.