Reply

Bug or problem on my VPS lagging?, i got a lot of terminals and EAs working on my VPS but sometimes SL+TP not set on the order?, why?

24 replies

Karish

Customer, bbp_participant, community, sq-ultimate, 443 replies.

Visit profile

8 years ago #114929

Bug or problem on my VPS lagging?, i got a lot of terminals and EAs working on my VPS but sometimes SL+TP not set on the order?, why?

 

is it because of my VPS lagging?, or there is something wrong with the mql4 code?, my VPS is on high CPU+MEMORY usage regularly because of the many terminals and EAs working,

maybe because of this?..

 

it is very rare but it happened to me the 3rd time already..

 

 

did it happened to somebody here also?.., thanks..

0

mikeyc

Customer, bbp_participant, community, 877 replies.

Visit profile

8 years ago #136043

Are the SL and TP very small (close to the order opening price)?  If so, on an overloaded VPS, by the time the order modify is received by the broker, the price may be below or above the SL/TP.

 

What is the error in the terminal log?

0

Karish

Customer, bbp_participant, community, sq-ultimate, 443 replies.

Visit profile

8 years ago #136045

.

0

Karish

Customer, bbp_participant, community, sq-ultimate, 443 replies.

Visit profile

8 years ago #136078

Are the SL and TP very small (close to the order opening price)?  If so, on an overloaded VPS, by the time the order modify is received by the broker, the price may be below or above the SL/TP.

 

What is the error in the terminal log?

*EDIT, found the error: “trade context is busy”, after i reduced the cpu/ram MT4s, im still getting this error O_O, orders getting executed without the modification of the SL + TP thats the unsafest thing ever.., what should i do?, should i add something to the mql4 code?, or should i add more CPU/RAM to my VPS? but i cannot see that it is the VPS’s problem if the CPU/RAM below 50%..

 

please help!

 

the main thing here is that i think this is an mql4 code problem, because why when the context becomes available after the error, the order still gets no modification and stays naked with no SL + TP….

 

maybe Mark could answer that..?

0

Karish

Customer, bbp_participant, community, sq-ultimate, 443 replies.

Visit profile

8 years ago #136084

Anyone..?, is that only me that experiencing this issue?,

is it an mql4 code bug that when there is a “trade context is busy” error and the SL+TP not modified to the order, why there is no re-trying afterwords?..

 

or should i just change my VPS?:

RAM 2048 ÐœB

2 x Xeon E5-2640 (1500 MHz)

30 GB SSD

Windows Server 2008/2012 (64bit)

 

please comment asap…

0

mikeyc

Customer, bbp_participant, community, 877 replies.

Visit profile

8 years ago #136086

How many EA’s do you have on that one terminal running?

 

I believe there are 8 threads available for each terminal to process orders.

0

Karish

Customer, bbp_participant, community, sq-ultimate, 443 replies.

Visit profile

8 years ago #136087

2 MT4s running, one with 12 EAs, second one with 16, the one with 16 makes those problems, the one with the 12 not even once…,

do you think it is the VPS problem?,

 

is there a way to improve the mql4 code to make it that way that if there is no SL + TP set to an order when it executed and getting that “busy context” error, to RE-TRY and then modify the order again,

that way it will fix this problem IMO..

0

mikeyc

Customer, bbp_participant, community, 877 replies.

Visit profile

8 years ago #136089

There are only a limited number of threads (8 I think it is) per terminal instance.  So if you have 16, and more than half are trying to place or modify orders at the same bar opening, you will possibly get a trade context busy error. 

 

I did send Mark a MQL4 library many months ago called OrderReliable, that has much better error handling and retry logic, but it never made it in to the SQ EA template.

 

Which broker is this context busy error with?

0

Karish

Customer, bbp_participant, community, sq-ultimate, 443 replies.

Visit profile

8 years ago #136092

Thank you for your answer, hope that will be fixed in SQ4,

im with ActivTrades Live & Demo, on the Demo there are 16 windows with EAs and the problems are only there..

the Live running 12 windows but no error msgs what so ever.

 

what do you think i should do…?

0

Karish

Customer, bbp_participant, community, sq-ultimate, 443 replies.

Visit profile

8 years ago #136093

could you paste the code of the order handling that you mentioned please?

paste it here: http://paste.ofcode.org/

then just copy the URL link and paste it here, ill give it a look, thanks..

0

Karish

Customer, bbp_participant, community, sq-ultimate, 443 replies.

Visit profile

8 years ago #136095

I’ve maybe fixed the problem for good with the “sqIsTradeAllowed” function,

it was forgot’n to be placed before modifying an order,

 

To your attention Mark if you see this..

 

 

Ill update this post if it was fixed or not i couple of hours, hopefully it was fixed..

0

mikeyc

Customer, bbp_participant, community, 877 replies.

Visit profile

8 years ago #136098

ActivTrades are a market maker (they trade against you).  You win, they lose money, you lose money, they make money.  Now, since they control the spread and the execution, can you see a conflict of interest there?  First hint is context busy meaning “we think you might win this trade, that will never do old boy”.

 

I’ve never seen a context busy with an ECN broker.  I have seen the error over and over again with market maker brokers however…

 

Something to think about.

0

Patrick

Customer, bbp_participant, community, 424 replies.

Visit profile

8 years ago #136100

ActivTrades are a market maker (they trade against you).  You win, they lose money, you lose money, they make money.  Now, since they control the spread and the execution, can you see a conflict of interest there?  First hint is context busy meaning “we think you might win this trade, that will never do old boy”.

 

I’ve never seen a context busy with an ECN broker.  I have seen the error over and over again with market maker brokers however…

 

Something to think about.

agree, had same issue with MM but ECN works fine

0

Karish

Customer, bbp_participant, community, sq-ultimate, 443 replies.

Visit profile

8 years ago #136101

ActivTrades are a market maker (they trade against you).  You win, they lose money, you lose money, they make money.  Now, since they control the spread and the execution, can you see a conflict of interest there?  First hint is context busy meaning “we think you might win this trade, that will never do old boy”.

 

I’ve never seen a context busy with an ECN broker.  I have seen the error over and over again with market maker brokers however…

 

Something to think about.

 

agree, had same issue with MM but ECN works fine

 

Thank you very much for the information, i will consider that,

however i have did some modifications at the mql4 side of side of things,

i have added and edited the function “sqIsTradeAllowed” before any OrderSend/OrderDelete/OrderModify/OrderClose/OrderCloseBy,

should fix the problem, if not, it is most probably the broker, thank you for your information guys, really appreciate it 🙂

0

Patrick

Customer, bbp_participant, community, 424 replies.

Visit profile

8 years ago #136119

i think mm broker refuse the SL and TP order, it happens when you trade manually very often.

0

mikeyc

Customer, bbp_participant, community, 877 replies.

Visit profile

8 years ago #136120

If the order modify is failing, there should be something in the MT4 journal.

 

Here’s an example:

 

2016.04.01 09:13:54.325    ‘983257’: modification of order #115394117 buy 0.12 GBPUSD at 1.43665 sl: 1.42594 tp: 0.00000 -> sl: 1.42595 tp: 0.00000 failed [Common error]

2016.04.01 09:08:45.168    ‘983257’: modification of order #115394117 buy 0.12 GBPUSD at 1.43665 sl: 1.42593 tp: 0.00000 -> sl: 1.42594 tp: 0.00000 failed [Trade timeout]
 

etc.

 

The bit at the end will tell you why.

0

Viewing 15 replies - 1 through 15 (of 23 total)

1 2