when i set the ea to start from the next day and entered value as 02:00 as start time, it places trade immediately, however i want it to open trade the next day so i think a date input should also be present so that this confusion can be overcome.
if you start the EA when the current time is in the middle of the time period already, I can simply make the EA to wait until next time. There is no need to add complexity to the inputs just to do this small thing.
Also at "End Time" only present trade is closed, what I want, at end time, present cycle should be finished. For example if end time is 17:00 and at that time a trade of 0.04 lot size is running then it should not stop until a TP is hit. So i want ea to complete that trade cycle and not only that trade.
Here is where it doesn't make sense to me. For a couple reasons. Here is what you said by PM:
The ea should start at a particular time, means there should be an input for time (date, hours, minutes) , at which ea will initialize and start working, rest functionality remains the same. and then when I asked about an end time, you said this:
The current option in ea to close when it hits certain number of profits should also be bypassed if end time is remaining. let's suppose ea start at day start i.e. 05:00 am and I have set the end time at 15:00 am( time shown by the metatrader 4) then at 15:00 it will complete its current cycle and will not enter new cycle regardless of number of take profits it had hit.So the EA was made to agree with those 2 statements. So let's say you have have the '# TP Trades Before Stopping' set to 2. Let's say by 14:59 one TP was hit. So another trade is made since it's still before the end time. The next trade hits SL past the end time. So regardless of number of TPs hit, the EA stops trading. This is what you said and is how the EA works now. It also agrees with your original statement that the rest of the functionality remains the same. So the current version seems to agree 2x with what you said.
Now you said this:
Also at "End Time" only present trade is closed, what I want, at end time, present cycle should be finished. For example if end time is 17:00 and at that time a trade of 0.04 lot size is running then it should not stop until a TP is hit. So i want ea to complete that trade cycle and not only that trade.I just want to note that this way doesn't disregard number of TPs hit. So it disagrees in my opinion.
Okay, so let's talk about this some more though. I understand now how you define a "cycle". In my mind, when you mentioned cycle before it meant either the TP requirement was met or SL requirement was met. You think of a cycle as a single TP being hit, even if you set the input to 2 TPs or more. So just to be clear, your intended modification will mean a trade must hit TP after the end timer or else the cycle is not complete. In this case,
the timer will almost certainly always be disregarded. Let's say the timer is set 05:00 to 15:00. At 15:00, there was no TP's hit yet. So in your mind, the cycle is still open. So at 15:01 (past the end time), a trade must be opened and the timer disobeyed. That trade closes by SL too at 17:00. Another trade then opens (again past the end time) since the cycle is still open. That trade hits SL at 20:00. And so on. This will continue until a TP is hit (assuming max SLs not reached), which may never happen at all or will happen well past the end time at least.
The EA will totally disregard the end time like this every time. I can make it like that, but just as long as you know the end time will not be obeyed.