For some MM methods the next lot size is calculated after reading the lot size of the previous trade and that's why even if you restart the EA, the strategy will continue. And for other MM methods I keep temporary values in variables, which are lost if you restart the EA.
Posts made by fxDreema
-
RE: Fibonacci Betting - how to reset?posted in Questions & Answers
-
RE: Upgrade problemposted in Bug Reports
Don't worry, I eventually see all questions. And if I'm late for problem like this, I normally give the person bonus of few extra days. So you actually get more

-
RE: Dynamic Varaibleposted in Questions & Answers
What about this Variables thing above the list of blocks?
Otherwise if you are thinking about PHP-like variables, those are not possible. MQL4/5 is based on C++ (I believe), in which all variables are defined before the compilation. But you can probably work with arrays. There are some dynamic arrays. But it's a pain in the ass to work with arrays in MQL4/5, at least for me. You can try it. To define Variable that is array, try to name that variable with []
-
RE: Select Object By Name - Several Objectsposted in Questions & Answers
Well, each object has different name and you can't have 2 or more objects with the same name. So if you know one name, you can only get/set information to only 1 particular object, if exists. If you want to do something else over multiple objects, then you need to find those objects.
-
RE: I really need help, How to make Break Even work on Bid if buy and on Ask if sell?posted in Questions & Answers
Use the trailing stop block instead. Posting the source code doesn't help, because you can't change it from the EA builder. For the trailing stop try to set Step to 1000 (some huge number), Start to the profit that is needed and Stop... the same as Start
-
RE: What is the difference between the Parent Trade and the Partial Trade ?posted in Questions & Answers
In MetaTrader 4 each and every trade appears as different with different ticket number - you can't combine or separate a trade. But for example when you partially close a trade and the result is one new trade, that new trade has some common parameters with the one that was before. So with little analyzing we can detect if one trade was a result of a partial close or it was brand new trade.
-
RE: Binary options EAposted in Questions & Answers
Use the same blocks. Only turn off the stops (SL and TP), they are not needed at all. And set the expiration time of course. The EA should be able to do the rest. If it gives you some error, tell me.
About the backtesting... I don't know how. MetaTrader does not work with BO naturally. The way it happens is that certain information about the expiration time is put in the Comment of the trade and the BO broker reads that information and does the rest. But MetaTrader still works the same way. And when you backtest, even if you have have such fancy comments, nothing will happen, because the Tester does not know what Binary Options is and does not care what is in the comment attribute. But in fact the expiration setting will work and trades will be closed by expiration.
-
RE: Modifying the Block "Modify stops of positions"? Want to leave existing TP unaffectedposted in Questions & Answers
Try "For each Position" -> "modify stops"
-
RE: Compilation errorposted in Bug Reports
The problem appears to be in block 1673, but what type of block it was?
-
RE: Ticks per second in Market propertiesposted in Questions & Answers
You know, I will suggest to use some indicator or something like that. I can see that something is disconnected in the code and that's why it doesn't work, but even if it works the result would be not very accurate. There is no native MQL function for this and I was using code that I wrote, but now when I'm looking at it I don't like it very much.
-
RE: Repeat blocks until one gives trueposted in Questions & Answers
What if you create some object at some time, for example horizontal line, and then when the price crosses that object you create a new trade. This sounds to me like a virtual pending order

-
RE: If i want do when order lots up then stop loss up ?posted in Questions & Answers
I lost the idea few times while reading the question

-
RE: partial closeposted in Questions & Answers
Not very beautiful: https://fxdreema.com/shared/KAwDdmrjd
This is a good idea for a special block, i guess -
RE: Condition Checkposted in Questions & Answers
Because I don't like the idea of working with variables to store such trading information (because if you close the EA, that information would be lost), I always prefer to find a way to check the actual trading data before doing something. So I would ask myself - can I get information from the trades that can tell me whether the condition A or B was repeated twice?
For example, you can set different Group numbers for the trades in conditions A and B. Those Group numbers are somehow linked to the magic numbers of the trades. But I don't know, maybe in this way you could make something that looks more complicated.
-
RE: Delete Pending Orderposted in Questions & Answers
Pending orders can automatically delete themselves after some time, for that check the expiration settings. But you want to delete them when something happens. Well, you probably know that there is a block "Delete pending orders", so you need to make it run when you want. I don't know what is that targeted take profit level, but with "Condition" block you can compare 2 levels very easily.
-
RE: EA check tradesposted in Questions & Answers
In block "Bucket of Closed Trades" you can set two times and find the number of trades closed within that time period.
And here is something fancy, but with running trades - this is how to see the number of trades created (and still working) in the last 24h - https://fxdreema.com/shared/xQ1GK1yJc
-
RE: Divide by zero bugposted in Bug Reports
Well, here is some small example - https://fxdreema.com/shared/O7I9C8GQc I don't have problems with this one
