[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 469

 
Anyone got an answer or what?
 
bikrus13:
How much CPU power or RAM memory does the Expert Advisor need to be able to process the information and work on 52 pairs without any problems?
bikrus13:
Will someone give me an answer?
Or how. The problem conditions do not contain the data that allow us to even estimate the possible result. We can only assume that there will necessarily be problems if we open all charts. And they will be less, if we trade all pairs from one instance of the Expert Advisor (but there will be problems with history loading).
For example, a similar problem: How long will it take to evacuate two settlements and one village from the flood? Given that we do not know the population, the number and type of transport, and the distance of the evacuation?
 
rlx:

The archive doesn't seem to stick. Probably because it's a Rar

Here's the ZIP archive.


Thanks for the help!!! I'll become a millionaire, I won't forget you))
 
Poke me where I went wrong, can't get the data out of the pending order

if (OrdersHistoryTotal() != orto)
 {
int k1=OrdersTotal();
while
(k1>=1)
{
      OrderSelect(OrderTicket(),SELECT_BY_POS, MODE_HISTORY);
if (OrderProfit()>0)
{
if (OrderStopLoss()>0)
{
Alert("ОРДЕР ПРИБЫЛЕН");
Alert("ордер найден ",k1," шт"," общее количество ",OrdersHistoryTotal());
Alert("врямя бара на катором открыт ", Time[k1]," номер тикета ",OrderTicket());
int h=Time[k1];
Alert("профит ордера = ", OrderProfit()," SL ",OrderStopLoss()," TP ",OrderTakeProfit());
k1--;
break;
}
}
}
for (int k = OrdersTotal() ; k>=0; k--)
  {
   OrderSelect(k, SELECT_BY_POS, MODE_TRADES);
Alert("ОБЩЕЕ КОЛЛИЧЕСТВО ОТКРЫТЫХ И ОТЛОЖЕННЫХ ",OrdersTotal()," вид ордера ",OrderType());
int h1=Time[k];
if (h==h1)
{
Alert("ОРДЕР НАЙДЕН закрываем ",OrderTicket()," SL ",OrderStopLoss()," TP ",OrderTakeProfit()," time ", Time[k]);

//==================================================================================
//здесь не могу вытащить из найденого ордера не чего кроме Time
//данные из журнала
//2011.06.26 12:15:07    2011.06.24 03:00  555 EURUSD,M5: open #2 sell limit 0.30 EURUSD at 1.4290 tp: 1.4275 ok
//2011.06.26 12:15:07    2011.06.24 04:16  555 EURUSD,M5: Alert: ОРДЕР НАЙДЕН закрываем 0 SL 0 TP 0 time 1308888000
//==================================================================================




OrderDelete(OrderTicket());
}
}
orto = OrdersHistoryTotal();
}
 
OrderSelect(OrderTicket(),SELECT_BY_POS, MODE_HISTORY);
Need
OrderSelect(OrderTicket(),SELECT_BY_TICKET);

or

for(int i = 0; i <totalHistory; i++)
  {
   OrderSelect(i,SELECT_BY_POS, MODE_HISTORY);
  }
 
vik-777:
Poke me where I'm wrong, I can't get data out of pending order


Lots of mistakes. It caught my eye straight away:

The line is wrong:

OrderSelect(OrderTicket(),SELECT_BY_POS, MODE_HISTORY);

Where you select by ticket, you should not only specify that the selection is by ticket, but also, after a successful selection, check the closing time of the order. If it is greater than zero, the order is selected from closed orders. Necessary:

OrderSelect(OrderTicket(),SELECT_BY_TICKET);

After this line, we should check for OrderCloseTime()>0 If the condition is true, the order is selected from the array of closed orders; if it is false, the order is still in the market

... But ... a closer look at your code reveals this:

You are trying to select an order by its ticket, using a standard function OrderTicket() ... And this function returns the ticket of the already selected order. And where in your code is it selected?

----------------------

A word of advice: search the history of closed orders using an index, rather than a ticket.

Once you have found the desired order, check the data you need.

And when you look at your code in even more detail, it seems that you don't understand what you want to achieve at all.

The alerts tell you (in their meaning) about the current market situation... And you are trying to select something out of orders that have already been executed and closed.

Describe your task clearly.

 
artmedia70:

Lots of mistakes. It caught my eye straight away:

The line is wrong:

Where you select by ticket, not only must you specify that the selection is by ticket, but also, after a successful selection, you must check the closing time of the order. If it is greater than zero, the order is selected from closed orders. Necessary:

After this line, we should check for OrderCloseTime()>0 If the condition is true, the order is selected from the array of closed orders; if it is false, the order is still in the market

... But ... a closer look at your code reveals this:

You are trying to select an order by its ticket, using a standard function OrderTicket() ... And this function returns the ticket of the already selected order. And where in your code is it selected?

----------------------

A word of advice: search the history of closed orders using an index, rather than a ticket.

Once you have found the desired order, check the data you need.

And when you look at your code in even more detail, it seems that you don't understand what you want to achieve at all.

The alerts tell you (in their meaning) about the current market situation... And you are trying to select something out of orders that have already been executed and closed.

Describe your task clearly.


i appreciate the tip, i am a beginner in this business.

The idea is to open a sell order at 1.4000 sl 1.4030 tp 1.3985.

after successfully open a sell order, open a selllimit order with the following parameters: price 1.4030 sl 1.4080 tp 1.4015

here is the problem: if my order is closed at tp 1.3985 then selllimit should be deleted

Please let me know if this is the right move

in the sell order close field I search the history for the last closed order, find out what time it was opened and then search for a match in the pending orders if it is found then delete the order

 
What is the working principle of Auto-profit advisor in brief and where is it described on the forum? I'm not sure how it works.
 
yosuf:
What is the working principle of Auto-profit advisor in brief and where is it described on the forum? I can't find a description of it on the forum.

You have been warned for posting a decompiled EA.
 

Good day!

I often see some mention in forums about debugging EAs using optimization. I have run them in the tester with the optimization mark a couple of times but I did not see any tangible results.

Please advise on where to read more on how to use this optimization.

I would really appreciate it.

Reason: