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)
-   -   ?? Lotgrössenbestimmung ??? (http://www.expert-advisor.com/forum/showthread.php?t=3446)

Tycoon 04.02.14 10:23

?? Lotgrössenbestimmung ???
 
Hallo!!
Ich hoffe ihr könnt mir helfen. Momentan benutze ich folgende Formel zur Bestimmung der Lotgröße!!

double Stop = 30;
double Risiko= 1.0;
PV=MarketInfo(Symbol(),MODE_TICKVALUE);

double Lot=NormalizeDouble(AccountEquity()*Risiko/100/Stop/PV,2);

Ich glaube die Formel, habe ich mir hier mal selber stibitzt. ;)

Das Problem an der Sache ist, dass diese einwandfrei bei meinem 4 Digit Broker funktioniert. Der wechsel jetzt zu einem 5 Digit Broker mit dieser Formel berechnet das oben genannte Beispiel nicht mit 1.0 % Risiko, sondern mit 10%. Habe mir jetzt schon sämtliche Fehler mit Comment anzeigen lassen um so die Fehlerquelle zu analysieren. Aber alles identisch wie bei meinem 4 Digit Broker.
Muss ich da vielleicht auch etwas noch umrechnen??? :confused::confused:

dave_hofmann 04.02.14 18:10

Hallo Tycoon,

ohne das jetzt mal selbst nachgeprüft zu haben, ich glaube der Tickvalue ist ein anderer.

Lösung:
einfach durch weitere 10 teilen.

Schönen Abend

Dave

Tycoon 04.02.14 18:57

double PV = (MarketInfo(Symbol(),MODE_TICKVALUE));
if(Digits == 5 || Digits == 3)
{
PV = PV*10;
}

Lot=NormalizeDouble(AccountEquity()*Risiko/100/Stop1/PV,2);

Cool...Problem gelöst!
Besten Dank.


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