Time Interval Range BreakOut
- Asesores Expertos
- Mr Sandor Bertalan
- Versión: 1.1
- Activaciones: 5
This strategy based on the theory that a range breakout may occur after a set period of time has expired. The range time can be set by the user, also the order set time is parameter. After the range has been built, by a set time a Buy and a Sell order will be placed respectively at range High and rang Low prices.
The user has control to set lot size, initial stop loss and take profit.
This expert advisor does not use martingale algorithm.
In this expert advisor the average daily range (ADR) is utilised to set stoploss, take profit and trailing stoploss.
Please do your own testing and find your own settings before running it on a live account.
The EA has been tested on XAUUSD from 2024.01.01 to 2024.05.15 on M30 timeframe. Please see the attached screenshots.
Settings
Lot settings Group
Trading Volume Mode.
The user can choose between fixed volume or volume correspond risking the set percentage of the free margin.
- VOLUME_FIXED: fixed
- VOLUME_PERCENT: Risk Percentage of Free Margin
Lots Size: fixed lot size
Risk Percentage of Free Margin: the percentage in % of the free margin.
MarginPercentage of the Margincall Level for open Position: Maximum allowed margin for trade
LookbackDays ADR calculation: define the lookback days for Average Daily Range calculation
FreezeLeveled Stoporders opened as MarketOrder: If ask – bid price is to close to the order entry price, the Expert advisor allowed to place market order instead of pending order
Range Time Settings Group
The following four parameter determines the range box start and end times:
Range Start Hour: range box start time – hour
Range Start Minute: range box start time – minute
Range End Hour: range box end time – hour
Range End Minute: range box end time – minute
The following two parameter determines the time when the pending orders will be placed (at range box high and low prices)
Place Order Hour 0 = Inactive =>> Range End Time: order place time – hour ( if set to 0, pending orders will be placed right after the range box has been completed)
Place Order Minute: Range End Time: order place time – hour
Delete Orders Hour: Deletes pending orders - hour
Delete Orders Minute: Deletes pending orders – minute
Close Positions Mode: User can set how positions will be close (apart from stoploss), there are three options:
- Close Position at given time
- Close Position Disabled
- Close Position at time only if in Profit
Close Positions Hour: Close active positions – hour (if it selected in close position mode)
Close Positions Minute: Close active positions – minute
Initial StopLoss and TakeProfit Settings Group
Initial StopLoss Mode
- not Set: means no initial stoploss will be set
- Factor of Range: initial stoploss set to a factor of the difference between rangebox High and low, for example 0.1 => entry price - stoploss distance is 10% of (rangebox High - Low)
- Factor of Adr: initial Stoploss set to a factor of the ADR (average daily range), for example 0.1 => entry price - stoploss distance is 10% of the Average Daily range
Maximum Allowed SL Points (0 = No Limit): Set the maximum allowed stoploss distance
Initial TakeProfit Mode
- not Set: means no initial takeprofit will be set
- Factor of Range: initial takeprofit set to a factor of the difference between rangebox High and low, for example 0.1 => entry price - takeprofit distance is 10% of (rangebox High - Low)
- Factor of Adr: initial takeprofit set to a factor of the ADR (average daily range), for example 0.1 => entry price - stoploss distance is 10% of the Average Daily range
ADR Trailing StopLoss Settings (evaluated by every tick) Group
Adr Tsl Enable: ADR Trailing Stoploss mode enabled / disabled.
Start trailing Adr factor: Start trailing after ADR factor in profit(for example 0.2 means 20% ADR starts trailing)
Follow profit by Adr factor: follow profit by % ADR percent (for example 0.05 means it will follow Profit - 5% ADR)
Minimum Adr factor step 0 = disabled: minimum step size in ADR percent (0.01 means %1 percent of ADR)
Break Even Settings (evaluated by every tick) Group
Break even can run only once in a lifetime of a position
BE Stop Trigger Points (0 = Inactive): Points distance from the open price.
BE Stop Puffer Point: points distance from BE Trigger.
Miscellaneous Settings Group
Position Magic: Position magic number
Position Comment: Comment for orders and positions
Opposite Direction Order when Market order Deal: if true selected, the expert advisor will close the opposite direction order once a position deal executed.