Develop VBA Excel DDE Trading Bot with API to TWS InteractiveBrokers

Job ID: 34106243

Budget: $250 – $750 AUD

I need a VBA Excel DDE Trading Bot with API to TWS InteractiveBrokers.
Refer to: https://interactivebrokers.github.io/tws-api/excel_apis.html
(Note I need "Full API functionality")

This bot trades on Earnings. The instructions to be manually entered / input into the bot each week will be the Ticker, Earnings Date, Option Expiration Date, Entry Date (period), Option Type: Straddle / Strangle, Quantity, Entry RV, Stop Loss & Profit Taker %.
RV = Relative Value. This is the calculation of the ATM (At The Money) Strike Option Price for the Straddle or Strangle as a percentage of the Stock price.
Entry Date = e.g. 3 days before Earnings Date up to 1 day before Earnings Date.

Bot functionality - During the Entry Date (period of time), the bot needs to take the Ticker and every second find the nearest ATM option price at the Options Expiry Date for the straddle and strangle. It then needs to calculate the RV as a percentage of the current stock price. If the current RV is at or lower than the Entry RV, then enter a limit order for the quantity (as a combo) specified at the RV Entry option price via InteractiveBrokers TWS API. Once entered, it should not try and enter again.

Once confirmed as executed, the bot should every second look to exit the trade at a Stop Loss % order and multiple stepped Profit Taker %s (e.g. sell 20% at 5% profit, sell 50% at 10% profit, sell 20% at 15% profit, sell 10% at 20% profit). Furthermore, 2 hours before Earnings Date (i.e. 2hrs before previous day's market close), 'market order sell' any residual open positions.

It should be able to do this for multiple Tickers.

Example:
We would manually input the below:
Ticker = C (Citigroup Inc.)
Earnings Date = 14 July 2022
Option Expiration Date = 15 July 2022
Entry Date = 3 days to 1 day (i.e. 12 July to 14 July)
Option Type = Straddle
Quantity = 10
Entry RV = 4.1%
Stop Loss = 4%
Profit Taker = sell 20% at 5% profit, sell 50% at 10% profit, sell 20% at 15% profit, sell 10% at 20% profit

The Bot would do the following every second (when within the Entry Date range):
Pull (from IB TWS) Current Stock Price = $46.19
Determine Nearest strike = 46
Pull (from IB TWS) Current Option Price for the Straddle = $2.08
Calculate the RV = 4.5%
Evaluate if RV =/< Entry RV = No
Loop and try again.

Eventually the following may occur:
Pull (from IB TWS) Current Stock Price = $47.9
Determine Nearest strike = 48
Pull (from IB TWS) Current Option Price for the Straddle = $1.96
Calculate the RV = 4.1%
Evaluate if RV =/< Entry RV = Yes
Enter limit order of 10 Straddles (combo) for $1.96
Note: This would look like ($48 Call @ 15 July 2022 and $48 Put @ 15 July 2022) in a combo at the price of $1.96 x qty of 10.

Continue to scan for each condition, noting that each can only be executed once.
Stop Loss = $1.88 for qty remaining
Profit Taker =
$2.06 for qty 2
$2.16 for qty 5
$2.25 for qty 2
$2.35 for qty 1

Finally, 2hrs before market close the day before Earnings, close any residual qty positions.


Please provide a proposal - quote, timeframe etc to complete this, as well as your experience with VBA, IB TWS and development of trading bots.
Note: Minor tweaks and adjustments may be made during the development process to further refine the bot.

Thanks
Related categories: Visual Basic Excel Data Science API Trading