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)
-   -   Horizontallinie im Strategytester darstellen (http://www.expert-advisor.com/forum/showthread.php?t=6286)

begu 26.12.18 10:27

Horizontallinie im Strategytester darstellen
 
Hallo,

ich versuch schon tagelang eine horizontale linie (breakout-linie) so zu programmieren das sie auch zum manuellen testen beim strategietester aufscheint aber schaffe das nicht ...muss man da was besonderes beachten ...bin ja mt4-anfänger aber das macht mich richtig fertig,wenn da nix geht ....am aktiven chart funktioniert das .....wie kann das sein ???

DANKE für HILFE

gruß

begu

hier der indicatorcode:
//+------------------------------------------------------------------+
//| Begu Alert.mq4 |
//+------------------------------------------------------------------+
#property copyright "begu"

#property indicator_chart_window
extern string LowLine = "MyLineL";
extern string HighLine = "MyLineH";
extern color LineColor = Red;
extern color LineColor1 = DodgerBlue;
extern int LineStyle = STYLE_SOLID;
extern int LineStyle1 = STYLE_SOLID;
extern int pipDistance = 300;
extern string AlertWav ="alert.wav";
extern int AccDigits = 5;
extern double LOWPrice = 0; //Eingabe LOWPrice
extern int TradingRange = 50;
extern string LowTimeBeginn = "06:00";
extern string LowTimeEnd = "12:00";
extern string HighTimeBeginn = "06:00";
extern string HighTimeEnd = "12:00";

//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----

//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();


ObjectCreate(HighLine, OBJ_TREND, 0,StrToTime(HighTimeBeginn), Bid + pipDistance*Point,StrToTime(HighTimeEnd),Bid + pipDistance*Point);
ObjectSet(HighLine,OBJPROP_RAY_RIGHT,true);
ObjectSet(HighLine, OBJPROP_STYLE, LineStyle1);
ObjectSet(HighLine, OBJPROP_COLOR, LineColor1);
ObjectSet(HighLine,OBJPROP_WIDTH,3); // Linienbreite

ObjectCreate(LowLine, OBJ_TREND, 0,StrToTime(LowTimeBeginn), Bid - pipDistance*Point,StrToTime(LowTimeEnd),Bid - pipDistance*Point);
ObjectSet(LowLine, OBJPROP_STYLE, LineStyle);
ObjectSet(LowLine, OBJPROP_COLOR, LineColor);
ObjectSet(LowLine,OBJPROP_RAY_RIGHT,true);
ObjectSet(LowLine,OBJPROP_WIDTH,3);

double val = ObjectGet( LowLine, OBJPROP_PRICE1);
if (Bid <= val ) PlaySound(AlertWav);

double val1 = ObjectGet( HighLine, OBJPROP_PRICE1);
if (Bid >= val1 ) PlaySound(AlertWav);
//----
//----
return(0);
}


Alle Zeitangaben in WEZ +2. Es ist jetzt 16:55 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