create the exact interactive brokers app : START → INITIAL SETUP The process begins with…
- User
create the exact interactive brokers app : START → INITIAL SETUP The process begins with a daily CSV entry sheet that requires manual input of:
Ticker symbol (Stock or Futures with options) Position type (Long or Short) Initial stop loss for calculating shares Full or partial take profit exit criteria Manual adjustment stop loss constants for all trades Risk amount ($) for position size calculation Percentage (%) for entry price range Other parameters (detailed on next page) TICKER API CALCULATIONS For each ticker symbol, the API performs calculations including:
Price range for entry Mid orders based on previous day's High/Low (varies depending on Short/Long position) Share quantity calculations based on Risk and Initial stop loss ORDER CREATION AND MONITORING LOOP
API creates conditional orders in Interactive Brokers (IB) System checks if order was filled in IB If NO: Returns to API to adjust/delete conditional orders based on entry sheet (daily update) If YES: Proceeds to profit management PROFIT MANAGEMENT BRANCH The system branches based on Full or Partial Take Profit Exit:
FULL TAKE PROFIT EXIT PATH:
API creates take-profit and stop-loss orders based on fill price Uses initial stop loss from entry sheet Stop losses can be manually adjusted during trade progress Monitors for either Stop-Loss or Take-Profit trigger in IB PARTIAL TAKE PROFIT EXIT PATH:
API creates take-profit for partial position Based on fill price and formula using initial stop loss Maintains stop loss for full position Stop loss can be manually adjusted during trade Monitors for Stop-Loss or Take-Profit trigger in IB FINAL STAGES If Take-Profit triggers:
API creates trailing stop for remaining half position Based on manual adjustment of stop loss If Stop-Loss triggers:
Proceeds to final recording TRADE RECORDING API creates comprehensive record including:
Entry price Exit price(s) Number of shares Entry/exit dates Profit/Loss Commissions The process then ends (END)
EXAMPLE – Trade Long, flip logic for Short
Default settings that are applied to all trades, but can be manually adjusted for a given trade
• Risk 2,000 [1] • % to calculate price range for entry 1: 2% [2] • % to calculate price range for entry 2: 25% [3] • Stop loss hours: Regular Trading Hours (RTH) • Take Profit hours: Extended Trading Hours (e.g. outside RTH) • Entry type hours: RTH • Entry Time in Force: Good for day (Day)
- Assistant