Lean icon indicating copy to clipboard operation
Lean copied to clipboard

New Oanda Market Breaks

Open adamvvu opened this issue 3 years ago • 0 comments

Expected Behavior

As of November 29, 2021, Oanda's market hours for FX and metals have a 5-minute break at "market close" between 4:58 - 5:03 PM EST where new orders are rejected. For NZD-based pairs, there is an additional break at 12:58 - 1:03 PM.

Thus new market hours should be:

(pre Nov 29, 2021) Sunday - Friday (17:00 - 17:00 EST)

(post Nov 29, 2021) Sunday - Friday (17:03 - 16:58 EST) for all FX/metals with daily 5-minute breaks on Monday-Thursday, and additional break for NZD pairs.

Actual Behavior

Current modeled market hours are Sunday - Friday (17:00 - 17:00 EST), though "market close" on weekdays is set at midnight.

Potential Solution

Maybe separate entries for Oanda pre- and post- Nov 29, 2021 in market-hours-database.json, and dynamically change the referenced exchange hours during backtests by adding a check using algorithm timestamp?

Reproducing the Problem

Market breaks currently not modeled in backtests, but are caught in live trading.

adamvvu avatar May 25 '22 21:05 adamvvu