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
(546)
Projets
629
33%
Arbitrage
38
39% / 50%
En retard
11
2%
Chargé
2
Développeur 2
Évaluation
(361)
Projets
643
26%
Arbitrage
92
72% / 14%
En retard
12
2%
Travail
Publié : 1 code
3
Développeur 3
Évaluation
(12)
Projets
25
4%
Arbitrage
1
0% / 0%
En retard
7
28%
Gratuit
4
Développeur 4
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
5
Développeur 5
Évaluation
(295)
Projets
472
40%
Arbitrage
103
40% / 23%
En retard
78
17%
Occupé
Publié : 2 codes

Informations sur le projet

Budget
30 - 50 USD
Délais
à 10 jour(s)