Lotsize gewinn verlust Berechnung

 

Ganz einfache Frage, bin gespannt auf eure Kritik und Hilfe, ich wette ich bekomme von euch hoechstens wieder irgendwelche links und kommentare, alles moegliche aber nicht einfach ein funktionierenden code, seis drum, probieren wir es einmal.

Folgender Code berechnet fuer mich die Lotsize anhand von einer Angabe wieviel Prozent ich riskieren will. Das ganze wird bei Forexwaehrungen auch richtig berechnet, aber bei anderen Sachen wie crypto currencies oder aktien etc nicht. Und drei mal duerft ihr raten was ich jetzt suche, genau ein Code der ueberall funktioniert.

int Stoplos=100; //das sind 100 pips stoploss
double Prozent=0.5;  //0.5 prozent riskieren
double Ticksize=MarketInfo(Symbol(),MODE_TICKVALUE)*10;
double ErlaubteVerlust=(AccountEquity()/100)*Prozent;
Lotsize=NormalizeDouble((ErlaubteVerlust/Stoplos)/Ticksize,2);

Also bin mal gespannt ob jemand einfach ein funktionierenden Code abliefert, also genau das wonach man fragt und alle sind zufrieden oder ob jeder erst wieder sein frust von der Seele schreiben muss sinnlose kommentare und beleidigungen und trotzdem nichts bei raus kommt.

 
Email Account:

Also bin mal gespannt ob jemand einfach ein funktionierenden Code abliefert, also genau das wonach man fragt und alle sind zufrieden oder ob jeder erst wieder sein frust von der Seele schreiben muss sinnlose kommentare und beleidigungen und trotzdem nichts bei raus kommt.

Bin auch gespannt, wer das mit dir zum 100. mal durchkaut.😉

Um deiner Zufriedenheit zu entsprechen. Denn darum geht es ja. Nur dein Wille zählt hier anscheinend.


Ein Tipp von mir.

Coden = Fleiß

 

Sooo ..da wollen wir mal nicht so sein. Verdient haste es nicht für so einen Auftritt hier.


Für dich die eierlegende Wollmilchsau.

Da kannst du sogar deine Kommission eintragen und mitrechnen lassen.


Calli ...ist kostenlos und keine Werbung :-)


https://www.earnforex.com/metatrader-expert-advisors/Position-Sizer/


Position Sizer (MetaTrader expert advisor) calculates how many lots to trade based on:

  • Entry and stop-loss levels
  • Risk tolerance
  • Account size (balance, equity, or even your savings account)
  • Account currency
  • Currency exchange rates

Its main features include:

  • Works with any trading instruments — currency pairs, CFDs, equities, indices, commodities, futures, cryptocurrencies.
  • Calculation inputs and results are displayed in a graphical panel.
  • The panel can be moved freely across the chart.
  • You can easily close or minimize it.
  • All calculation parameters can be adjusted inside the panel in one or two mouse clicks.
  • Entry, stop-loss, and take-profit lines can be dragged directly on the chart.
  • You can choose to set stop-loss and take-profit as distance in points.
  • Alternatively, you can set them as multiples of ATR (Average True Range).
  • If a take-profit is given, the calculator shows the potential reward level and the risk-to-reward ratio.
  • Supports pending and instant orders (easy switching).
  • You can even calculate risk based on a given position size.
  • You can see current and potential risk and reward profile.
  • Information about required margin is available in a separate tab.
  • The expert advisor can show the maximum position size based on available margin.
  • You can enter a custom leverage to calculate position margin based on it.
  • Detailed swaps (rollover interest) information is available in a separate tab.
  • Optional spread display.
  • Optional display of the point value for the calculated position size.
  • The EA automatically saves and loads its inputs on timeframe change or platform restart, preserving your configuration efforts.
  • Custom profiles restore panel's location, status, and settings.
  • Completely free and open-source project.
  • Does not require any DLL imports.
  • Allows opening positions based on the calculations.
  • The calculated position can be divided into several trades with different take-profit levels.
  • Supports stop limit orders in MetaTrader 5.
Position Sizer Expert Advisor for MT4/MT5
  • www.earnforex.com
Position Sizer is a free MetaTrader EA to calculate position size with entry/stop-loss levels, and risk and to execute trades with it!
 

Steht eigentlich auf dieser seite genau beschrieben


https://www.mql5.com/de/docs/constants/environment_state/marketinfoconstants

Dokumentation zu MQL5: Konstanten, Enumerationen und Strukturen / Medium Zustand / Information über das Symbol
Dokumentation zu MQL5: Konstanten, Enumerationen und Strukturen / Medium Zustand / Information über das Symbol
  • www.mql5.com
Information über das Symbol - Medium Zustand - Konstanten, Enumerationen und Strukturen - Nachschlagewerk MQL5 - Nachschlagewerk über die Sprache des algothitmischen/automatischen Handels für MetaTrader 5
 
amando #:

Steht eigentlich auf dieser seite genau beschrieben


https://www.mql5.com/de/docs/constants/environment_state/marketinfoconstants

Ja, aber das will er ja nicht, weil er die Dokumentation ja nicht braucht.

So wie er es in Kinderstube gelernt hat....man reiche ihm alles. 🤷‍♀️

Grund der Beschwerde: