Funktion zum Eröffnen von Trades BUY/SELL

MQL5 Experts Consultation

Tâche terminée

Temps d'exécution 1 heure
Commentaires du client
Gerne wieder.
Commentaires de l'employé
Toller Kunde. Danke für Ihre Bestellung

Spécifications

Hi, da ich mit der Berechnung der Lot-Größe nicht zurecht komme, benötige ich eine Funktion, die in etwa so funktionieren:


void OnTick(){

        double risk_percent = 10; // vom Account
        double SL_percent = 5; // von risk_percent
        int LIMIT_pips = 50;
        bool b = false;
        
        if(singal == "BUY" or signal == "SELL"){
                b = openTrade(symbol, signal, risk_percent, SL_percent, LIMIT_pips);
        }

}

bool openTrade(string symbol, string signal, double risk_percent, double SL_percent, int LIMIT_pips){

        ...

        if (signal == "BUY"){

                ...

                if(!trade.BuyLimit(...)){
        
                        ...

                }

        }else if (signal == "SELL"){

                ...

                if(!trade.SellLimit(...)){
        
                        ...

                }
        
        }
        
}



Die Funktion

openTrade()

muss funktionieren bei Devisen, Aktien, Indexe, CFDs, Rohstoffe, Kalkulation: FOREX und CFD-Hebel.

Acoount-Währung: EUR



Répondu

1
Développeur 1
Évaluation
(463)
Projets
523
33%
Arbitrage
29
38% / 41%
En retard
7
1%
Occupé
2
Développeur 2
Évaluation
(356)
Projets
632
26%
Arbitrage
89
73% / 13%
En retard
12
2%
Gratuit
3
Développeur 3
Évaluation
(9)
Projets
21
5%
Arbitrage
1
0% / 0%
En retard
7
33%
Gratuit
4
Développeur 4
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
5
Développeur 5
Évaluation
(256)
Projets
415
38%
Arbitrage
86
44% / 19%
En retard
70
17%
Occupé

Informations sur le projet

Budget
30 - 50 USD
TVA (19%): 5.7 - 9.5 USD
Total: 35.7 - 59.5 USD
Pour le développeur
27 - 45 USD
Délais
à 10 jour(s)