Serving Traders Since 2005
|
|
|
|||||||
| MetaTrader Expert Advisors Post and discuss the MetaTrader expert advisors here. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
I try to use these code to manage my money,but an problem is I don't know how to descirbe my initital money(priniciple) .my method is cotrol lot :use priniciple 's maximumrisk+3 times about of profit(or loss)'s maximunrisk as lot,it profit>0,it will enlarge,otherwise,the vise.
MQL5 Code:
And have another method of lotoptimize,if solve this,I will list that one here! |
|
||||
|
If by principal you mean the initial balance on an account, then you can't code it with some MQL function. You should create an input parameter and the user will have to fill it with the principal value.
__________________
Please, read the Forum Rules and the Signature Rules to avoid termination of your account. |
|
||||
|
You can't. You can only use some input parameter and set it manually before running your EA.
__________________
Please, read the Forum Rules and the Signature Rules to avoid termination of your account. |
|
||||
|
As far as I know, yes. There is no MQL4 variable for initial balance.
But wait. If by initial balance you mean the balance at the start of the EA running (immediately before attaching it to a chart), then it can be done by reading the current account balance only once in the init() function.
__________________
Please, read the Forum Rules and the Signature Rules to avoid termination of your account. |
|
||||
|
Quote:
__________________
Please, read the Forum Rules and the Signature Rules to avoid termination of your account. |
|
||||
|
If your EA trades with OrderSend() without pending orders, then it can get AccountFreeMargin just before sending its next order.
__________________
Please, read the Forum Rules and the Signature Rules to avoid termination of your account. |
![]() |
| Bookmarks |
| Tags |
| money;lot;position |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Money Management | fdiwata | General Forex Discussion | 11 | 20th May 2012 19:09 |
| Stealth Forex Signals and Tom Strignano Money Management Bonus Points | ForexTradingChoice | Advertisements | 0 | 3rd January 2011 14:27 |
| Money & Risk Management in xls file | peterngkl@gmail.com | General Forex Discussion | 1 | 26th August 2009 05:55 |
| Money management is crucial in Forex Trading | andy003 | General Forex Discussion | 27 | 21st July 2009 05:44 |
| Techniques for Global Money management | fun_calls | Advertisements | 0 | 20th February 2009 16:11 |