Multi 10:4 Trader EA
-
Dewey McG
- Trader
- Posts: 435
- Joined: Sat Nov 26, 2011 4:20 pm
- Location: Tampa FL
Re: Multi 10:4 Trader EA
Same problem here
- slipshod
- Trader
- Posts: 404
- Joined: Tue Dec 27, 2011 9:14 am
- Location: Australia
Re: Multi 10:4 Trader EA
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.
Also, what timeframe should this be run on, or does it not matter?
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
Edit: fxdaytrader's solution below is much better
Last edited by slipshod on Fri Mar 15, 2013 8:18 am, edited 1 time in total.
- Sojourner
- Trader
- Posts: 105
- Joined: Fri Apr 27, 2012 7:36 pm
Re: Multi 10:4 Trader EA
This is so frikken awesome! Great work! 
-
Bader
- Trader
- Posts: 20
- Joined: Fri Mar 23, 2012 8:46 pm
Re: Multi 10:4 Trader EA
Thanks Andy - fantastic work
-
danny_pip
- Trader
- Posts: 15
- Joined: Thu Dec 08, 2011 8:48 pm
Re: Multi 10:4 Trader EA
Mr Long, this looks really great; I'm going to test it right now !
I'm really surprised by the interface. Great work !!!!
Thanks and god bless you !
I'm really surprised by the interface. Great work !!!!
Thanks and god bless you !
- 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
No, instead of using NormalizeDouble you should use the following (see HERE for further explanation):slipshod wrote: 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);
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 );
}- slipshod
- Trader
- Posts: 404
- Joined: Tue Dec 27, 2011 9:14 am
- Location: Australia
Re: Multi 10:4 Trader EA
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.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 ); }
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 );
}Code: Select all
price = NormalizePrice(symbol, price);
stop = NormalizePrice(symbol, stop);
take = NormalizePrice(symbol, take);
Last edited by slipshod on Fri Mar 15, 2013 8:37 am, edited 2 times in total.
-
MrLong
Re: Multi 10:4 Trader EA
I can only think the trade was taken with strealth turned on and then switched off while the trade had been sent. The stealth switch needs to be on to manage the trades.allisonmagic wrote:ok so, the MM on this thing is kinda buggy.. price hit the 240 and never closed my trade.. that was my SL..
-
MrLong
Re: Multi 10:4 Trader EA
Likely a broker problem.philcs65 wrote:I am having the same problem with OrderSend function.
"2013.03.14 22:18:31 Multi_10_4_EAv1.06 AUDCAD,H4: invalid price for OrderSend function"
Running on a Cowboy IBFX (us) demo account. I have tried std and micro account without success.
Using OTB settings except changing magic number from "0".
- slipshod
- Trader
- Posts: 404
- Joined: Tue Dec 27, 2011 9:14 am
- Location: Australia
Re: Multi 10:4 Trader EA
MrLong, in case you missed them, the posts by myself and fxdaytrader provide code snippets that fix the "invalid price for OrderSend" error.