Finalize EA architecture before strategy development
This commit is contained in:
@@ -78,7 +78,13 @@ public:
|
||||
// Detect new bar on current timeframe
|
||||
bool IsNewBar()
|
||||
{
|
||||
datetime bar_time = iTime(m_symbol, PERIOD_CURRENT, 0);
|
||||
return IsNewBar(PERIOD_CURRENT);
|
||||
}
|
||||
|
||||
// Detect new bar on a supplied timeframe
|
||||
bool IsNewBar(ENUM_TIMEFRAMES timeframe)
|
||||
{
|
||||
datetime bar_time = iTime(m_symbol, timeframe, 0);
|
||||
|
||||
if(m_last_bar_time == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user