Fix compile error in OrdersEA - variable scope issue

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++)
This commit is contained in:
2026-03-24 13:38:42 -04:00
parent 5c6c5e4741
commit 2e1c617e73
2 changed files with 3 additions and 2 deletions

View File

@@ -131,7 +131,8 @@ double CalcLots()
void AddTradeToLog(ulong ticket) void AddTradeToLog(ulong ticket)
{ {
bool rc= false; bool rc= false;
for(int i=0; i<logTicketsCounter; i++) int i=0;
for(i=0; i<logTicketsCounter; i++)
{ {
if(logTickets[i]==ticket) if(logTickets[i]==ticket)
{ {

View File

@@ -131,7 +131,7 @@ double CalcLots()
void AddTradeToLog(ulong ticket) void AddTradeToLog(ulong ticket)
{ {
bool rc= false; bool rc= false;
for(int i=0; i<logTicketsCounter; i++) int i=0; for(i=0; i<logTicketsCounter; i++)
{ {
if(logTickets[i]==ticket) if(logTickets[i]==ticket)
{ {