Review charts: M1/M5/M15/H1 bar counts 500/200/100/50; simplify markers.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1661,14 +1661,15 @@ class OrderApp(tk.Tk):
|
||||
def _hub_upload_bars(self, symbol: str) -> None:
|
||||
if hub_client is None or not is_activated():
|
||||
return
|
||||
# 与复盘显示根数对齐:M1 500 / M5 200 / M15 100 / H1 50
|
||||
tf_map = {
|
||||
"M1": mt5.TIMEFRAME_M1,
|
||||
"M5": mt5.TIMEFRAME_M5,
|
||||
"M15": mt5.TIMEFRAME_M15,
|
||||
"H1": mt5.TIMEFRAME_H1,
|
||||
"M1": (mt5.TIMEFRAME_M1, 500),
|
||||
"M5": (mt5.TIMEFRAME_M5, 200),
|
||||
"M15": (mt5.TIMEFRAME_M15, 100),
|
||||
"H1": (mt5.TIMEFRAME_H1, 50),
|
||||
}
|
||||
for name, tf in tf_map.items():
|
||||
rates = mt5.copy_rates_from_pos(symbol, tf, 0, 400)
|
||||
for name, (tf, count) in tf_map.items():
|
||||
rates = mt5.copy_rates_from_pos(symbol, tf, 0, count)
|
||||
if rates is None or len(rates) == 0:
|
||||
continue
|
||||
bars = [
|
||||
|
||||
Reference in New Issue
Block a user