Errors, bugs, questions - page 989

 

No, all machines are individual. Even the axes are licensed, from grusha to WS. I have a sense of presumption of guilt... I'm gonna have to make excuses... Justify myself... Logs, this and that...

Selling more lock agents than cores should be outlawed and that's it!

 
muallch:

...

And putting more lock agents than cores should be banned by law, that's all!

It's logical in general.
 

Good afternoon. I have a question for the developers. The ideal transaction generation cycle consists of the following steps:

1.Sending a request via OrderSend() followed by checking that the method returned true and correct retcode.

2.Next, you need to track the request's passage on the server via OnTradeTransaction(). This handler is very handy and gives full control over the process.

But we live in the real world and for example because of connection failure or simply because transaction was "lost on delivery" we may not wait for transaction like TRADE_TRANSACTION_REQUEST. Thus, the waiting cycle will become endless and it will be impossible to determine whether the transaction has completed on request or not.

Is there any BACKGROUND procedure for handling such emergencies with unambiguously obtaining a logically correct process completion for any force majeure? For example, if we don't wait for TRADE_TRANSACTION_REQUEST within 20 (or 30 or 40) seconds, then we switch to a slower but correct algorithm, namely: we compare the current symbol volume with the volume before OrderSend(), search the order history and calculate its status and decide whether to make one more request to open or skip the signal. The task becomes even more complicated for the OrderSendAsync() method: we have to have an accurate criterion of when a certain order hasn't triggered and know when to start applying that criterion. If I understand something wrong, please correct me.


 
M24:

For the OrderSendAsync() method, the task is even more complicated - we need to have an exact criterion for a specific order not to trigger and know when to start applying that criterion. If I understand something wrong, please correct me.

HistorySelectByPosition - in theory, it should help, the id is given when the order is sent.

 
Why can the vertical axis in an indicator disappear along with the display of the indicator? This does not happen in basic indicators, but there is such a problem in the created one. At some horizontal so to speak scrolling and magnifying magnifier values the picture disappears.
 

VanHelsing:

32x Win7 systems have problems with operations with real numbers, on XP it refuses to work when passing values to the"wininet.dll" library.

where in wininet do you pass real numbers?
 
papaklass:

1. Make it a rule to send trade orders on the current tick and check their execution on the next tick. Then you will not have endless loops.

2. When checking the execution of orders given during the previous tick, do not bother with OnTrade()/ OnTradeTransaction(). Check for changes in the state of your account, i.e. work with the source. After all, any trade arrangement is aimed at changing a state of your trading account. So check the change in the state.

3. Depending on the results of testing and make further logic of your robot.

Before you use functions like OnTrade()/OnTradeTransaction(), decide what is more important to you:

a). to achieve opening/closing/modifying of a position at given market conditions;

b) Wasting your time trying to find out the reason why your trade order was not executed, and looking for someone to blame.

Still, I am left with some misunderstanding. If the results of the check on the next tick do NOT show any changes in the position, then what should we do in this case. The reasons for the absence of changes can be quite different. As an alternative:

an order on request was formed on the server, but was rejected for some reason,

the server is overloaded - the execution is delayed,

the connection is lost for some time.

We would like to have an exact criterion for the order not being executed. Binding to time in an asynchronous system doesn't seem very accurate to me and therefore allows for uncertainty. Maybe it makes sense to select the order from the history and check its status, or, as suggested by sion, to use HistorySelectByPosition. I assume that if developers designed this system this way, then there should be "correct" methods of handling such key operations.

 
M24:

We want to have an exact criterion for the order not to be executed

It's already been explained to you that


don't bother with OnTrade()/ OnTradeTransaction().

Work with the source code.

so select the order and check its status
 

Hi all!

How can I make all the contents of the "Experts" tab be overwritten on startup of the script? (Like a cls command), because it can be difficult to distinguish where the print output from the previous start of the script and the current one has ended.

Thanks!!!

 
ns_k:

Hi all!

How can I make all the contents of the "Experts" tab be overwritten when the script starts? (Like a cls command), because it can be difficult to distinguish where the print output from the previous start of the script and the current one ended up.

Thank you!!!

Add the following line to the script deinit

Print("===================== The End ===================")

Reason: