Strategy: Inside Bar Trading Description This strategy is based on identifying Inside Bars (IB) and uses defined rules for entry, stop-loss (SL), and take-profit (TP). It should be programmed to allow full flexibility, with all key parameters adjustable by the user. ________________________________________ Requirements 1. Configurable Parameters: All the following parameters must be available as configurable inputs in the EA to allow users to modify them: o Money Management / Position Size Calculation:  Option 1: Fixed lot size (adjustable).  Option 2: Dynamic money management as a percentage of the account balance (adjustable). o Trading Times: Start and end times for both sessions (e.g., 3:00 PM–4:00 PM and 4:00 PM–5:00 PM German time). It must be possible to enable/disable individual sessions. o Day Filter: Enable/disable each weekday via a checkbox; trading times must be individually adjustable for each day. o Risk-Reward Ratio (RRR): Default = 1, adjustable. o Maximum Stop-Loss: Default = 40 ticks, with the option to set other values. o Supertrend: Enable/disable via a checkbox; Default = 10/3, multi-timeframe-capable, with the option to set other values. o EMA: Enable/disable via a checkbox; Default = 50, multi-timeframe-capable, with the option to set other values. o Break-Even Switch: Enable/disable via a checkbox and configuration of the break-even setting (e.g., break-even at 50% of the initial risk). o Trailing Mechanism: Enable/disable via a checkbox and configuration of the trailing percentage (e.g., 50% of the initial risk). o Order Holding Duration: Configurable in minutes, with the option to set other values. Default = 120 minutes. o Instrument/Symbol: Must work universally with any instrument (crypto, forex, indices, etc.). 2. Trading Sessions o Two sessions per day:  Session 1: 3:00 PM–4:00 PM (German local time).  Session 2: 4:00 PM–5:00 PM (German local time). 3. Chart o Timeframe: 5-minute chart. o The strategy must work for all instruments. 4. Entry Rules o Identify an Inside Bar (IB). Definition:  High of IB ≤ High of the previous candle (Master Bar).  Low of IB ≥ Low of the previous candle (Master Bar). o Place a buy-stop order at the high of the IB. o Place a sell-stop order at the low of the IB. o Only the first IB of each session is traded. o If the EMA or Supertrend is enabled and the price is above EMA/Supertrend, only buy-stop orders at the IB's high are allowed. o If the EMA or Supertrend is enabled and the price is below EMA, only sell-stop orders at the IB's low are allowed. o If both indicators (EMA/ST) are enabled:  For buy-stop orders: The price must be above both indicators.  For sell-stop orders: The price must be below both indicators. 5. Stop-Loss o Stop-loss (SL) is set on the opposite side of the Master Bar:  For buy orders: SL = Low of the Master Bar.  For sell orders: SL = High of the Master Bar. o If SL exceeds the predefined maximum value (e.g., 40 ticks), it is reduced to this maximum (e.g., 35 ticks). 6. Take-Profit o Take-profit (TP) is based on the risk-reward ratio (RRR). Default = 1:1, adjustable. 7. Trailing Stop o Once the price reaches 70% of the TP target, the SL is adjusted:  New SL = Entry +/- (initial SL * trailing percentage). o The trailing percentage (e.g., 50%) must be adjustable. 8. Break-Even Switch o Once the price reaches 70% of the TP target, the SL is set to the entry price. o The break-even percentage (e.g., 50%) must be adjustable. 9. Order Management o Position size calculation based on dynamic money management as a percentage of account balance:  Risk amount per trade in € / Stop-loss in points. o If one order (buy-stop or sell-stop) is triggered, the other is canceled. o Does not apply if EMA and/or Supertrend are enabled. o Holding duration (e.g., 120 minutes) must be adjustable. 10. Special Cases o No trade is executed if:  The first candle of the session is an Inside Bar.  The Master Bar lies outside the trading session. ________________________________________ Programming Requirements 1. Input Parameters o Money management: Choose between fixed lot size or dynamic money management (adjustable). o Day filter: Selectable for Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. o Session times per day: Start and end times for both sessions with the option to enable/disable individual sessions (adjustable). o Order holding duration: Default = 120 minutes; Enable/disable (adjustable). o EMA: Default = 50; Multi-timeframe-capable; Enable/disable (adjustable). o Supertrend: Default = 10/3; Multi-timeframe-capable; Enable/disable (adjustable). o Risk-reward ratio (RRR): Default = 1:1 (adjustable). o Maximum stop-loss: Default = 40 ticks (adjustable). o Trailing percentage: Default = 50% of initial risk; Enable/disable (adjustable). o Break-even switch: Default = 50% of initial risk; Enable/disable (adjustable). o The EA must work universally, especially in terms of money management and varying decimal points (indices, forex, etc.). 2. Logic o Time Conversion:  Convert session times to UTC.  Ensure proper handling of daylight saving and standard time. o Inside Bar Detection:  A candle is an Inside Bar if:  High of current candle ≤ High of previous candle (Master Bar).  Low of current candle ≥ Low of previous candle (Master Bar). o Order Logic:  Verify if EMA and/or Supertrend is enabled.  Buy-stop order: At the high of the Inside Bar.  Sell-stop order: At the low of the Inside Bar.  SL: On the opposite side of the Master Bar (or maximum SL, if adjusted).  TP: Risk-reward ratio (e.g., 1:1). o Trailing-Stop Logic:  Once 50% of the TP target is reached, adjust SL:  New SL = Entry +/- (initial SL * trailing percentage). o Break-Even Switch:  Once 50% of the TP target is reached, set SL to break even = entry value. o Order Management:  Trade only the first Inside Bar of each session.  Cancel the opposite order once an entry order is triggered, unless EMA and/or Supertrend is enabled.  Respect the order holding duration. o Exceptions:  Do not trade if the first candle of the session is an Inside Bar. ________________________________________ Additional Requirements 1. Visualization o Highlight the Master Bar and the corresponding Inside Bar on the chart (color customizable). o Highlight individual sessions in different colors (customizable). 2. Error Handling o Prevent signals outside defined trading sessions. 3. Flexibility o Ensure all parameters can be modified via inputs and are activatable/deactivatable:  Money management.  Days.  Session times per day.  Order holding duration.  EMA.  Supertrend.  Risk-reward ratio (RRR).  Maximum SL.  Trailing percentage.  Break-even function.