DislikedHey Steve,
Don't give up, use this.
Note: The only history trades 'seen' by the EA code are those which you currently see on the history tab after the date filters are applied.
If you have a tendency to fanny about with the dates of trades shown in history and rather foolishly leave them set to filter out all trades, this check will always allow return true.
Regards, Paul.
[code]
bool TimeElapsedIsOk()
{
datetime last.trade.time = 0;
double profit = 0;
for ( int i = 0; i < OrdersHistoryTotal(); i++ )
{
if ( ! OrderSelect(i,...Ignored
The code would not work if the closed trade has not shown up in the History tab, so I added a bit to start() to force a waiting period until it does.
Latest update in post 1 guys. Read 'Basket trading' for details.