See here for how to make the Ordersend work with an ECN broker, or more to the point, how to make EA market ordering compatible with all brokers. WHRoeder has lots of posts on this too, and his code helped me heaps. Search for OrderSend and ECN broker.
one have to place the order without SL nor TP and later add them through an ordermodify() function.
I think Alpari is a special case, they let you set SL and TP when you place an order . . they are not a typical ECN broker.
You need to add some debugging to your code to determine what exactly is not working . . . do the orders fail or does the code simply not try to place them ? you need to trap all errors and react accordingly . . do you gate any errors in the Experts tab ?
Sorry hadn't noticed the format of the ordersend, sorry. You'll have to ask someone else about Alpari. I know people use it to stress test there EA's as the Demo is very unreliable. I do use FXCM, and my order goes through with the code you have seen on that post. As RaptorUK has said, add in some error checking, or check out the EA journal and post what the error actually is that is being returned. If there is not an error in the journal tab, then check the log file in mt4->experts->logs. I've had a situation that if the journal sees too many entries too quickly it misses some of them in the journal tab, but all of them are written to the log file.
guys,, all of you talking about coding...
would you give me advice... where i can learn (at least) basic coding for mt4???
i have my own strategy but i am blind about coding.. is there any website that help use to make EA with visual?? so, i no need to learn about coding??
(sorry.. a little bit run from the topic) but.... i want to learn... i am so late.. i just know this great EA information from here... so.. i need to learn fast.. :)
thank you :)
guys,, all of you talking about coding...
would you give me advice... where i can learn (at least) basic coding for mt4???
Here: https://book.mql4.com//
Here: https://docs.mql4.com//
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Currently I am evaluating two forex companies.
some parts of the script did not perform the same (or at all) as it was with Alpari demo.
As far as I understood, they needs some sort of intermediate between my MT4 and their trading system.
James