Hello everyone,
this is my first message in this forum. Some months of trading. Some years of programming (pascal, basic and a little c).
But here, I try and try and ..... but can't find no solution. So I tried with a little example from "S. Kovalyov, Programming in Algorithmic Language ", but this doesn't work too.
Here is a little, modified code
-----------START-----------
//countiter.mq4
// The code should be used for educational purpose only.
//--------------------------------------------------------------------
int init()
{
//----
Alert ("Function init() triggered at start");// Alert
return; // Exit init()
//----
return(0);
}
int start() // Special funct. start()
{
int i, Count; // Declaring variables
for (i=1; i<=5; i++) // Show for 5 ticks
{
Count=0; // Clearing counter
while(RefreshRates()==false) // Until...
{ //..a new tick comes
Count = Count+1; // Iteration counter
}
Alert("Tick ",i,", loops ",Count); // After each tick
}
return; // Exit start()
}
The only message that appears on the alert-window:
"Function init() triggered at start"
and I expected something like
Tick 3 98622348
Tick 2 64534421
Tick 1 32343443
the chart is a simple EURUSD M1-chart with no other EA's or Indicators.
But it's a demo account.
Can anyone help me? This would be very kind of You
this is my first message in this forum. Some months of trading. Some years of programming (pascal, basic and a little c).
But here, I try and try and ..... but can't find no solution. So I tried with a little example from "S. Kovalyov, Programming in Algorithmic Language ", but this doesn't work too.
Here is a little, modified code
-----------START-----------
//countiter.mq4
// The code should be used for educational purpose only.
//--------------------------------------------------------------------
int init()
{
//----
Alert ("Function init() triggered at start");// Alert
return; // Exit init()
//----
return(0);
}
int start() // Special funct. start()
{
int i, Count; // Declaring variables
for (i=1; i<=5; i++) // Show for 5 ticks
{
Count=0; // Clearing counter
while(RefreshRates()==false) // Until...
{ //..a new tick comes
Count = Count+1; // Iteration counter
}
Alert("Tick ",i,", loops ",Count); // After each tick
}
return; // Exit start()
}
The only message that appears on the alert-window:
"Function init() triggered at start"
and I expected something like
Tick 3 98622348
Tick 2 64534421
Tick 1 32343443
the chart is a simple EURUSD M1-chart with no other EA's or Indicators.
But it's a demo account.
Can anyone help me? This would be very kind of You