A user reported a problem with his EA on the mql4 Forum, his EA was running on a EURUSD chart and he was using Bid price to place an order on EURUSD and USDCHF. He explained that it worked on one of his PCs but not the other . . .
It was explained to him that Bid was relative to the chart that the EA was running on so it could not possibly place the order on USDCHF at Bid from a EURUSD chart . . . well it seems that it can.
Try the attached EA on DEMO account on a GBPUSD chart, if your symbol names for EURUSD and USDCHF differ please change them in the EA's Properties>Inputs , leave the Open Price at something daft, like 10,000 or 0.1 or 15, etc . . .
It will only place trades if there are no current trades open . . .
2013.03.20 12:08:39TestBuySell GBPUSD,H1: Buy Order opened, requested price 10000 opened at 1.294 current EURUSD Ask is 1.29397
2013.03.20 12:08:39TestBuySell GBPUSD,H1: open #48266520 buy 0.10 EURUSD at 1.29397 ok
2013.03.20 12:08:38TestBuySell GBPUSD,H1: Sell Order opened, requested price 10000 opened at 0.9447 current USDCHF Bid is 0.94469
2013.03.20 12:08:38TestBuySell GBPUSD,H1: open #48266519 sell 0.10 USDCHF at 0.94466 ok
this is what I get written to my log with the EA on GBPUSD, you can see it placed trades on EURUSD and USDCHF their current Bid/Ask prices and not at the price I requested.
Please let me know what you find.
Thanks
It was explained to him that Bid was relative to the chart that the EA was running on so it could not possibly place the order on USDCHF at Bid from a EURUSD chart . . . well it seems that it can.
Try the attached EA on DEMO account on a GBPUSD chart, if your symbol names for EURUSD and USDCHF differ please change them in the EA's Properties>Inputs , leave the Open Price at something daft, like 10,000 or 0.1 or 15, etc . . .
It will only place trades if there are no current trades open . . .
2013.03.20 12:08:39TestBuySell GBPUSD,H1: Buy Order opened, requested price 10000 opened at 1.294 current EURUSD Ask is 1.29397
2013.03.20 12:08:39TestBuySell GBPUSD,H1: open #48266520 buy 0.10 EURUSD at 1.29397 ok
2013.03.20 12:08:38TestBuySell GBPUSD,H1: Sell Order opened, requested price 10000 opened at 0.9447 current USDCHF Bid is 0.94469
2013.03.20 12:08:38TestBuySell GBPUSD,H1: open #48266519 sell 0.10 USDCHF at 0.94466 ok
this is what I get written to my log with the EA on GBPUSD, you can see it placed trades on EURUSD and USDCHF their current Bid/Ask prices and not at the price I requested.
Please let me know what you find.
Thanks
Attached File(s)
TestBuySell.mq4
3 KB
|
282 downloads
20 pips a day isn't too much to ask . . .