Serving Traders Since 2005
|
|
|
|||||||
| MetaTrader Expert Advisors Post and discuss the MetaTrader expert advisors here. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
If that's the same EA that you've listed here, then your Lot size depends not only on this equation with the decrease factor but also on the amount of free margin available:
lot=NormalizeDouble(AccountFreeMargin()*MaximumRis k/100.0,1); But it still doesn't make much sense... Care to attach this EA .mq4 file with all the input parameters you are using?
__________________
Please, read the Forum Rules and the Signature Rules to avoid termination of your account. |
|
||||
|
Quote:
however,some guys say the "losses" in the equation "if (OrderProfit()<0) losses++;" stands lossing amount of loss,others say it is the lossing order's N.O. this is why I ask losses stands what,and in my log why the order 4's position is 1.3 pls gurus help me. |
|
||||
|
Please attach the whole EA (.mq4 file) if you want to get a definite answer.
__________________
Please, read the Forum Rules and the Signature Rules to avoid termination of your account. |
|
||||
|
Quote:
profitable ea couldn't increase position pls gurus point out method. just the same file. TKS! |
|
||||
|
In the file attached there, DecreaseFactor = 3, not 10. So, what is it? And the starting balance is 5000, right?
__________________
Please, read the Forum Rules and the Signature Rules to avoid termination of your account. |
|
||||
|
Quote:
My question I have listed in 3# tks! |
|
||||
|
The it's all correct. The cycle inside LotsOptimized() calculates the number of losing orders met in a row. Initially we have 50,000 free margin and DecreaseFactor = 10:
1. lot = 50000 * 0.02 / 500 = 2 since losses <= 1, we don't do anything else. 2. lot = 48444.26 * 0.02 / 500 = 1.93 = 1.9 after normalizing since losses <= 1, we don't do anything else. 3. lot = 47152.26 * 0.02 / 500 = 1.88 = 1.9 after normalizing losses > 1, lot = 1.9 - 1.9 * 2 / 10 = 1.52 = 1.5 after normalizing 4. lot = 46495.45 * 0.02 / 500 = 1,85 = 1,9 after normalizing losses > 1, lot = 1.9 - 1.9 * 3 / 10 = 1,33 = 1,3 after normalizing
__________________
Please, read the Forum Rules and the Signature Rules to avoid termination of your account. |
|
||||
|
thank you for your help to show the cycle correctly,but now when I backtracking EURUSD on 01.01.2011-03.26.2011 M5 the starting balance is 50,000 by add.mq4,it produce some results amazing me again.
I modified the decrease factor=3,and if(losses>=1) lot=NormalizeDouble(lot-lot*losses/DecreaseFactor,1); my question is why the third order's lot is 2? I think it should count like this, lot=50180*0.02/500=2, since losses=1,lot=2-2*1/3=1.34=1.3 after normalizing confused: |
|
||||
|
unconsciously, I found just the model will affect order's lots.
using the add.mq4,all other factors are same,(eurusd, m5 ,01.01.2011-26.03.2011)but under each tick model, the log's 77-78 line will get as the attachment.(lot is 2.1) gurus can contrast the openprice model 's report I attached in the 9#(77-78line the order's lot is 1.0),I am appeciating for explain this.add another question:when living trading,it will follow which model?each tick or open price and other? I have this equation code //---- go trading only for first tiks of new bar if(Volume[0]>1) return; I think it would limit only openprice model taking effect. but why the demo backtracketing test have differernt result under differernt model? I am an newbie,so don't laugh at me.confused: Last edited by univetsity; 27th March 2011 at 14:10. |
![]() |
| Bookmarks |
| 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 |
| Genetic Algorithm for EA, how? | lumanauw | MetaTrader Expert Advisors | 5 | 30th June 2011 07:51 |
| MDT's Daily Forex Analysis and FX-Market Algorithm | mdtforex | Advertisements | 12 | 11th March 2009 07:45 |