Margin is irrelevant. It is what you need for your broker to allow the trade. You don't trade % Margin, you trade risk.
- In code:
Risk depends on your initial stop loss, lot size, and the value of the pair.
- 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.
- 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.)
-
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. - You must normalize lots properly and check against min and max.
- You must also check FreeMargin to avoid stop out
- Use a GUI EA like mine (for MT4): Indicators: 'Money Manager Graphic Tool' indicator by 'takycard' Forum - Page 6
Money Management
The forum
- MM (money management) calculation, indicators, discussion, tools: calculate your lot size and so on. Original thread with several versions.
- MoneyManagement EA is on this thread: it shows you market information and money management on the chart.
- Forex Money Management, Part 1 - good small thread
- Useful money management expert - the thread with the EA
- Stop Your Mind From Causing You to Take Profits Too Soon - the post with the educational video
- Money Management: How to Determine an Initial Stop Level - the post with the educational video
- Why Most Traders Lose Money and The Solution - the post with the educational video
The articles
- Statistical Verification of the Labouchere Money Management System
- Functions for Money Management in an Expert Advisor
- Fallacies, Part 1: Money Management is Secondary and Not Very Important
- MQL5 Wizard: How to Create a Risk and Money Management Module
- Money Management Revisited
- Cross-Platform Expert Advisor: Money Management
- Limitless Opportunities with MetaTrader 5 and MQL5
CodeBase
- Money Management Script - script for MetaTrader 4
- Example of SAR Automated - with Advanced Money Management - expert for MetaTrader 4
- Money Manager Graphic Tool - indicator for MetaTrader 4
- Order Manage EA - expert for MetaTrader 4
- Master Tools - indicator for MetaTrader 4
Margin is irrelevant. It is what you need for your broker to allow the trade. You don't trade % Margin, you trade risk.
- In code:
Risk depends on your initial stop loss, lot size, and the value of the pair.
- 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.
- 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.)
-
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. - You must normalize lots properly and check against min and max.
- You must also check FreeMargin to avoid stop out
- 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.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
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