Money Management

 

Hi!

I'm new at all this. Pls help. I need to trade a set % Margin, eg 10% of the all-time high of Portfolio Value. So when then  portfolio value decreases, it will be adjusted by buying more to equal the margin, eg 10%. Also when the margin% increases to an adjustable margin%, eg 12%, the extra 2% should be sold automatically. I trade it successfully manually via excel spreadsheet., but now want to do an automatic robot.  Any help will be appreciated.

THANKS

 

Margin is irrelevant. It is what you need for your broker to allow the trade. You don't trade % Margin, you trade risk.

  1. In code: Risk depends on your initial stop loss, lot size, and the value of the pair.
    1. You place the stop where it needs to be - where the reason for the trade is no longer valid. E.g. trading a support bounce the stop goes below the support.
    2. Account Balance * percent/100 = RISK = OrderLots * (|OrderOpenPrice - OrderStopLoss| * DeltaPerLot + CommissionPerLot) (Note OOP-OSL includes the SPREAD, and DeltaPerLot is usually around $10/pip but it takes account of the exchange rates of the pair vs. your account currency.)
    3. Do NOT use TickValue by itself - DeltaPerLot and verify that MODE_TICKVALUE is returning a value in your deposit currency, as promised by the documentation, or whether it is returning a value in the instrument's base currency (EUR, in this case).
                MODE_TICKVALUE is not reliable on non-fx instruments with many brokers.
    4. You must normalize lots properly and check against min and max.
    5. You must also check FreeMargin to avoid stop out
    Most pairs are worth about $10 per PIP. A $5 risk with a (very small) 5 PIP SL is $5/$10/5=0.1 Lots maximum.
  2. Use a GUI EA like mine (for MT4): Indicators: 'Money Manager Graphic Tool' indicator by 'takycard' Forum - Page 6
 

Money Management


The forum

  1. MM (money management) calculation, indicators, discussion, tools: calculate your lot size and so on. Original thread with several versions.
  2. MoneyManagement EA is on this thread: it shows you market information and money management on the chart. 
  3. Forex Money Management, Part 1 - good small thread
  4. Useful money management expert - the thread with the EA 
  5. Stop Your Mind From Causing You to Take Profits Too Soon - the post with the educational video 
  6. Money Management: How to Determine an Initial Stop Level - the post with the educational video 
  7. Why Most Traders Lose Money and The Solution - the post with the educational video

The articles

  1. Statistical Verification of the Labouchere Money Management System 
  2. Functions for Money Management in an Expert Advisor 
  3. Fallacies, Part 1: Money Management is Secondary and Not Very Important 
  4. MQL5 Wizard: How to Create a Risk and Money Management Module 
  5. Money Management Revisited 
  6. Cross-Platform Expert Advisor: Money Management 
  7. Limitless Opportunities with MetaTrader 5 and MQL5 

CodeBase

============
 
whroeder1:

Margin is irrelevant. It is what you need for your broker to allow the trade. You don't trade % Margin, you trade risk.

  1. In code: Risk depends on your initial stop loss, lot size, and the value of the pair.
    1. You place the stop where it needs to be - where the reason for the trade is no longer valid. E.g. trading a support bounce the stop goes below the support.
    2. Account Balance * percent/100 = RISK = OrderLots * (|OrderOpenPrice - OrderStopLoss| * DeltaPerLot + CommissionPerLot) (Note OOP-OSL includes the SPREAD, and DeltaPerLot is usually around $10/pip but it takes account of the exchange rates of the pair vs. your account currency.)
    3. Do NOT use TickValue by itself - DeltaPerLot and verify that MODE_TICKVALUE is returning a value in your deposit currency, as promised by the documentation, or whether it is returning a value in the instrument's base currency (EUR, in this case).
                MODE_TICKVALUE is not reliable on non-fx instruments with many brokers.
    4. You must normalize lots properly and check against min and max.
    5. You must also check FreeMargin to avoid stop out
    Most pairs are worth about $10 per PIP. A $5 risk with a (very small) 5 PIP SL is $5/$10/5=0.1 Lots maximum.
  2. Use a GUI EA like mine (for MT4): Indicators: 'Money Manager Graphic Tool' indicator by 'takycard' Forum - Page 6

In the name of honesty and pure science:

A trader can only make consistent profits when he/she has a profitable trading plan. 

A trader should only trade live once he/she honestly (don´t fool yourself) is profitable on the Demo account. 

This may take the trader anywhere from 10 000 + hours on the Demo account, thus maybe 3 to 5 years in time. 

Never trade without a Stop Loss.

Logical conclusion: Once you have a validly profitable trading plan, trade 100% of your own capital because you manage your risk with your Stop Loss policy.

Critical factor: Have a genuinely consistently profitable trading plan which includes an always present Stop Loss policy.

When you do not have such a trading plan, don´t trade on a live account.

Reason: