JustPaste.it

Breaker Bot V2

Short Description:

  • This EA mostly uses stop orders (and limit orders sometimes)
  • This EA identifies the current daily and weekly candles, then sets stop orders past the high and low
  • This EA uses the 5 minute close at specific price levels to determine and confirm entry into a position
    • These price levels are referred to as “percentages” or “extensions” of the daily and weekly range.
    • Example to understand what I mean: “SL must be at 50% negative extension of the daily range. TP must be the 27% positive extension of the daily range. Entry must be at the 1.3333% positive extension of the daily range.”
      • Translation: If the daily candle range (for example, at 8AM EST) is 100 pips, buy stop should have its entry 1.3333 pips above the daily high. TP should be 27 pips above the daily high. SL should be 50 pips below the daily high.
      • The corresponding RR for the trade would be .5:1

Conditions for Entry:

    1. This EA executes orders at specific moments during the day. We will refer to these moments as RET, or “Range Evaluation Time.”
      • Please implement functionality for two (2) RETs; for example at 8AM EST and 6PM EST.
      • At these times, the EA should (1) evaluate (or re-evaluate) the CURRENT daily and weekly range, (2) close any untriggered/pending stop orders from the previous RET, and (3) set new stop orders based on the current range.
        • Example: at 8AM EST, buy stops and sell stop orders should be set. If any stop orders set at the 8am RET are still pending, at the next RET (6pm) they should be automatically closed, and new stop orders should be created.
        • At 6PM EST, the stop orders are set based on the previous daily candle range, since the new daily candle is opening at that time. At 8AM EST the following day, any untriggered stop orders created at 6PM must be closed in favor of the stop orders that will be implemented at 8AM EST.
        • Note: These times are also examples, this should be easily customizable in the inputs tab. Please do not hard-code these times.

Trade Management:

    1. ENTRIES: Entry for all positions must be at the 1.3333% extension of the daily and weekly range (both above and below), respectively.
      • This number should not be hard-coded, but instead should be a parameter that I can change in the inputs.
    2. STOP LOSSES: This EA should be able to set and dynamically adjust stop losses of pending and active trades. There will be two (2) different stop losses that the EA must set. Before and after a trade gets filled, it will have “SL Secondary.” If the 5 minute candle that triggered the position closes at or past the entry, the stop loss should be set to “SL Primary.”
      • When a 5 minute candle triggers our position and closes past our position entry, that is considered a STRONG close.
      • SL Secondary: This will be the stop loss BEFORE a strong 5 minute candle close PAST our entry is confirmed.
      • SL Primary: This will be the stop loss AFTER a strong 5 minute candle close PAST our entry is confirmed.
        • Since SL Primary is also what will be used to determine trade volume (lot size). For example, if risking 1% of account balance per trade (risk per trade should be a custom parameter in the inputs tab), the range between trade entry and SL Primary should be used to determine lot size.
      • This feature helps manage risk in the case of a false break (a break without a strong close past the high/low)
    3. TAKE PROFITS: This EA should have a partial profit system in the inputs tabs. There should be 3 settings; TP1, TP2, and TP3.
      • Assuming a buy stop above the daily high:
      • TP1 = close 75% of the position at 27% daily range extension, AND move SL to 25% of daily range extension
      • TP2 = close 60% of remaining position (or 15% of original position) at 50% daily range extension and move SL to 0% of daily range extension (0% extension would be the daily high)
      • TP3 = close 100% of remaining position at 75% daily range extension and move SL to 0% of daily range extension (0% extension would be the daily high)
      • These numbers are all examples, they should not be hard-coded, I want to be able to change them in the inputs tab. I should be able to define 3 different TakeProfit levels as a percentage (%) number, where the EA can take partial profits AND adjust the stop loss.
    4. IMPORTANT NOTE 1: In the case that a 5 minute candle triggers our trade, but then retraces slightly and closes between our entry and stop loss (SL Secondary), but is not stopped out, trade must be CLOSED. Another identical stop order (same entry, with SL Secondary) must be set at the open of the next 5 minute candle.
      • The EA should continue to (or attempt to) capitalize on the break of the daily/weekly high or low in this fashion. However, this must only occur a LIMITED number of times, or until the next RET. 
      • This number of “allowable failed attempts” before the next RET, for a particular side of the trade (buy or sell) should be a parameter in the inputs tab.
    5. IMPORTANT NOTE 2: In the case that a 5 minute candle triggers a stop order, then retraces to SL Secondary (thereby closing our position in a small loss), but then closes strong past our entry (the 1.3333% extension), this EA should set a LIMIT ORDER with our entry and SL Primary.
      • This is because a strong close has been confirmed, and we now feel comfortable entering a position with our full risk. The hope is that the new candle will retrace and fill our limit order, before continuing in the direction of the breakout.
      • If price reaches TP1, but has NOT filled our limit order, the limit order should be CLOSED and no further trades should be attempted on that side (either buyside or sellside) until the next RET.
    6. IMPORTANT NOTE 3: If a filled stop order successfully switches to SL Primary after a strong 5 minute candle close, but ultimately gets STOPPED OUT before reaching TP1, the EA must not set any more stop orders for that side (either buyside or sellside) until the next RET.

Additional features:

    1. WHEN A STOP ORDER IS MANUALLY CLOSED (BY ME), BREAKER BOT SHOULD NOT ATTEMPT TO RE-OPEN THAT TRADE UNTIL NEXT RET
    2. If EA has a winning trade (minimum TP1 secured), no more trades on that side (either buyside or sellside) until next evaluation time. 
      • Pending stop orders on the opposite side (buyside or sellside) should be kept until they either get filled or until the next RET arrives.
    3. Please implement a "clear all" button ON THE CHART to close all untriggered/pending stop orders
      • Useful in case of big news release
    4. Please implement a button On THE CHART to place all stop orders (based on what the ranges were at the most recent RET)
      • Useful for after big news release is passed
    5. Please include order comments for each position:
      • Include if it was (1) Weekly/Daily range trade, and (2) the maximum TP that was hit (either TP1, TP2, TP3, or no TP).

Changeable (Input) Parameters:

  • Time Filters: 
    • RET 1: (hh:mm:ss)
      • [true/false] Close all previous pending orders at this RET?
      • [true/false] Close all previous active orders at this RET?
    • RET 2: (hh:mm:ss)
      • [true/false] Close all previous pending orders at this RET?
      • [true/false] Close all previous active orders at this RET?
  • Day of the Week:
    • [true/false] Monday
    • [true/false] Tuesday
    • [true/false] Wednesday
    • [true/false] Thursday
    • [true/false] Friday
    • [true/false] Sunday
  • Money Management:
    • [%] Lot Type: % of balance to risk per trade
  • Daily/Weekly Range Trades:
    • [true/false] Daily
    • [true/false] Weekly
  • Position Management:
    • [%] Entry: % positive extension past high and low
    • [%] SL Primary: % negative extension
    • [%] SL Secondary: % negative extension
    • [%] TP1: % positive extension
      • [%] Amount of Position to Close
      • [%] New Stop Loss Positive/Negative Extension
    • [%] TP2: % positive extension
      • [%] Amount of Position to Close
      • [%] New Stop Loss Positive/Negative Extension
    • [%] TP3: % positive extension
      • [%] Amount of Position to Close
      • [%] New Stop Loss Positive/Negative Extension