Fragen von Neueinsteigern zu MQL4 und MQL5, Hilfe und Diskussion über Algorithmen und Codes - Seite 1034
Sie verpassen Handelsmöglichkeiten:
- Freie Handelsapplikationen
- Über 8.000 Signale zum Kopieren
- Wirtschaftsnachrichten für die Lage an den Finanzmärkte
Registrierung
Einloggen
Sie stimmen der Website-Richtlinie und den Nutzungsbedingungen zu.
Wenn Sie kein Benutzerkonto haben, registrieren Sie sich
Ich danke Ihnen! Und wenn es sich um kommerzielle Zwecke handelt?
Für Markt im Sinne von ?
dann müssen Sie Ihre eigene GUI-Bibliothek in Ihrem eigenen Image erstellen :-(
MQL ist nicht für eine komplexe grafische Benutzeroberfläche gedacht. Sie ist zum Zählen und Handeln bestimmt.
Das heißt, es ist möglich, aber es ist unerträglich dumm.
Beschlossen, die CCanvas-Bibliothek zu studieren
Ich kann es nicht herausfinden - keine Fehler (oder besser gesagt, der Compiler gibt keine aus), und auf dem Bildschirm ist auch nichts zu sehen. Ich möchte ein rotes Dreieck zeichnen ...
Und hier ist das Ergebnis
Beschlossen, die CCanvas-Bibliothek zu erkunden
Danke für das vorgefertigte Beispiel
Wenn es Ihnen nichts ausmacht, könnte ich ein paar Worte über meine Fehler verlieren? Es ist nur so, dass ich mir die Hilfe auf der Website angesehen habe, und die Dokumentation enthält nur eine Beschreibung der Funktionen selbst, und die Beispiele darunter, welche Funktion nach welcher kommt, sind nicht vorhanden
Danke für das vorgefertigte Beispiel
Wenn es Ihnen nichts ausmacht, könnte ich ein paar Worte über meine Fehler verlieren? Ich habe mir gerade die Hilfe auf der Website angesehen, und die Dokumentation enthält nur eine Beschreibung der Funktionen selbst, und es gibt keine Beispiele dafür, welche Funktion auf welche folgt
Lesen Sie die Artikel, es gibt viele fertige Beispielehttps://www.mql5.com/ru/search#!keyword=Canvas&module=mql5_module_articles
Guten Tag!!!
Ich möchte versuchen, eine Funktion zu schreiben, die verlorene Aufträge nach Gewinn, Lot und Ticket speichert.
Ich habe noch nie mit Arrays gearbeitet, ich habe es anhand von Beispielen und Referenzen getan.
Ich weiß nicht, wo und wie ich die Array-Größe angeben kann.
Bitte überprüfen und korrigieren Sie diese, wenn möglich.
======
struct StructOrder
{
doppelt OrProf;
Doppelter OrLot;
int OrTiK;
};
StructOrder OrBuy[];
StructOrder OrSell[];
====
void Cloce_No_FreeMargin()
{
double profit_SELL = 0;
double profit_BUY = 0;
double no_profits_BUY = 0;
double no_profits_SELL = 0;
double cur_profits_SELL = 0;
double cur_profits_BUY = 0;
//---
int bo = 0;
int so = 0;
InitStruct_Order(OrBuy);
InitStruct_Order(OrSell);
//ArrayResize(OrBuy,bo);
//ArrayResize(OrSell,so);
for(int trade= OrdersTotal()-1; trade>= 0; trade--)
{
if(OrderSelect(Handel,SELECT_BY_POS,MODE_TRADES)==false)
Pause;
if(OrderSymbol()==Symbol() && OrderMagicNumber()==magisch)
{
if(OrderType()==OP_SELL)
{
profit_SELL+=OrderProfit()+OrderSwap()+OrderCommission();
}
if(Auftragsart()==OP_BUY)
{
profit_BUY+=OrderProfit()+OrderSwap()+OrderCommission();
}
//===========================================================
if(OrderType()==OP_SELL)
{
cur_profits_SELL=OrderProfit()+OrderSwap()+OrderCommission();
if(cur_profits_SELL<0)
{
no_profits_SELL+=cur_profits_SELL;
OrSell[so].OrProf = OrderProfit()-OrderSwap()-OrderCommission();
OrSell[so].OrLot = OrderLots();
OrSell[so].OrTiK = OrderTicket();
so++;
Print(" SELL type: Profit - ",OrBuy[bo].OrProf,": Lot - ",OrBuy[bo].OrLot,": Ticket - ",OrBuy[bo].OrTiK);
}
}
//===========================================================
if(Auftragsart()==OP_BUY)
{
cur_profits_BUY=OrderProfit()+OrderSwap()+OrderCommission();
if(cur_profits_BUY<0)
{
no_profits_BUY+=cur_profits_BUY;
OrBuy[bo].OrProf = OrderProfit()-OrderSwap()-OrderCommission();
OrBuy[bo].OrLot = OrderLots();
OrBuy[bo].OrTiK = OrderTicket();
bo++;
Print(" BUY type: Profit - ",OrBuy[bo].OrProf,": Lot - ",OrBuy[bo].OrLot,": Ticket - ",OrBuy[bo].OrTiK);
}
}
}
}
}
//+------------------------------------------------------------------+
//| Init-Struktur für Aufträge |
//+------------------------------------------------------------------+
void InitStruct_Order(StructOrder &Masiv[])
{
int Size = ArrayRange(Masiv,0);
for(int i=0; i<Größe; i++)
{
Masiv[i].OrProf = 0;
Masiv[i].OrLot = 0;
Masiv[i].OrTiK = 0;
}
}
Hallo,
Könnten Sie mir bitte sagen, wie ich ein Projekt, das aus einer mq4-Datei und einer Vielzahl von mqh-Dateien besteht, für einen Marktplatz zusammenstellen kann?
Freunde, bitte helft mir, einen Umkehrindikator in meinem Expert Advisor über iCustom zu programmieren, der aus einer Linie besteht, aber mit unterschiedlichen Farben für Kauf und Verkauf. Es hat keine Pfeile. Für Farbe scheint es drei Puffer zu haben, aber tatsächlich zeigt es nur einen Value1 für beide Farben an, wenn es mit der Maus gehalten wird. Ich habe versucht, sowohl Balken zu vergleichen als auch mit Null zu vergleichen, aber es hilft nicht. Wie man Umkehrungen solcher Indikatoren programmiert, wer weiß? Hier sind die Anfangseinstellungen der Indikatorpuffer und ihr Bild. Es sieht aus wie StepMA, ist es aber nicht:
Freunde, bitte helft mir, einen Umkehrindikator in meinem Expert Advisor über iCustom zu programmieren, der aus einer Linie besteht, aber mit unterschiedlichen Farben für Kauf und Verkauf. Es hat keine Pfeile. Für Farbe scheint es drei Puffer zu haben, aber tatsächlich zeigt es nur einen Value1 für beide Farben an, wenn es mit der Maus gehalten wird. Ich habe versucht, sowohl Balken zu vergleichen als auch mit Null zu vergleichen, aber es hilft nicht. Wie man Umkehrungen solcher Indikatoren programmiert, wer weiß? Hier sind die Anfangseinstellungen der Indikatorpuffer und ihr Bild. Es sieht aus wie StepMA, ist es aber nicht:
Bittefügen Sie den Code über die Schaltfläche
Freunde, bitte helft mir, einen Umkehrindikator in meinem Expert Advisor über iCustom zu programmieren, der aus einer Linie besteht, aber mit unterschiedlichen Farben für Kauf und Verkauf. Es hat keine Pfeile. Für Farbe scheint es drei Puffer zu haben, aber tatsächlich zeigt es nur einen Value1 für beide Farben an, wenn es mit der Maus gehalten wird. Ich habe versucht, sowohl Balken zu vergleichen als auch mit Null zu vergleichen, aber es hilft nicht. Wie man Umkehrungen solcher Indikatoren programmiert, wer weiß? Hier sind die Anfangseinstellungen der Indikatorpuffer und ihr Bild. Es sieht aus wie StepMA, ist es aber nicht:
Beispiel
Der Indikator basiert auf DRAW_COLOR_LINE. Es gibt zwei Indikatorpuffer - einen für Werte ('ColorLineBuffer') und einen für Farben ( 'ColorLineColors').
Und der Expert Advisor kopiert Werte aus dem Puffer Nummer '0' ('ColorLineBuffer') und Nummer '1' ('ColorLineColors').