Are you insane?
Are you
seriously suggesting that code provided by one of the best and most respected coders on the planet, and that has been used thousands of times in as many ea's and scripts' has a
bug?
Jesus wept buckets of blood.
Again.
Get a grip fella, and go back to silently lurking. Leave the coding to the Big Boys - it is what I do when they get involved. They have forgotten more about this stuff than you or I will ever know.
And learn to read the damn comments in my code. Doing so here would have saved you from my wrath.
Profitiser wrote:Hi Steve,
there seems to be a bug in your "Shell auto trading robot code by Steve Hopwood".
The function "ModifyOrder" should be changed to:
void ModifyOrder(int ticket, double stop, double take){
...
for (int cc = 0; cc < RetryCount; cc++){
// delete: for (int d = 0; (d < RetryCount) && IsTradeContextBusy(); d++) Sleep(100);
if (take > 0 && stop > 0) {
while(IsTradeContextBusy()) Sleep(100);
if (OrderModify(ticket, OrderOpenPrice(), stop, take, OrderExpiration(), CLR_NONE))
return;
}//if (take > 0 && stop > 0)
if (take != 0 && stop == 0)
{
while(IsTradeContextBusy()) Sleep(100);
if (OrderModify(ticket, OrderOpenPrice(), OrderStopLoss(), take, OrderExpiration(), CLR_NONE)) return;
}//if (take == 0 && stop != 0)
if (take == 0 && stop != 0)
{
while(IsTradeContextBusy()) Sleep(100);
if (OrderModify(ticket, OrderOpenPrice(), stop, OrderTakeProfit(), OrderExpiration(), CLR_NONE)) return;
}//if (take == 0 && stop != 0)
}//for (int cc = 0; cc < RetryCount; cc++)
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.