stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Multi 10:4 Trader EA
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=1619
Page 9 of 160
Author:  MrLong [ Fri Mar 15, 2013 8:03 am ]
Post subject:  Re: Multi 10:4 Trader EA

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.
Author:  MrLong [ Fri Mar 15, 2013 8:04 am ]
Post subject:  Re: Multi 10:4 Trader EA

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.
Author:  MrLong [ Fri Mar 15, 2013 8:11 am ]
Post subject:  Re: Multi 10:4 Trader EA

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.
Author:  slipshod [ Fri Mar 15, 2013 8:43 am ]
Post subject:  Re: Multi 10:4 Trader EA

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).
Author:  MrLong [ Fri Mar 15, 2013 8:44 am ]
Post subject:  Re: Multi 10:4 Trader EA

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.
Author:  fxdaytrader [ Fri Mar 15, 2013 9:13 am ]
Post subject:  Re: Multi 10:4 Trader EA

great, nice to hear :)
Author:  roje [ Fri Mar 15, 2013 9:31 am ]
Post subject:  Re: Multi 10:4 Trader EA

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.
Author:  ernest02 [ Fri Mar 15, 2013 10:10 am ]
Post subject:  Re: Multi 10:4 Trader EA

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

Can anyone help?
Author:  matt_32 [ Fri Mar 15, 2013 10:39 am ]
Post subject:  Re: Multi 10:4 Trader EA

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:
Author:  mfriel [ Fri Mar 15, 2013 10:49 am ]
Post subject:  Re: Multi 10:4 Trader EA

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.
All times are UTC Page 9 of 160