NeoTrader wrote:Hi Steve,
me again...
Still in the Process of making the documentation and getting to grip with your Shell EA
I tumbled over something that I think you should look at.
ModifyOrder()
Your ModifyOrder() Function never reports back if the modify was successful or not...it only creates an Error Report.
This means that SendSingleTrade() can create an order and if the crim is an ECN and the ModifyOrder fails you would have an open Order without SL/TP set.
Wouldn't it be better to define ModifyOrder as bool and send a true/false back if it was successful or has failed? And repeat the Modify Process till it succeeds?
Or did I miss something?
happy trading,
NeoTrader
-
Welcome to the warped and twisted world of Crapql4 order sending - my world.
What if the ordermodify continues to fail? What if continued, unlimited attempts to modify the order sets up unforeseen memory problems that cause an endless loop, platform freeze or computer crash?
Is this possible? I do not know, but I tell you this: we are relying on a combination of Crapdows os, Empty4 and Crapql4. Is the sort of scenario I describe above so unlikely? And how about all the possible combinations this Trio of Woe and Cataclysmic Crap might throw up that we cannot foresee? No idea what they might be, because nobody has foreseen them. Apart from the cowboys who programmed all this rubbish, who have probably built in quite a lot of stuff deliberately to make watertight code almost impossible to achieve.
Those were the questions that raced through my mind when I contemplated the very same problem you raised, back when Matt first produced the code.
InsertStopLoss/TakeProfit are the functions that deal with the prob. They are both called from within CountOpenTrades and insert said thingies when they should be there but are not. Developers just need to be aware that the functions might need adapting to suit the needs of the system.

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.