Forum

[MQL5] Getting history deals closed in profit

Hello, I'm trying to get the deals closed in profit within the previous 12 hours. if ( HistorySelect ( TimeCurrent ()-( 12 * 60 * 60 ), TimeCurrent ())) { Print ("Found ", HistoryDealsTotal ()," deals."); for ( int i = HistoryDealsTotal () - 1 ; i >= 0 ; i--) { ulong tk =

Using BadHoursOfDay to filter trades

Hello everyone, I've generated a strategy using the EA Wizard, and also included the intraday time filter module. I've converted my bit mask for my preferred trading hours (101000000001111110001101=10493837), but the advisor completely ignored the value and still trades all hours. Even if the