boldtrader » Tue Sep 30, 2014 4:10 am wrote:
Strange.. mine did the same.. but with different pairs.. have 3 nzdusd, 2 nzdjpy, 2 gbpusd, 2 eurnzd, 2 euraud, 2 audusd, 2 audjpy, 2 audchf, and others.. trying to figure out the cause but baffled..
You will be.
'Empty4' is not a humourously affectionate epithet applied to a magnificent piece of software whose magnificence takes our breaths away.
The term is applied because the platform is rubbish whose appallingly bad coding takes our breath away.
CrapTx has a wonderful little trick up its sleeve, no doubt coded deliberately during the days when the market makers, bucket shop owners and CrapperQuotes all slept together. A sent trade appears immediately in our Orders window, so we think it is an actuality.
It isn't. It is a mirage. The trade is not in the platform's memory until confirmation of the trade is returned from the broker's server. The broker can hold this confirmation for a long time.
So, what happens is this: EA finds a trade trigger; it examines the platform's memory and finds no trade already in place; it yells, "Yippee. Let's party" and sends a trade. The receipt back from the broker is delayed, so the trade is not in the platform's memory. The platform receives a tic. EA finds a trade trigger; it examines the platform's memory and finds no trade already in place; it yells, "Yippee. Let's party" and sends a trade. The receipt back from the broker....................................
In our early days, before the dawn of time i.e. the birth of SHF, we would often awake to find an ea had apparently gone berserk and sent dozens of trades within seconds of each other. Guess what? They all went straight into dd and wiped the account. This never happened to me live, but that was just plain lucky.
Genuine brokers such as our own GP and the guys that Bill trades with do not play around like this, but there can still be a delay caused by latency etc - don't think I
actually know what I am talking about here, when talking about technical stuff to do with sending and receiving thigies over the net.
In stepped Matt Kennell with his LibOrderReliable library to replace the usual order sending, closing, deleting and modifying functions that come with CrapQlx. My shells have always included his order sending code, which includes a function to repeatedly check that there has been a receipt returned from the broker's server. I have used this code since before the dawn of time. It has worked flawlessly and seamlessly.
Until now, it appears. Those wretched morons with shit for brains have managed to break this somehow, and I am bloody annoyed. Yet again, we coders have to find a way of making up for a monumental balse-up by those cowboys.
Do me a favour guys: go through your log at the time the trades were sent. Matt's checking code includes lines that sends a message to the log. This one
Code: Select all
Print("Did not find #"+ticket+" in history, sleeping, then doing retry #"+cnt);
is inside a loop that searches the memory for the trade ticket number, so you can imagine the sort of message it prints.
After searching x times, the function sends another message to the log:
Code: Select all
Print("Never found #"+ticket+" in history! crap!");
and gives up. This point has not been reached before.
I think that in view of the multiple trades then we need to get an ea to send us an alert that this has happened and then unload itself. Or maybe sleep for 10 minutes? Any other ideas guys?
Another thing. I am still on Empty4 build 646; don't update to the latest version until you absolutely have to.
Welcome to my world, Bill.

Read the effing manual, ok?
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed
Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.