Metatrader Forum | Forex Expert-Advisor | Broker & Forex Tools

Metatrader Forum | Forex Expert-Advisor | Broker & Forex Tools (http://www.expert-advisor.com/forum/index.php)
-   Programmierung MQL4 (http://www.expert-advisor.com/forum/forumdisplay.php?f=220)
-   -   Horizontale Linie - gestrichelt -Style wird nicht übernommen (http://www.expert-advisor.com/forum/showthread.php?t=6869)

bigborre 16.12.20 09:36

Horizontale Linie - gestrichelt -Style wird nicht übernommen
 
Hallo Leute,

ich baue mir gerade einen einfachen Indikator mit 4 Linien. Diese möchte ich gern gestrichelt darstellen. Egal was ich bei

ObjectSet ("Line Open"+Symbol(), OBJPROP_STYLE, 1);

eintrage ( 1, 2, STYLE_DASH, STYLE_DOT), wird nicht übernommen. Die Linien sind immer STYLE_SOLID.
Hat jemand eine Idee was ich übersehen habe?




Code:

extern  string    PriceLines    =  "<<<<<< Price Lines >>>>>";
extern  string    High_Price    =  "<<<<<< High Price >>>>>>";
extern  color    High_Color    =  Green;
extern  int      High_Width    =  2;
extern  string    Low_Price      =  "<<<<<< Low Price >>>>>>>";
extern  color    Low_Color      =  Red;
extern  int      Low_Width      =  2;
extern  string    Close_Price    =  "<<<<<< Close Price >>>>>>>";
extern  color    Close_Color    =  Blue;
extern  int      Close_Width    =  2;
extern  string    Open_Price    =  "<<<<<< Open Price >>>>>>>";
extern  color    Open_Color    =  Orange;
extern  int      Open_Width    =  2;


//+------------------------------------------------------------------+
//| Custom indicator initialization function                        |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
//----
  return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                      |
//+------------------------------------------------------------------+
int deinit()
  {
//----
      ObjectDelete("LineHigh"+Symbol());
      ObjectDelete("LineLow"+Symbol());
      ObjectDelete("LineClose"+Symbol());
      ObjectDelete("LineOpen"+Symbol());

//----
  return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
//----
      ObjectDelete  ("Line High"+Symbol());
      ObjectDelete  ("Line Low"+Symbol());
      ObjectDelete  ("Line Close"+Symbol());
      ObjectDelete  ("Line Open"+Symbol());
     
      ObjectCreate  ("Line High"+Symbol(), OBJ_HLINE, 0,0, iHigh(Symbol(),PERIOD_D1,1));
      ObjectSet      ("Line High"+Symbol(), OBJPROP_COLOR, High_Color);
      ObjectSet      ("Line High"+Symbol(), OBJPROP_WIDTH, High_Width);
      ObjectSet      ("Line High"+Symbol(), OBJPROP_STYLE, STYLE_DASH);
     
      ObjectCreate  ("Line Low"+Symbol(), OBJ_HLINE, 0,0, iLow(Symbol(),PERIOD_D1,1));
      ObjectSet      ("Line Low"+Symbol(), OBJPROP_COLOR, Low_Color);
      ObjectSet      ("Line Low"+Symbol(), OBJPROP_WIDTH, Low_Width);
      ObjectSet      ("Line Low"+Symbol(), OBJPROP_STYLE, 2);

      ObjectCreate  ("Line Close"+Symbol(), OBJ_HLINE, 0,0, iClose(Symbol(),PERIOD_D1,1));
      ObjectSet      ("Line Close"+Symbol(), OBJPROP_COLOR, Close_Color);
      ObjectSet      ("Line Close"+Symbol(), OBJPROP_WIDTH, Close_Width);
      ObjectSet      ("Line Close"+Symbol(), OBJPROP_STYLE, 2);
     
      ObjectCreate  ("Line Open"+Symbol(), OBJ_HLINE, 0,0, iOpen(Symbol(),PERIOD_D1,0));
      ObjectSet      ("Line Open"+Symbol(), OBJPROP_COLOR, Open_Color);
      ObjectSet      ("Line Open"+Symbol(), OBJPROP_WIDTH, Open_Width);
      ObjectSet      ("Line Open"+Symbol(), OBJPROP_STYLE, 1);


//----
  return(0);
  }


traderdoc 16.12.20 09:53

Ja das ist wieder ein "Bug" im MQL-System.

Als andere außer Solid funktioniert nur, wenn die Strichstärke 1 betragt.
Bei Dir steht bei allen ...Width-Variablen der Wert 2, d.h. nur Solid möglich.

traderdoc

bigborre 16.12.20 09:56

Danke!

Da kann man sich ja nen Knoten ins Hirn denken!


Alle Zeitangaben in WEZ +2. Es ist jetzt 04:06 Uhr.

Powered by vBulletin® Version 3.8.5 (Deutsch)
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.1
Powered by vBCMS® 2.7.0 ©2002 - 2024 vbdesigns.de
Copyright ©2009 - 2023 by Expert-Advisor.com - Das Metatrader Forum