hi!
I'm also facing this issue when using the EA in WDO (Dollar index) in Brazil.
@eks , did you find any solution for this?
hi!
I'm also facing this issue when using the EA in WDO (Dollar index) in Brazil.
@eks , did you find any solution for this?
Hi guys!
I want to calculate the separately the profits for the current day, current week and current month.
I've tried using "bucket of trades" but it doesn't have these kind of separation.:

I believe that I need to calculate using "Check Profits" or something like that.
But how can I calculate the current week or month without using the "last 7 days" or "last 30 days" .
Thanks in advance!
@roar Yeah... you are right, my friend.
But... who knows! lol
I'm studying and trying to find a way to do it... let's see!
Thanks for your reply!
@roar I'm not sure what separate one from another. lol
Since it is a MQL5 library, is completly possible to use it with fxDreema, I guess. And that's my question
@l-andorrà Hi!
I meant "website" as it really is. I need to connect the EA to a website that store all allowed accounts numbers. So, the EA will only check if the account number is allowed to trade or not
Hi!
I want to connect my EA with an external server (web site) and check if the trading is allowed to that specific account.
how to do it?
Thank you!
@roar I've found this way, but I didn't tested yet as it works like the traditional expiration time from pending order.
I'll test it and compare. Let's see how it will behave...
@roar Hmm.. You are right.
I'm testing my EA with the "Candle Expiration" method (I've used some similar as @l-andorrà posted) and I'm getting different and worse results.
But there is some markets as brazillian stock market that do not allow the use of "time expiration" . I'm not sure how they manage pending orders, but the "candle expiration" method can solve it.
I'll keep testing.
Thanks for your reply!
Hi!
Does anyone used the MQL5 library "ALGLIB" which allow the EA"self optimize" ?
Hi, @l-andorrà !
Thanks for your reply!
This is an interesting way to control the number of candle and I'm not aware about the "variables" and "constants" as you used in the blocks:

How you guys call it? I'll search in the forum for more details.
Hi!
I want to check the age of a pending order and delete it after X candles for the Y time frame.
The block just allow to use it as time format.
And under the same subject : How set the expiration of a pending order after X candles?
these are just two different ways to do the same thing. But for some brokers, I believe that we must use "check age" block instead "expiration" .
In this case it will only calculate the initial lote size, right?
I mean, it will calculate the lote size based on something as stop loss size.
The issue is when you try to partial close an odd lote size.
@l-andorrà Yes, that's right.
I'm doing this with one of my EAs. Like this:
https://fxdreema.com/shared/BhC5kekB
This is only the Partial close side.
@kmfoster79 You need to use the function "Normalize" for the lot to be closed.
Ex: You have the variables as LotSize, Lot1_Close.
Then you will calculate the size of the Lot1_Close based on a % of the LotSize.
Let's say that Lot1_Close will close 50% of the LotSize, that in that example is 0.05.
So 50% of 0.05 would be 0.025, but it's not possible. You need to use it that code to get the correct lot that would be 0.03.
"Lot1_Close = NormalizeDouble(Lot1_Close,2)"
@kmfoster79 You will need to normalize the lot size for de the partial close.
@pabuccuemre Did you set any expiration datE?
Hi, guys!
I've build an EA which works fine in most of forex brokers. I'm trying to run the same EA with a brazillian broker and local market. But only with these local brokers I've got the "Array out of range"error in the following segment :
MT5 Error
public: /* The main method */
virtual void _execute_()
{
// this is static for speed reasons
bool next = false;
string token = Symbol + IntegerToString(Period);
int index = ArraySearch(tokens, token);
if (index == -1)
{
index = ArraySize(tokens);
ArrayResize(tokens, index + 1);
ArrayResize(old_values, index + 1);
ArrayResize(passes, index + 1);
/*.This is the 685 line. The error happens right here on this line*/
tokens[index] = token;
passes[index] = 0;
old_values[index] = 0;
}
if (PassMaxTimes > 0)
{
CopyTime(Symbol, Period, 1, 1, time);
datetime new_value = time[0];
if (new_value > old_values[index])
{
passes[index]++;
if (passes[index] >= PassMaxTimes)
{
old_values[index] = new_value;
passes[index] = 0;
}
next = true;
}
}
What can cause this error in one broker and not to others?