Errors, bugs, questions - page 2110

 

Can you tell me how to implement a message to open and close an order once ?

So far I have implemented active orders ... Goes in the flow and shows the opening of the order.

    for(int i=0; i<OrdersTotal(); i++) {
      if(OrderSelect(i, SELECT_BY_POS) && (OrderType()==OP_BUY  || OrderType()==OP_SELL)){
      Print("Открытий ордер: " + OrderTicket());
      }
     }
 
Itum:

Can you tell me how to implement a message to open and close an order once ?

So far I have implemented active orders ... Goes in the flow and shows the opening of the order.

It would be correct to do this directly in the open and close function. For example, when the result of the opening and closing is returned. If the ticket is returned successfully, the print would be output in the log.
 
Itum:

Can you tell me how to implement a message to open and close an order once ?

So far I have implemented active orders ... It goes in the flow and shows the opening of the order.

Memorise the status and compare the current status with the memorised status.

 
Vladislav Andruschenko:
It would be correct to do this directly in the open and close function. For example when returning the result of opening and closing. If the ticket is returned successfully, output a print to the log.
What if the orders are opened manually ?
 

==

mt4, build 1090, alpari

and possibly higher


in visual testing mode,

NOT removing indicators from list...


you click on something is jerking

and icons in the list are in place ...


what is the problem ?

 
Itum:
What if you open orders manually?


No, if it's a timer, it's more likely to be an auto-trade

 
Compilation error
class A;

bool a = A::Method(0); // 'A' - struct undefined
// bool b = A::Method(); // Полно ошибок

class A
{
public:
  static bool Method( int )
  {
    return(true);
  }
  
  static bool Method()
  {
    return(true);
  }
};
 

What can it be ?

The indicator does not unload for 5-10 minutes

Even if I close the chart and open a new one, the indicator works on the new chart, but it's not in the list of indicators...


Checked it, there is no looping...

 
Vladimir Pastushak:

What can it be ?

The indicator does not unload for 5-10 minutes

Even if I close the chart and open a new one, the indicator works on the new chart, but it's not in the list of indicators...


I checked it, it does not loop...


How much memory does it eat?

if you open Task Manager before adding an indicator to a chart and monitor terminal64.exe memory

then load the indicator and see the difference, if it increases by a gig, it is quite possible that it does not unload immediately.

 
Oleg Tsarkov:

how much memory does it eat up?

if you open task manager before adding the indicator to the chart and monitor the memory of terminal64.exe

then load the indicator and see the difference, if it increases by any gig, it is quite possible that it does not unload immediately.


All within normal limits...