Session Open Carry
- Uzmanlar
- Sürüm: 1.0
- Etkinleştirmeler: 20
Session Open Carry is built on one idea: the side on which a session opened shows which way to hold a position until the next day. Once a day, at a set minute, the EA compares the last price with the open of the session. Price above the open - it buys. Price below the open - it sells. Price at the open - it stays out. The stop is placed at the extreme of the session, the position is carried overnight and it is closed at a set minute on a later day. The EA tests this idea on every session and does not claim that it holds in every market.
The Idea
The session is one day on the EA's own clock. Its open is the open of the first minute bar of the day, and its high and low are updated from minute bars as the day goes on. The EA makes at most one entry per day and holds at most one position. It never adds to a position and never doubles a lot. Saturday and Sunday are skipped.
The stop is the low of the session for a long position and the high of the session for a short one. On the next day it moves to the extreme of the new session as that session develops. A position whose stop level is touched is closed at the market.
Three Modes
- Hold: entry, session stop, exit at the set minute on a later day. This is the default mode and the mode the figures below were made in.
- Take: Hold plus a partial take-profit. Half of the position is closed when price moves a set number of points in its favour. At the exit minute the position is closed only if its result is negative or lower than it was at the last evening snapshot; otherwise it is carried on.
- Take and Trail: Take plus a trailing level. The level starts at a set percentage below the entry price for a long position (above it for a short one). After the price has moved a set percentage in favour of the position, the level follows the most favourable price reached so far at a set distance in percent. Reaching the level closes half of the position.
A partial close needs a position of at least two lot steps. With one lot the two partial modes change only the exit rule.
Session Clock
The entry, the exit check and the evening snapshot are set as minutes after midnight on the EA clock: 820 (13:40), 1370 (22:50) and 1425 (23:45) by default. The clock is the server time moved by InpClockShiftMin, so a broker whose day does not start at the session open can still be matched. A position opened on one day is never closed on the same day: the exit check works from the next day on.
Managing A Position
The stop reaches the broker with the order and follows the session extreme afterwards. If the stop cannot be sent because it is too close to the price, the EA places it at the nearest allowed distance and closes the position at the market when price has already passed the level.
- an entry declined for a temporary reason (requote, price change, timeout, lost connection) is repeated once a second for up to 30 seconds;
- an exit that was declined is repeated until the position is closed;
- the EA restores its state after a restart from the open position and from its own records.
Risk Controls
- The lot is the minimum lot of the symbol by default. A fixed lot or a lot by capital can be set; the lot ceiling is 20 by default.
- Before each entry the EA checks the free margin and reduces the lot to the part of it that fits. If not even the minimum lot fits, it does not trade that day.
- A loss limit per lot for one day and a drawdown limit per lot from the peak are available. Both are off by default.
- Before each request the EA checks the trade mode of the symbol, the trading session, the stop and freeze levels and the volume limits, and does not send a request the broker would reject.
- No grid, no martingale, no averaging.
Strategy Tester Figures
Read the figures with one fact in mind: in each period two single trades make up almost the whole net result, and with so few trades the result cannot be told apart from chance. The amounts are given below, in the section on what the figures do not show.
The figures come from the Strategy Tester on the Si futures, 100% real ticks, one lot, starting deposit 100000 RUB, leverage 1:100, mode Hold, every input at the value it ships with. The entry and exit minutes were not searched for on these periods: they were fixed before the periods began. Each period is run three times: with no delay, and with the tester delaying the EA's actions by 300 ms and by 1000 ms. Commission was set to zero in these runs and the slippage of market entries is not modelled, so both costs are left out of every figure below. All amounts are in RUB.
Si-9.26, 2026.07.13 - 2026.09.17, 42 trades, 52.38% of them positive:
- no delay: net result 2790.00, ratio of gross positive to gross negative 1.37, largest balance drawdown 1426.00 (1.40%), largest equity drawdown 2013.00 (1.96%)
- 300 ms: net result 2739.00, ratio 1.36, balance drawdown 1436.00 (1.41%), equity drawdown 2030.00 (1.97%)
- 1000 ms: net result 2693.00, ratio 1.35, balance drawdown 1439.00 (1.41%), equity drawdown 2049.00 (1.99%)
Si-12.26, 2026.09.18 - 2026.10.10, 14 trades, 57.14% of them positive:
- no delay: net result 2877.00, ratio of gross positive to gross negative 2.60, largest balance drawdown 866.00 (0.84%), largest equity drawdown 1038.00 (1.01%)
- 300 ms: net result 2860.00, ratio 2.59, balance drawdown 870.00 (0.84%), equity drawdown 1042.00 (1.01%)
- 1000 ms: net result 2851.00, ratio 2.58, balance drawdown 867.00 (0.84%), equity drawdown 1039.00 (1.01%)
What The Figures Do Not Show
Both periods are short: 42 trades in about ten weeks and 14 trades in about three weeks. They are not a test of the idea over several market regimes, and the second period is too short for its ratio of 2.60 to say anything about the next one.
In each period two single trades, the two with the largest result, make up almost the whole net result. Without them the first period ends at 91.00 with no delay and at -6.00 with the 1000 ms delay, and the second period at 170.00 and 149.00. With so few trades the result cannot be told apart from chance.
The delay in the tester postpones the actions of the EA, such as an exit or a stop move. It does not add slippage to a market entry, and on a live account an entry at the market often fills away from the price at the moment of the signal. There has been no run of this EA on a live or demo account, so the slippage of the entries is not measured and the figures above leave that cost out.
The tester ran on custom symbols built from recorded real ticks of the Si futures, loaded by the author. Your broker's own history, spread, commission and clearing breaks will give different figures. The runs use the minimum lot. A larger lot changes the result and the drawdown in proportion, and the margin of your broker limits the lot you can use.
What It Needs
A futures symbol with regular trading sessions on a netting account. The EA is built for netting: on a hedging account it manages only the first position it finds for its symbol and magic number. The EA was measured on the Si futures of the Moscow Exchange and has no logic that is specific to one symbol, but only Si was measured. It reads minute bars, so the chart timeframe does not matter, and it needs minute history for the current day: the EA rebuilds the session from minute bars when it starts. Keep the terminal connected during the session; after a disconnect the EA continues from the open position.
Settings
Trading: the mode, the magic number, the clock shift, the weekend switch and the allowed slippage in points. Session clock: the entry minute, the exit check minute and the evening snapshot minute. Take and trail: the take distance in points, the share of the position that is closed, and the three percentages of the trailing level. Position size: a fixed lot or a lot by capital, and the lot ceiling. Risk limits: the day loss limit, the drawdown limit and the retry window for a declined entry.
Questions
If something does not work as described, send a private message on mql5.com. Please include your broker, the symbol, the server time shown in the terminal and the settings you use.
