xr86yp295m Forex Leader: 2010

I'm still here!

March 28, 2010

Just to answer the numerous emails I've been getting - don't worry, I'm still around! I just thought I was repeating myself over and over again, saying the same thing all the time (which is that the system works) and didn't want to bog down the blog (bog a blog lol!) since it was beginning to get pretty long.

So, yeah things are still moving. Last week was a very even one, either way. It's now about an hour before markets open although it's 5 minutes till 17:00 EST because Europe hasn't changed the time to Daylight Saving Yet (remember my broker is in Europe).

Here's a nice screenshot of EURUSD behaving itself perfectly last week. Notice first the short, then profit taking, then entering the long which is also in profit. Let's see how the next week turns out.

Happy trading!

From Forex Leader

Error messages

February 5, 2009

As a follow-up to a few posts I posted about error messages, and more specifically this one:

http://forexleader-forexleader.blogspot.com/2009/10/new-version-of-ea-error-messages.html

I thought I had written this back in October, but I realized I had actually emailed this explanation to a user instead of posting it. So here it goes:

After using the EA for a couple of days, I could then see that the error was "Invalid Price" (instead of “error no error”). So I emailed the programmer, and here is his reply:

------------
Invalid price usually occurs when the price is too far from the current priceYour change is fairly simple : before determining any Ask or Bid price in the codeFor example : at line 612 of your ea starts a

int subOpenOrder(int type, int stoploss, int takeprofit) function, and it continues like this :
int
ticket = 0,
err = 0,
c = 0;
double
aStopLoss = 0,
aTakeProfit = 0,
bStopLoss = 0,
bTakeProfit = 0;
RefreshRates();
if(stoploss!=0)
{ aStopLoss = NormalizeDouble(Ask-stoploss*Point,4);
bStopLoss = NormalizeDouble(Bid+stoploss*Point,4); }
if(takeprofit!=0)
{ aTakeProfit = NormalizeDouble(Ask+takeprofit*Point,4);
bTakeProfit = NormalizeDouble(Bid-takeprofit*Point,4);
}

With red I marked you a "good position" for refresh rates (since right after that Ask and Bid are used to determine stop loss and take profit - without it it might hold "old" values). Also, in the continuation, you have a following code :

if(type==OP_BUY)
for(c=0;c NumberOfTries;c++)
{ RefreshRates();
ticket=OrderSend(Symbol),OP_BUY,Lots,Ask,Slippage,aStopLoss,aTakeProfit,TicketComment,MagicNumber,0,Green); err=GetLastError();
if(err==0)
{ if(ticket>0) break;
} else
{ if(err==0 err==4 err==136 err==137 err==138 err==146)

//Busy errors { Sleep(5000); continue;
} else //normal error { if(ticket>0) break;
} } } }

Critical point is the Sleep(5000) which means that in the case of an error EA should wait 5 seconds and then retry. The problem is obvious : in 5 seconds the prices could change a lot, so better to place Refresh rates within the loop too (marked it pink this time :))Metaquotes claims that refresh rates should be used after any lengthy operation in order to update values to the current ones. Even then you are going to have situations (like in periods of high volatility, when you are "on hold") that will cause that same error but if you place refresh rates at points like the above point, those errors are going to be rare.

regards

mladen

--------------------------

So I made the modifications in the EA’s code, compiled, and everything was FINALLY fixed. I uploaded the latest version of the EA on my site on December 5, so if you still have either “no error” or “invalid price”, then go get the latest version and follow the instructions in my original post (link at top).

Back from vacation

Hello all!

I'm just back from vacation.

I see there are many new followers, so welcome to you all.

As for the emails, I promise I will respond to each and every email between now and the end of the week.

Happy trading !