Multi 10:4 Trader EA

Post Reply
MrLong

Re: Multi 10:4 Trader EA

Post by MrLong »

slipshod wrote:Hi Andy, great work - I'm going to try this out on demo simply because it looks so awesome :)

One thing I noticed immediately was a continual stream of the following error:-
Multi_10_4_EAv1.06 USDJPY_H4: invalid price for OrderSend function

Might I suggest adding the following three lines of code early in the SendSingleTrade function? The error went away once I inserted these & a slew of pending trades were created.

Code: Select all

	price = NormalizeDouble(price, Digits);
	stop = NormalizeDouble(stop, Digits);
	take = NormalizeDouble(take, Digits);
Also, what timeframe should this be run on, or does it not matter?
Thanks, I have a look at this later, you can sit the EA on any timeframe.
MrLong

Re: Multi 10:4 Trader EA

Post by MrLong »

allisonmagic wrote:one good thing to add that i noticed it wasn't doing.. is when price moves against your pending, level after level, it should modify your pending up or down 1 level for every level price goes against you. up until it crosses the MA, then just close and recalculate. I've had to manually check these and update the pending orders every 8 to 16 hours
will look at adding to the EA later.
MrLong

Re: Multi 10:4 Trader EA

Post by MrLong »

I'll be working on the EA later today and hopfully fix a few of theses bugs.

Members having problems with the borders, can remove them by this switch:

extern bool displayBorders =false;// Remove borders from the EA.
User avatar
slipshod
Trader
Posts: 404
Joined: Tue Dec 27, 2011 9:14 am
Location: Australia

Re: Multi 10:4 Trader EA

Post by slipshod »

I added a few debugging lines to see what trades its trying to take, and am seeing it trying to open a sell on EURAUD at the price -0.0004, which is predictably failing.

It also tried a Buy Stop on AUDCAD at 1.0604 with a TP at 1.0599 (less than the entry price), and similar TP errors on EURUSD and GBPAUD.

(I've got Stealth turned off, as I can't run a computer 24 hours a day).
Last edited by slipshod on Fri Mar 15, 2013 11:06 am, edited 2 times in total.
MrLong

Re: Multi 10:4 Trader EA

Post by MrLong »

slipshod wrote:
fxdaytrader wrote:No, instead of using NormalizeDouble you should use the following (see HERE for further explanation):

Code: Select all

//Open price for pending order must be adjusted to be a multiple of ticksize, not point, and on metals they are not the same.
//see also http://forum.mql4.com/45425#564188
double NormalizePrice(double p){
  double ts = MarketInfo(Symbol(), MODE_TICKSIZE);
 return(MathRound(p/ts)*ts );
}
;)
Even better ... thanks! Actually my "solution" would have been wrong anyway, as the "Digits" would have related to whatever pair you're running the EA from rather than the pair being traded.

Edit: The EA needs the symbol passed into it, hence the function would need to be...

Code: Select all

double NormalizePrice(string symbol, double p)
{
   double ts = MarketInfo(symbol, MODE_TICKSIZE);
   return(MathRound(p/ts)*ts );
}
and therefore its calls from SendSingleTrade() ...

Code: Select all

price = NormalizePrice(symbol, price);
stop = NormalizePrice(symbol, stop);
take = NormalizePrice(symbol, take);
Thanks, no more errors while sending XAU

Disclaimer: I'm too busy right now to see if this actually works.
Thanks, no more errors while sending XAU.
User avatar
fxdaytrader
Trader
Posts: 190
Joined: Sun Jun 10, 2012 7:03 am
Location: Poon-Town (germany, se-asia, se-europe) ...

Re: Multi 10:4 Trader EA

Post by fxdaytrader »

great, nice to hear :)
roje
Trader
Posts: 23
Joined: Sun Feb 24, 2013 6:46 pm

Re: Multi 10:4 Trader EA

Post by roje »

Fantastic way to traders heaven !
Can this EA add more lot after achieve next level (for example WMR) ? Or after specified number of pips ? And after that set SL to BE for both trades ... ?
If not - it could be great to set number of pips for each level (and may be for each pair) and after that set SL to BE or BEP.
ernest02
Trader
Posts: 28
Joined: Tue Jan 29, 2013 11:04 am

Re: Multi 10:4 Trader EA

Post by ernest02 »

I have loaded the EA and am getting an interesting screen full of unexplained characters.

Can anyone help?
You do not have the required permissions to view the files attached to this post.
User avatar
matt_32
Trader
Posts: 204
Joined: Tue Apr 03, 2012 8:51 am
Location: Crete, Greece

Re: Multi 10:4 Trader EA

Post by matt_32 »

ernest02 wrote:I have loaded the EA and am getting an interesting screen full of unexplained characters.

Can anyone help?

Same here!..... Looks like a horoscope :lol:
"Wise men speak because they have something to say; Fools because they have to say something." - Plato 347 BC
mfriel
Posts: 1
Joined: Sun Apr 22, 2012 1:50 pm

Re: Multi 10:4 Trader EA

Post by mfriel »

Hi, keep changing time frame 5min 1H, weekly ect and it should load! Mine works on weekly time frame! Hope that sorts it!

Cheers,

Mike.
Post Reply

Return to “Nanningbob 10.x”