Problem with order enrty

Section for discussions related to indicators, use of indicators, and building of trading stategies using indicators.

Moderator: admin

Problem with order enrty

Postby gonzteppenwolf » Thu Feb 22, 2018 5:05 pm

I'm using the following strategy (attached) and it is supposed to open a new order whenever it closes tha last one. The problem is that I get the following error unsystematically (image attached) and the following order in the opposite direction is not opened. As I mentioned, does not happen all the time.

It reads: "Order failed. Trading activity delayed while Net Quantity order XXXXX is pending".

Any help will be appreciated, thanks !
Attachments
EMA_5min_GBP_ALGO.lua
(14.78 KiB) Downloaded 935 times
image.png
gonzteppenwolf
 
Posts: 8
Joined: Tue Jan 30, 2018 2:07 pm

Re: Problem with order enrty

Postby Apprentice » Thu Mar 01, 2018 6:28 am

The code is fine. This can happen when the server didn't manage to close all positions in time and received the order for the next trade (exit+entry commands). This can be repeated almost in all strategies which close all opened trades before opening a new one (valuemap.NetQtyFlag = "Y";)
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Problem with order enrty

Postby gonzteppenwolf » Thu Mar 01, 2018 2:42 pm

I changed the code a bit and based it on the code of a different strategy that did not pop-out that error. Got it solved. However, I'm really glad to know the actual origin of the problem. Thanks for the help, this is truly useful. Cheers!
gonzteppenwolf
 
Posts: 8
Joined: Tue Jan 30, 2018 2:07 pm


Return to Discussions

Who is online

Users browsing this forum: No registered users and 5 guests