molanis.com/forum - Tools for MetaTrader : The place to ask about the best expert advisor builder, expert advisor downloads, and expert advisor programming

AFTER YOU REGISTER SEND US AN EMAIL TO ACTIVATE YOUR ACCOUNT - Before posting:-1- Please read the user guide -2- Try the examples -3- Search in the forum
It is currently Sat Apr 27, 2024 4:14 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Just Exit EA does not work with pending orders
PostPosted: Sat Feb 07, 2015 3:22 pm 
Offline

Joined: Thu Jan 29, 2015 1:15 am
Posts: 1
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


Top
 Profile  
 
 Post subject: Re: Just Exit EA does not work with pending orders
PostPosted: Sun Feb 08, 2015 10:58 am 
Offline
Site Admin

Joined: Fri Oct 16, 2009 3:40 pm
Posts: 451
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by Molanis © 2009