[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 219

 

Sorry for the silly question: why the indicator does not display values less than 0.0001?

While I was writing the indicator I decided to check one of the components through the buffer. I don't understand something, but it seems that numbers with 5 decimal places after the point are not drawn (correct me if I'm wrong), ok, let them not be drawn, but will they be considered in the indicator then?

 
ask:

Sorry for the silly question: why the indicator does not display values less than 0.0001?

While I was writing the indicator I decided to check one of the components through the buffer. I don't understand something, but it seems that numbers with 5 decimal places after the point are not drawn (correct me if I'm wrong), ok, let them not be drawn, but will they be considered in the indicator then?

https://docs.mql4.com/ru/convert/DoubleToStr
 
 
Shniperson:
Can you suggest an "Expert Advisor" or a script... which would display in big numbers how many pips and money loss/profit of the current (open) trade and what the balance is... because I can't find it myself.

See here: https://docs.mql4.com/ru/common/Comment Work it out!
 
sergeev:

see GetTickCount... or refer to the Windows function

Thanks for the reply. But I don't really understand how to use it, it returns time from system start (i.e. from its call as I understand it)...

Or should it be called before the tick, then subtract the result?

FileSeek(ExtHandle,0,SEEK_END);

time=GetTickCount();

FileWrite(ExtHandle, TimeToStr(TimeCurrent(), TIME_DATE | TIME_SECONDS),time - GetTickCount(),Bid, Ask, iVolume(Symbol(), NULL, 0));

 

Hello Fellow Members of the Forum!

I'm having trouble with this, can anyone help me out? Thank you in advance. The problem is this. If I want to place a new pending order, I should indicate it in an Expert Advisor. The condition is the time of transformation of the pending order in the market order, i.e., let us have SellStop order, as soon as it becomes a market order, we should open a new SellStop order at a certain distance, etc.

Thank you for your consideration.

P.S. maybe you can advise where to look.

 
Gerkl:

Hello Fellow Members of the Forum!

I'm having trouble with this, can anyone help me out? Thank you in advance. The problem is this. If I want to place a new pending order, in my Expert Advisor, I should specify the condition. The condition is the time of transformation of the pending order in the market order, i.e., let us have SellStop order, as soon as it becomes a market order, we should open a new SellStop order at a certain distance, etc.

Thank you for your consideration.

P.S. maybe you can tell me where to look.

for example this way:

when placing an order you store it in a global variable:

int ticket = 0;

ticket = OrderSend(...);

, and then check whether it opened or not:

if (ticket > 0)
{
   if (OrderSelect(ticket, SELECT_BY_TICKET);        // выбираем ордер
      if ((OrderType() == OP_BUY) || (OrderType() == OP_SELL))     // проверяем его тип
      {
         // действия которые нужно выполнить после открытия ордера
      }
}
 
Thanks for the advice, we'll give it a try.
ilunga:

like this:

When you place an order, you store the order in a global variable:

and then check whether it opened or not:

 
Gerkl:

Hello Fellow Members of the Forum!

I'm having trouble with this, can anyone help me out? Thank you in advance. The problem is this. If I want to place a new pending order, in my Expert Advisor, I should specify the condition. The condition is the time of transformation of the pending order in the market order, i.e., let us have SellStop order, as soon as it becomes a market order, we should open a new SellStop order at a certain distance, etc.

Thank you for your consideration.

P.S. maybe you can advise where to look.


If you can only have 1 SellStop order open, then go through all open orders

while (N<=OrdersTotal())
 {
 SelectOrder(OrdersTotal()-1+N,Select by pos, mode_trades);
 if (OrderType==OP_SELLLIMIT)
  {
  M=0;//типа SELLLIMIT найден
  }else
  {
  M=1;//selllimit не найден
  }
 N++;
 }
if M==1
 {
 OrderSend(...OP_SELLLIMIT...);
 }

Like so, there are a lot of errors - I am in a hurry, I hope you get the point.

 
Can you tell me how to simulate pressing the Home key to quickly load historical data?
Reason: