- Stop thinking “every second,” nothing has changed. Return from OnTick, terminal waits for a new tick, reprocess when called.
- There is no such thing as current time of a candle. There is only last known server time (TimeCurrent) and start time of the candle.
i want to works code for current time of the current (one) minute frame candle. how can be accessed every second
Note that this code is not valid and entered an infinite loop when i run please if anyone can create or have code for this idea
#note
(((I uploaded a picture to express what is required)))
void OnTick()
{
//---
int SECOND;
datetime tm=TimeCurrent();
MqlDateTime stm;
tm=TimeCurrent();
TimeToStruct(tm,stm);
SECOND =(int)stm.sec;
Comment("SECOND : " + DoubleToString(SECOND, _Digits));
for (int i =1 ; SECOND<59 ; i++)
{
Comment("SECOND : " +(SECOND), "\n","i : " + i);
SECOND =(int)stm.sec;
}
}
- Stop thinking “every second,” nothing has changed. Return from OnTick, terminal waits for a new tick, reprocess when called.
- There is no such thing as current time of a candle. There is only last known server time (TimeCurrent) and start time of the candle.
Well sir, thanks for the answer ..The idea that I have is to keep the random price changes that occur to the candle every second in relation to one minute frame, through which, after the changes occur with ASK, I determine the process of buying or selling
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
i want to works code for current time of the current (one) minute frame candle. how can be accessed every second
Note that this code is not valid and entered an infinite loop when i run please if anyone can create or have code for this idea
#note
(((I uploaded a picture to express what is required)))
void OnTick()
{
//---
int SECOND;
datetime tm=TimeCurrent();
MqlDateTime stm;
tm=TimeCurrent();
TimeToStruct(tm,stm);
SECOND =(int)stm.sec;
Comment("SECOND : " + DoubleToString(SECOND, _Digits));
for (int i =1 ; SECOND<59 ; i++)
{
Comment("SECOND : " +(SECOND), "\n","i : " + i);
SECOND =(int)stm.sec;
}
}