- Check price from last second.
- Open Candlestick each timeframe=2 minutes ?
- EA entering candle on the end instead of on opening
How can I program my EA to do something when a new candle has appeared? What is the command for a new candle appearing? Anything like:
If you had used this you would have found many results for new candle or new bar.
How can I search for indicators and other elements in this forum? - MQL5 programming forum 2017.05.28
How To Ask Questions The Smart Way. 2004
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up.
For a new bar test, Bars is unreliable (a refresh/reconnect can change number of bars on chart,) volume is unreliable (miss ticks,) Price is unreliable (duplicate prices and The == operand. - MQL4 programming forum.) Always use time.
New candle - MQL4 programming forum #3 2014.04.04
I disagree with making a new bar function, because it can only be called once per tick. A variable can be tested multiple times.
Running EA once at the start of each bar - MQL4 programming forum 2011.05.06
If you had used this you would have found many results for new candle or new bar.
How can I search for indicators and other elements in this forum? - MQL5 programming forum 2017.05.28
How To Ask Questions The Smart Way. 2004
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up.
For a new bar test, Bars is unreliable (a refresh/reconnect can change number of bars on chart,) volume is unreliable (miss ticks,) Price is unreliable (duplicate prices and The == operand. - MQL4 programming forum.) Always use time.
New candle - MQL4 programming forum #3 2014.04.04
I disagree with making a new bar function, because it can only be called once per tick. A variable can be tested multiple times.
Running EA once at the start of each bar - MQL4 programming forum 2011.05.06
How can I program my EA to do something when a new candle has appeared? What is the command for a new candle appearing? Anything like:
datetime lastbar;
bool NewBar()
{
if(lastbar!=Time[1])
{
lastbar=Time[1];
return (true);
}
else
{
return(false);
}
}
Please edit your post and
use the code button (Alt+S) when pasting code
Please edit your post and
use the code button (Alt+S) when pasting code
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use