mirror of
https://github.com/rithsila/MT5-EA-Sniper-Strategy.git
synced 2026-08-15 19:58:12 +00:00
Fix compilation errors - correct variable scope and function structure
- Fixed missing closing brace in UpdateTimeframeData function - Moved metadata update and return statement inside function scope - All variables now properly scoped within function boundaries - Should compile without errors now
This commit is contained in:
+21
-22
@@ -3250,32 +3250,31 @@ bool UpdateTimeframeData(string symbol, MarketStructureData &mtf_data)
|
||||
mtf_data.market_phase = "TRENDING";
|
||||
else
|
||||
mtf_data.market_phase = "RANGING";
|
||||
}
|
||||
|
||||
// Update metadata
|
||||
mtf_data.last_update = iTime(symbol, mtf_data.timeframe, 0);
|
||||
mtf_data.is_valid = patterns_success;
|
||||
// Update metadata
|
||||
mtf_data.last_update = iTime(symbol, mtf_data.timeframe, 0);
|
||||
mtf_data.is_valid = patterns_success;
|
||||
|
||||
if (patterns_success)
|
||||
{
|
||||
LogDebug(StringFormat("%s analysis completed: OB=%d, FVG=%d, BOS=%d, Sweeps=%d, Bias=%.1f%% (%s), Phase=%s",
|
||||
EnumToString(mtf_data.timeframe),
|
||||
ArraySize(mtf_data.order_blocks),
|
||||
ArraySize(mtf_data.fair_value_gaps),
|
||||
ArraySize(mtf_data.bos_events),
|
||||
ArraySize(mtf_data.liquidity_sweeps),
|
||||
mtf_data.current_bias.strength,
|
||||
mtf_data.current_bias.direction,
|
||||
mtf_data.market_phase));
|
||||
|
||||
// Phase 3: Draw patterns on chart (only for current symbol and M15/H4 timeframes for clarity)
|
||||
if (symbol == _Symbol && (mtf_data.timeframe == PERIOD_M15 || mtf_data.timeframe == PERIOD_H4))
|
||||
if (patterns_success)
|
||||
{
|
||||
DrawPatternsOnChart(symbol, mtf_data);
|
||||
}
|
||||
}
|
||||
LogDebug(StringFormat("%s analysis completed: OB=%d, FVG=%d, BOS=%d, Sweeps=%d, Bias=%.1f%% (%s), Phase=%s",
|
||||
EnumToString(mtf_data.timeframe),
|
||||
ArraySize(mtf_data.order_blocks),
|
||||
ArraySize(mtf_data.fair_value_gaps),
|
||||
ArraySize(mtf_data.bos_events),
|
||||
ArraySize(mtf_data.liquidity_sweeps),
|
||||
mtf_data.current_bias.strength,
|
||||
mtf_data.current_bias.direction,
|
||||
mtf_data.market_phase));
|
||||
|
||||
return patterns_success;
|
||||
// Phase 3: Draw patterns on chart (only for current symbol and M15/H4 timeframes for clarity)
|
||||
if (symbol == _Symbol && (mtf_data.timeframe == PERIOD_M15 || mtf_data.timeframe == PERIOD_H4))
|
||||
{
|
||||
DrawPatternsOnChart(symbol, mtf_data);
|
||||
}
|
||||
}
|
||||
|
||||
return patterns_success;
|
||||
}
|
||||
|
||||
void DrawPatternsOnChart(string symbol, MarketStructureData &mtf_data)
|
||||
|
||||
Reference in New Issue
Block a user