how to use datetime and OrderProfit to limit trades per day?

 

Hi,

I've been reading the MQL4 book and searching the forum but unfortunately, I haven't found what I'm looking for. I am pretty new to programming so I appreciate any help you can offer. :)

I'm trying to write an EA that will have two parameters before trading.

The first parameter is to define a day as 9am GMT to 9am GMT. This way I can define the day starting at London's open.

The second parameter is to check if profit for the day is greater than a set number of pips...example 20 pips.

The idea is to allow the EA to trade starting at 9am GMT and keep trading until >=20 pips is reached. Then the profit is reset to 0 for the next day.

Thanks in advance for any help.

Reason: