MQL5 v1.24: Farb-Inputs umbenannt -- erzwingt die neuen Defaults

User: "die liquiditaetspfeile sind immer noch gold".

Ursache: MT5 speichert Input-Werte JE CHART-INSTANZ und ueberschreibt damit neue
Defaults -- auch nach einem Recompile. Die Pfeile blieben deshalb auf dem alten
Gold-Wert (v1.15-v1.22), obwohl der Code laengst neongruen/rot vorgab.

Loesung: die betroffenen Inputs umbenennen. MT5 findet dann keinen gespeicherten
Wert und uebernimmt den Default:
  InpWallBidColor  -> InpArrowUpColor    (neongruen #00FF7F)
  InpWallAskColor  -> InpArrowDownColor  (rot #FF4500)
  InpLiqTrendColor -> InpTrendLineColor  (neongruen)
  InpLiqZoneColor  -> InpZoneColor / InpLiqZoneAlpha -> InpZoneAlpha

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Axel Hocks
2026-07-30 18:56:43 +02:00
co-authored by Claude Opus 4.8
parent a58c6804ba
commit 6238d6f12e
+19 -11
View File
@@ -12,7 +12,15 @@
//| 4) Der Bot muss laufen (schreibt die CSV alle ~5 s). | //| 4) Der Bot muss laufen (schreibt die CSV alle ~5 s). |
//+------------------------------------------------------------------+ //+------------------------------------------------------------------+
#property copyright "Oil Trading Bot" #property copyright "Oil Trading Bot"
#property version "1.23" #property version "1.24"
// v1.24 (2026-07-30): Farb-Inputs UMBENANNT — MT5 speichert Input-Werte je
// Chart-Instanz und ueberschreibt damit NEUE Defaults, auch nach Recompile
// (deshalb blieben die Pfeile gold). Durch die Umbenennung findet MT5 keinen
// gespeicherten Wert mehr und nimmt den Default:
// InpWallBidColor -> InpArrowUpColor (neongruen #00FF7F)
// InpWallAskColor -> InpArrowDownColor (rot #FF4500)
// InpLiqTrendColor -> InpTrendLineColor (neongruen)
// InpLiqZoneColor/Alpha -> InpZoneColor/InpZoneAlpha
// v1.23 (2026-07-30): (a) Pfeile wieder NEONGRUEN/ROT statt Gold (User-Wunsch). // v1.23 (2026-07-30): (a) Pfeile wieder NEONGRUEN/ROT statt Gold (User-Wunsch).
// (b) Liquiditaets-Trendlinie neongruen wie der Up-Pfeil (statt pink). // (b) Liquiditaets-Trendlinie neongruen wie der Up-Pfeil (statt pink).
// (c) FIX „Beschriftungen nicht komplett rechtsbuendig": auf den Linien war // (c) FIX „Beschriftungen nicht komplett rechtsbuendig": auf den Linien war
@@ -40,7 +48,7 @@
// v1.19 (2026-07-30): Liquiditaetszone TRANSPARENT (User: „Transparenz der Zone // v1.19 (2026-07-30): Liquiditaetszone TRANSPARENT (User: „Transparenz der Zone
// auf 10 %"). MT5 kann bei OBJ_RECTANGLE kein echtes Alpha -> BlendBg() // auf 10 %"). MT5 kann bei OBJ_RECTANGLE kein echtes Alpha -> BlendBg()
// mischt die Fuellfarbe gegen den (bekannten, einfarbigen) Chart-Hintergrund; // mischt die Fuellfarbe gegen den (bekannten, einfarbigen) Chart-Hintergrund;
// das Ergebnis sieht identisch aus. InpLiqZoneAlpha = Deckkraft in %. // das Ergebnis sieht identisch aus. InpZoneAlpha = Deckkraft in %.
// Die gestrichelte Kante bleibt in voller Farbe (wie im Referenzbild). // Die gestrichelte Kante bleibt in voller Farbe (wie im Referenzbild).
// v1.18 (2026-07-30): NEU (User-Wuensche) — (a) LIQUIDITAETSZONEN: Equal Highs / // v1.18 (2026-07-30): NEU (User-Wuensche) — (a) LIQUIDITAETSZONEN: Equal Highs /
// Equal Lows aus den M30-Pivots als goldenes Band + gestrichelte Kante, // Equal Lows aus den M30-Pivots als goldenes Band + gestrichelte Kante,
@@ -95,17 +103,17 @@ input bool InpRangeFill = false; // Range füllen (aus = nur Umris
input bool InpShowChannel = true; // Regressionskanal (M30) zeichnen input bool InpShowChannel = true; // Regressionskanal (M30) zeichnen
input color InpChanColor = clrYellow; // Kanal-Farbe input color InpChanColor = clrYellow; // Kanal-Farbe
input bool InpShowWalls = true; // echte Liquiditäts-Wände (Hyperliquid-Orderbuch) input bool InpShowWalls = true; // echte Liquiditäts-Wände (Hyperliquid-Orderbuch)
input color InpWallBidColor = C'0,255,127'; // Liquiditaet Nachfrage (Bid) — NEONGRUEN input color InpArrowUpColor = C'0,255,127'; // Liquiditaet Nachfrage (Bid) — NEONGRUEN
input color InpWallAskColor = C'255,69,0'; // Liquiditaet Angebot (Ask) — ROT input color InpArrowDownColor = C'255,69,0'; // Liquiditaet Angebot (Ask) — ROT
input bool InpShowLiqTrend = true; // Liquiditäts-Trendlinie zeichnen input bool InpShowLiqTrend = true; // Liquiditäts-Trendlinie zeichnen
input color InpLiqTrendColor = C'0,255,127'; // Liquiditaets-Trend — NEONGRUEN (wie Up-Pfeil) input color InpTrendLineColor = C'0,255,127'; // Liquiditaets-Trend — NEONGRUEN (wie Up-Pfeil)
input bool InpLiqTrendLabel = false; // Beschriftung der Trendlinie (aus per User-Wunsch) input bool InpLiqTrendLabel = false; // Beschriftung der Trendlinie (aus per User-Wunsch)
input bool InpShowTrades = false; // Trade-Kerzen umranden (AUS per User-Wunsch) input bool InpShowTrades = false; // Trade-Kerzen umranden (AUS per User-Wunsch)
input color InpTradeOpenColor = C'134,239,172'; // Eroeffnung — hellgruen input color InpTradeOpenColor = C'134,239,172'; // Eroeffnung — hellgruen
input color InpTradeCloseColor = C'21,128,61'; // Close — dunkelgruen input color InpTradeCloseColor = C'21,128,61'; // Close — dunkelgruen
input bool InpShowLiqZones = true; // Liquiditaetszonen (Equal Highs/Lows) input bool InpShowLiqZones = true; // Liquiditaetszonen (Equal Highs/Lows)
input color InpLiqZoneColor = C'245,158,11'; // Zonen-Grundfarbe (Gold #F59E0B) input color InpZoneColor = C'245,158,11'; // Zonen-Grundfarbe (Gold #F59E0B)
input int InpLiqZoneAlpha = 10; // Deckkraft der Zonenfuellung in % (10 = sehr transparent) input int InpZoneAlpha = 10; // Deckkraft der Zonenfuellung in % (10 = sehr transparent)
input bool InpShowPrice = true; // aktuellen Kurs oben rechts anzeigen input bool InpShowPrice = true; // aktuellen Kurs oben rechts anzeigen
input int InpPriceSize = 20; // Schriftgroesse des Kurses input int InpPriceSize = 20; // Schriftgroesse des Kurses
input int InpLabelSize = 12; // Schriftgroesse der Linien-Beschriftungen (+4 per User-Wunsch) input int InpLabelSize = 12; // Schriftgroesse der Linien-Beschriftungen (+4 per User-Wunsch)
@@ -447,7 +455,7 @@ void Redraw()
double lsz = (k > 3) ? StringToDouble(p[3]) : 0.0; double lsz = (k > 3) ? StringToDouble(p[3]) : 0.0;
if(lpx <= 0) continue; if(lpx <= 0) continue;
bool isBid = (side == "B"); bool isBid = (side == "B");
color lcol = isBid ? InpWallBidColor : InpWallAskColor; color lcol = isBid ? InpArrowUpColor : InpArrowDownColor;
// ⚠ 2026-07-30 (User): KEINE waagerechte Linie und KEIN Text-Label mehr — // ⚠ 2026-07-30 (User): KEINE waagerechte Linie und KEIN Text-Label mehr —
// der Chart war zu voll. Es bleibt NUR der Pfeil, RECHTSBÜNDIG am aktuellen // der Chart war zu voll. Es bleibt NUR der Pfeil, RECHTSBÜNDIG am aktuellen
// Rand, auf dem Preisniveau der Wand. Die Details (Seite/Größe/Dominanz) // Rand, auf dem Preisniveau der Wand. Die Details (Seite/Größe/Dominanz)
@@ -500,7 +508,7 @@ void Redraw()
if(zlo <= 0 || zhi <= 0 || zt <= 0) continue; if(zlo <= 0 || zhi <= 0 || zt <= 0) continue;
datetime zend = iTime(_Symbol, PERIOD_CURRENT, 0) + (datetime)(PeriodSeconds() * 3); datetime zend = iTime(_Symbol, PERIOD_CURRENT, 0) + (datetime)(PeriodSeconds() * 3);
string zn = PFX + "EQZ_" + zs; string zn = PFX + "EQZ_" + zs;
color zfill = BlendBg(InpLiqZoneColor, InpLiqZoneAlpha); color zfill = BlendBg(InpZoneColor, InpZoneAlpha);
if(ObjectCreate(0, zn, OBJ_RECTANGLE, 0, zt, zlo, zend, zhi)) if(ObjectCreate(0, zn, OBJ_RECTANGLE, 0, zt, zlo, zend, zhi))
{ {
ObjectSetInteger(0, zn, OBJPROP_STYLE, STYLE_SOLID); ObjectSetInteger(0, zn, OBJPROP_STYLE, STYLE_SOLID);
@@ -525,7 +533,7 @@ void Redraw()
double edge = (zs == "H" ? zhi : zlo); double edge = (zs == "H" ? zhi : zlo);
if(ObjectCreate(0, zl, OBJ_TREND, 0, zt, edge, zend, edge)) if(ObjectCreate(0, zl, OBJ_TREND, 0, zt, edge, zend, edge))
{ {
ObjectSetInteger(0, zl, OBJPROP_COLOR, InpLiqZoneColor); ObjectSetInteger(0, zl, OBJPROP_COLOR, InpZoneColor);
ObjectSetInteger(0, zl, OBJPROP_STYLE, STYLE_DASH); ObjectSetInteger(0, zl, OBJPROP_STYLE, STYLE_DASH);
ObjectSetInteger(0, zl, OBJPROP_WIDTH, 1); ObjectSetInteger(0, zl, OBJPROP_WIDTH, 1);
ObjectSetInteger(0, zl, OBJPROP_RAY_RIGHT, true); ObjectSetInteger(0, zl, OBJPROP_RAY_RIGHT, true);
@@ -617,7 +625,7 @@ void Redraw()
string nm = PFX + "LIQTREND"; string nm = PFX + "LIQTREND";
if(ObjectCreate(0, nm, OBJ_TREND, 0, t1, q1, t2, q2)) if(ObjectCreate(0, nm, OBJ_TREND, 0, t1, q1, t2, q2))
{ {
ObjectSetInteger(0, nm, OBJPROP_COLOR, InpLiqTrendColor); ObjectSetInteger(0, nm, OBJPROP_COLOR, InpTrendLineColor);
ObjectSetInteger(0, nm, OBJPROP_STYLE, STYLE_SOLID); ObjectSetInteger(0, nm, OBJPROP_STYLE, STYLE_SOLID);
ObjectSetInteger(0, nm, OBJPROP_WIDTH, 2); ObjectSetInteger(0, nm, OBJPROP_WIDTH, 2);
// ⚠ KEIN RAY_RIGHT: eine 60-min-Regression 100 Bars in die Zukunft zu // ⚠ KEIN RAY_RIGHT: eine 60-min-Regression 100 Bars in die Zukunft zu