Job finished
Specification
I need an EA which looks for trades targeting the sessions open time.
The conditions for trade:
This would need input parameters:
[TradeSessionStart] (time)
[TradeEndTime] (time)
[SessionOpenTime] (time)
[FractalCandles] - If this is set to 1, then the Fractal High/Low would be the high/low of 1 candle both sides.
At [TradeSessionStart] I would want to open a trade targeting the [SessionOpenTime] whether its buy or sell.
For trade execution I would want to wait for a fractal candle, so If I am looking to go long to reach the target, i would be waiting for a Fractal Low, and executing the long after the close of the candle confirming the Fractal Low. For a target which requires shorting, I want to wait for a Fractal high and enter on the close of the candle confirming the fractal high.
The stop loss for a sell should be 10 points (1 pip) + spread above the Fractal High. The stop loss for a buy should be 10 points (1 pip) below the Fractal Low.
The [SessionOpenTime] should work even if this time looks like it is set to the previous day i.e. If it is set at 23:00 and the [TradeSessionStart] is set to 05:00, it should look for the 23:00 candle open time at 05:00.
There should also be a [Trades] parameter indicating the number of times I want to look for a trade, this should only run after failure i.e. if the first position hits the Stop Loss, I would look for one more Fractal High/Low to enter if this is set to 2. If it hits the TP on the first trade it should stop looking for trades until the following day.
There should be no trades executed after [TradeEndTime] and if there are trades open, these should be moved to 10 points (1 pip) above Breakeven at this time.
Additional inputs:
[2nd Order] - Yes/No
This is to open 2 positions. Risk would be spread between both open positions.
[2nd Order Target] - Options for setting the Target at a % of the target for that day (i.e 50% of target or 200% of target) or Trailing at Fractal Low/High.
[Risk] - % of Equity to Risk for the open trades.
Trades should only be executed if there is at least a 1:1 Reward to Risk for the trade. The distance from the signal to the target should be greater than the distance from the signal to the stop loss.
Please find an example of a trade below:
[SessionOpenTime] set at 23:00 (leftmost vertical line). This would be the target for the trade the next day. This is the open of the 23:00 candle (green line)
[TradeSessionStart] set at 09:00 (right vertical line). Looking for trades after this time. Signal found on the first 5 minute candle after the fractal is printed, targeting the green line setting SL above the Fractal High.