Line 142: 'i' was declared inside for loop, not accessible outside.
Fixed by declaring 'i' before the loop:
int i=0;
for(i=0; i<logTicketsCounter; i++)
Major changes for MT5 compatibility:
- Replaced MT4 OrderSelect() with MT5 PositionGet/HistorySelect
- Replaced MarketInfo() with SymbolInfoDouble/Integer
- Replaced Bid/Ask/Digits/Point globals with function calls
- Updated trade functions to use CTrade class
- Changed ticket types from int to ulong
- Replaced WindowExpertName() with MQLInfoString()
- Replaced IsOptimization() with MQLInfoInteger()
- Updated copyright to Garfield Heron / fetcherpay.com
Note: Full grid logic needs comprehensive testing