molanis.com/forum - Tools for MetaTrader : The place to ask about the best expert advisor builder, expert advisor downloads, and expert advisor programming

AFTER YOU REGISTER SEND US AN EMAIL TO ACTIVATE YOUR ACCOUNT - Before posting:-1- Please read the user guide -2- Try the examples -3- Search in the forum
It is currently Fri May 17, 2024 11:34 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Does martingale multiplier reset when mt4 closes?
PostPosted: Tue Nov 19, 2013 6:31 am 
Offline

Joined: Wed May 22, 2013 8:07 pm
Posts: 7
example:
trade 1 - 1 lot
trade 2 - 2 lots
trade 3 - 4 lots
trade 4 - 8 lots
trade 5 - 16 lots


What happens to the martingale multiplier if MT4 is disconnected/reset/re-open over the weekend or if one of the trades is closed manually or by another EA?

In the example above, i had 2 losing trades on friday and the next trade is supposed to be trade 3 (4 lots). On monday, will it remember the 2 losing trades and start with 4 lots? or will totally reset and go back to 1 lot?

I also have another EA which i am currently using that closes all orders before the market close on friday to avoid weekend gaps. If this closes one of the orders which is currently profitable/losing, will it remember that it was a loss or profit when the program reopens, and then set the lost size accordingly?

Thank you very much for you help.


Top
 Profile  
 
 Post subject: Re: Does martingale multiplier reset when mt4 closes?
PostPosted: Tue Nov 19, 2013 9:13 am 
Offline
Site Admin

Joined: Fri Oct 16, 2009 3:40 pm
Posts: 451
Martingale uses transactions made after the ea starts. If you stop the ea it will start from scratch.
You may be able to use past transactions if you go to the ea code and change this line:
//Martingale
MartingaleTime=TimeCurrent();
Instead of timecurrent that gets the time when the ea start you can put your own time. This requires some mql knowledge and we do not recommend to do it if you are not familiar with coding.

If you use a different ea to close positions, it can use those if both ea have the same magic number (ea id) Mind you, you need to be sure the logic of both eas do not overlap as in ea 1 says open and ea 2 says close


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by Molanis © 2009