molanis.com/forum - Tools for MetaTrader : The place to ask about the best expert advisor builder, expert advisor downloads, and expert advisor programming http://www.molanis.com/forum/ |
|
Just Exit EA does not work with pending orders http://www.molanis.com/forum/viewtopic.php?f=6&t=6118 |
Page 1 of 1 |
Author: | AlexHue [ Sat Feb 07, 2015 3:22 pm ] |
Post subject: | Just Exit EA does not work with pending orders |
Hi, my name is Alex Hue and I'm new here in the forum. I trade for a few months mainly with demo accounts, and trying here to find a profitable and robust system. The route via Molanis is a very interesting for me. Here I have a little problem at the moment. I'm programming an EA for exits. I go in the market by a pending order, for example a Buy Stop or a Sell Stop. If I let the EA now run and buy or sell order is triggered, the EA does not work anymore. In short: The EA for just for exits works when I'm placing an order directly into the market (as I put the Magic numbers = 0). The EA does not work if I place the order as pending orders in the market. Can anyone help? With best regards, Alex |
Author: | admin [ Sun Feb 08, 2015 10:58 am ] |
Post subject: | Re: Just Exit EA does not work with pending orders |
You need to check the magic numbers for pendings that turn into market orders. I think market orders have a 0 magic number, so to close your manual orders with an ea you need to set the magic number to 0. If the pendings do not have a magic number of 0, you need to do something custom to close those orders |
Page 1 of 1 | All times are UTC - 5 hours |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |