Please help me!... I need to make my EA not trade if the price touches the High and Low of the previous day's session.
-
Please, I need help!... I've tried everything and can't get it to work properly. This is a high-low breakout EA captured from a past session. It's a completely mechanical strategy.
In the first time frame, my EA captures the high and low. In the second time frame, the EA checks if the market touches the previous high or low. If the market touches the previous high or low, the EA should display a message on the screen and not trade that day. It should start trading the next day.
I need to make my EA not trade if the price touches the high and low of the previous session, and if the price doesn't touch the previous high or low, I need to make it trade that day.
Friends: @fxDreema, @l-andorrà, @jstap, @OntradingX, @roarIf you can help me make the necessary changes to my project thread so I can resolve this, I would be very grateful.
This is the link to my project:
https://fxdreema.com/shared/IaO8QWloe
Image:

-
Any charitable souls out there?
-
But what if today's proce levels are not touching yesterday's high/low for the first hours and then later on the session any of those is hit? I don't fully understand the logic. Can the bot trade today if yesterday's high/low are not hit but lates trades are closed if those are hit? What is the exact point of that?
-
@l-andorrà
Thank you, my friend, for your attention to my call for help with this project. Below I share with you the detailed explanation of this strategy that I created with the help of AI.Parameters and Configuration of the Intraday Breakout Strategy for Previous Session Highs and Lows
This is a mechanical trading system based on the breakout of the previous day's highs and lows. It is executed on the GBP/JPY currency pair and follows strict rules for order placement, risk management, and result optimization.Parameters and Configuration
- Asset and Execution Time
Trading Pair: GBP/JPY
Reference Timeframe: Daily
Reference Time Zone: UTC+1 - Identification of Key Levels
The previous day's high and low are identified within the period between 9:00 and 11:00 (UTC+1).
These levels define the points where buy and sell orders will be placed. - Trading Conditions
The market is monitored until 23:00 (UTC+1) for evaluation.
If, between 23:00 and 00:00 (UTC+1), the price has not broken the previous day's high or low, pending orders are placed:
Buy Stop Order at the previous day's high.
Sell Stop Order at the previous day's low.
Cancellation Rule: If the price breaks the high or low before 23:00 (UTC+1), no trades are executed for that day.
Risk Management and Profit Targets - Order Management
Risk per trade: 2% of capital is risked per trade.
Stop Loss (SL): 20 pips from the entry point.
Take Profit (TP): 40 pips from the entry point.
Risk/Reward Ratio: 1:2 (for every 1% risked, the target is to gain 2%).
Exclusion Rule: If a trade from the previous day is still open, no new orders will be placed until the previous trade is closed.
Optimization and Improvements
Backtesting and optimizations were conducted to enhance the profitability of the strategy. Three key adjustments were identified to improve its performance:
Pending Order Exposure Time
If a pending order remains untriggered for more than 10 hours (600 minutes), it is recommended to cancel it. - Asset and Execution Time
-
You need a condition block cheking where price is at 00:00. If it is below yesterday's high, program a pending. If it is above. Don't trade today. Same for yesterday's low.
-
@l-andorrà
Note that in the thread of my post I have already tried to do it as you tell me but I have not been able to get it to work, for this reason I am asking for help to solve it in the thread that I shared. -
You are using the GMT time option. I don't recommend it. Whenever possible, use Server time. Additionally, you can store the values of both yesterday's high and low on variables on the 'on timer' tab instead. Then you can check what price is doin later on the on tick tab.