OK - DANKE
Habe es dann so gemacht , ohne eingezeichnete Linien.
Daten werden in eine Datei geschrieben.
Code:
//+------------------------------------------------------------------+
//| HLINE_ZEICHNEN.mq4 |
//| |
//| |
//+------------------------------------------------------------------+
#property copyright ""
#property link ""
#property version "1.00"
#property strict
input double Startwert=12700;
extern int NACHKOMMA =1;
double BB;
int Write(string str, string filename);
void OnTick()
{
static double lastBid2=Bid;
double pricee[1];
BB=NormalizeDouble(Startwert,2);
if(High[1]>BB&&Low[1]<BB&&TimeCurrent() == Time[0])
{
int handle;
handle = FileOpen("TEST.txt",FILE_READ|FILE_WRITE|FILE_TXT,"/t"); // Datei wird unter \MQL4\Files abgelegt oder im \MQL4\tester\Files Ordner
FileSeek(handle, 0, SEEK_END);
FileWrite(handle,Time[1],"; Linie gekreuzt: ;",BB); //nach “handle,” kommt das was in die Datei geschrieben wir mit Komma getrennt
FileClose(handle);
if(handle<1)
{
Print("File my_data.dat not found, the last error is ", GetLastError());
}
};
//
}
}
//+------------------------------------------------------------------+