[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 959

 

Help, people, I am at a loss, how do I choose in the active list (not from the history) it is that order with so that the magician?

The thing is that I always have 8-12 warrants with different mages in the list


hh=OrdersTotal();
for(i=0; i<hh; i++)
{if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
if(OrderMagicNumber()==mg)

cc=i;}

this is my non working consideration)))

 
gheka:

Help, people, I am at a loss, how do I choose in the active list (not from the history) it is that order with so that the magician?

I always have 8-12 warrants with different wizards in the list


hh=OrdersTotal();
for(i=0; i<hh; i++)
{if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
if(OrderMagicNumber()==mg)

cc=i;}

this is my non working consideration))))


If you want to fix it, it's like this:

hh=OrdersTotal()-1;
 for(i=hh; i>=0; i--)
 {if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) 
 if(OrderMagicNumber()==mg)

 cc=i;}

only the cc=i line is unclear ????

if you want to memorize the order, it is not sure that on the next tick it will be with this number in the list of market orders, you should memorize the order's ticket

 
IgorM:


if this is to be corrected, it should be like this:

only the line cc=i ???? is unclear

if you want to memorize the order, it is not guaranteed that on the next tick it will have the same number in the list of market orders, the order ticket should be memorized

so how? instead of cc=i; should i do cc=OrderTicket ?

I just want to close one order with so-and-so the magician

 
gheka:
So, how? instead of cc=i; I should make cc=OrderTicket ?


I guess I don't know what you want, but keep in mind that the ticket numbers might change too, but if you search for your order, remember its ticket, and make the necessary actions with the order, I think everything will work out,

Usually all manipulations with the required order are done in one loop - by calling the necessary functions

check this branch https://www.mql5.com/ru/forum/107476/page49, there is a lot of interesting stuff there

 
IgorM:


I do not know what you want, but note that the ticket numbers may also change, but if you look for your order, remember his ticket, and made the necessary actions with the order, I think it will work,

Usually all manipulations with the required order are done in one loop - by calling the necessary functions

check this thread https://www.mql5.com/ru/forum/107476/page49, it has a lot of interesting stuff

Anyway, here you go,

if (pb>MA_3&&Fact_Up==true)
{
Fact_Dn = true;
Fact_Up = false;
int hh=OrdersTotal()-1,i;
for(i=hh; i>=0; i--)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
{
if(OrderMagicNumber()==mg_3)

int cc=OrderTicket();
}
}

OrderClose(cc,Lots_3,pa,3,Green);

}


Some orders are not closed for some reason, in the account history I looked that four days ago some was open,

only closed it today???????????? though it should have closed earlier

i tried to close a position with a magik that was below the MA when it crossed above the MA

what is my problem here?

 

Good afternoon !

Can you please increase speed of strategy tester in MT4: it takes 5-7 minutes per month, and even longer for more years ? Processor 4.4 GB (two cores 2.2 GB) during testing is loaded up to 95%, memory - 4 GB - up to 55%.

 
volshebnik:

Good afternoon !

Can you please increase speed of strategy tester in MT4: it takes 5-7 minutes per month, and even longer for more years ? Processor 4.4 GB (two cores 2.2 GB) during testing is loaded up to 95%, memory - 4 GB - up to 55%.


It's possible to optimize EA for faster operation, but tester ... don't know
 

And how is it that the EA's tester, with completely different parameters, has completely the same results in many lines, and vice versa, with minimally different parameters radically different results!? For example

pass profit total profitability expectation drawdown% drawdown
trades

1901 58632.60 128 1.58 458.07 9289.02 32.57% BandsPeriod=22 BandsDeviations=3 Lots=3.9 TakeProfit=92 stoploss=31 i=1 BandsShift=0

1903 58632.60 128 1.58 458.07 9289.02 32.57% BandsPeriod=23 BandsDeviations=4 Lots=3.9 TakeProfit=92 stoploss=31 i=1 BandsShift=0

1905 58632.60 128 1.58 458.07 9289.02 32.57% BandsPeriod=17 BandsDeviations=4 Lots=3.9 TakeProfit=92 stoploss=31 i=1 BandsShift=0

1906 58632.60 128 1.58 458.07 9289.02 32.57% BandsPeriod=33 BandsDeviations=4 Lots=3.9 TakeProfit=92 stoploss=31 i=1 BandsShift=0







 
Alexandr24:
Please tell me why the indicator is not updated datetime some_time=iTime(NULL,PERIOD_H1,0); it's shifted from the current bar 0, but the indicator is updated only if you press compile - how to make it self-calculated?


Well, the third time you read your post, you'll get an answer for sure! ;)

Although the telepaths are on holiday, I suspect that part of their ability to see the code without the code itself is transferred to me :)

OK, I'm done with the lyrics, in fact:

1. where's the code?

2. I suspect that the problem area lies in the init() function

 

Hello all.

Question: is it possible to change deviation parameter in bolinger_bands_stop indicator to non integer numbers (e.g. 0,38)

I do not know the code, if anyone can help

Files: