Errors, bugs, questions - page 2907

 
Igor_Gagarin:

It gives outthe opening time of the position. What was your question?

Forum on trading, automated trading systems and strategy testing

Bugs, bugs, questions

fxsaber, 2020.11.20 09:05

How do I know the time of the last modification of a position/order?
 
fxsaber:

ORDER_TIME_SETUP

If order_time_setup is required.

There is essentially no modification, it is a withdrawal followed by an order_setup.

 
fxsaber:

For positions, there is the POSITION_TIME_UPDATE property - the time of the last position change.

There is no such property for orders in the terminal. But there is one on the server?


Do I understand correctly that the modification of a Limit order on an exchange is a reissue of the Limit order: delete the old one and set a new one?

If so, then modification should change ORDER_TIME_SETUP. However, this is not happening.

I haven't done it either, I had to track the state of orders inside the EA.

They must have simplified it and made one order modifiable in order not to have a pile of orders in history (in the stock version - limit orders),

Apparently, somewhere in MT server a list of orders is attached to the order, or even not attached, only the current one, as "an order is not a deal - it does not matter".

 

To demonstrate the problem of stop and take failures in the limit order tester, I made a simple EA.

#include <Trade\Trade.mqh> 

bool Ok = false;

int OnInit()
{
  return(INIT_SUCCEEDED);
}

void OnDeinit(const int reason)
{

}

void OnTick()
{
  if ( Ok )  return;
  
  MqlDateTime CurrentTime;
  TimeCurrent(CurrentTime);
  
  if ( CurrentTime.hour >= 11 )
  {
    CTrade T;
    
    MqlTick Tick; 
    SymbolInfoTick(Symbol(), Tick); 
    
    T.SellLimit(1, 
      NormalizeDouble(Tick.last + 100, Digits()), 
      NULL, 
      NormalizeDouble(Tick.last + 250, Digits()), 
      NormalizeDouble(Tick.last - 250, Digits()),
      ORDER_TIME_GTC, 0);
    
    Ok = true;    
  }    
    
}


The result for SBRF-12.20 futures - limit triggered, stop and take were set, but at any crossing of stop and take levels stop order execution does not happen. Screenshot attached.

Dear developers, I would really like to get some feedback.


Ludoman77:

Stops and tekes do not work when tested. In the screenshot a Sell Limit worked with set SL and TP, but the stop (and take) does not work wherever the price moved. Where to dig?

Files:
Screenshot_2.jpg  412 kb
 
Igor_Gagarin:

ORDER_TIME_SETUP

If order_time_setup is required.

There is essentially no modification, it is a withdrawal followed by a placement.

The modification does not necessarily imply the opening price of the limit order. It can be a take, expiry, position, etc.

I.e. you need the time of the last successful edit of the position/order properties on the trade server.


Dear developers, is there such a property on the trade server?

 
If a person removes and reinstalls MT5 on the same computer, should they still have the activations for the previous products, provided they have a backup?
 

there are problems when working in the market with descriptions in other languages


 
Vladimir Pastushak:

There are problems when working in the market with descriptions in other languages


I apologise. I may be prying into my own business. Probably ))))

But I've already touched upon this problem a long time ago. I did not get a reasonable answer. An answer like: Everyone in the world writes in English - ridiculous.

On my fingers. I write code. I think in Russian, but I write it in English. Because I know it (English). Then someone else translates my English into another language (in Russian - this is a total bummer!!!) And the result? My lame English (don't tell me everyone in the MQ team is pure English) is translated by the same lame translator.

Why are you surprised by such bullshit? It's one thing to translate the source into other languages, and it's quite another to translate the "translation" ....

Sorry...

 
Please share the code to switch to the correct tab in the Tester window (Parameters, Graph, Log, etc.).
 
The product rating, number of votes and reviews are not shown in the marketplace, although they are inside the description https://www.mql5.com/en/market/
Reason: