Forex
Google

Go Back   Forex Trading > Metatrader Training > Metatrader 4 mql 4 - Development course > Questions
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-13-2006, 10:14 PM
iboersma's Avatar
iboersma iboersma is offline
Junior Member
 
Join Date: Apr 2006
Posts: 22
iboersma is on a distinguished road
How do I open and close multiple orders for a single account?

Hi,

I would like to learn how to alter a basic EA (say, the Simple MACD) to allow me to place multiple, concurrent orders for a given account. For example, if I want to be able to place an order for each different currency pair and not have any conflicts in terms of the order placing or order closing process.

I believe this has something to do with the OrderSend function and the "magic" parameter, but that's as far as I've gotten.

Any help on this would be great.

Thanks,

Ian
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-29-2006, 01:13 PM
codersguru's Avatar
codersguru codersguru is offline
Senior Member
 
Join Date: Oct 2005
Posts: 987
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Talking Magic Number mystery!

Quote:
Originally Posted by iboersma
Hi,

I would like to learn how to alter a basic EA (say, the Simple MACD) to allow me to place multiple, concurrent orders for a given account. For example, if I want to be able to place an order for each different currency pair and not have any conflicts in terms of the order placing or order closing process.

I believe this has something to do with the OrderSend function and the "magic" parameter, but that's as far as I've gotten.

Any help on this would be great.

Thanks,

Ian
Ian,

I'm writing an article about the Magic Number mystery!
I've quoted your question in the article if you allow me?

Thanks!
CG
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-26-2006, 12:51 PM
automatedtrader automatedtrader is offline
Senior Member
 
Join Date: Mar 2006
Posts: 128
automatedtrader is on a distinguished road
Heres what im wondering about MAGIC...ok i have 2 EAs exactly the same only difference is different take profits and trailing stops..I want to open 1 on EUR/USD and open the other on another chart but it needs to be EUR/USD so basically i have 2 EAs but they are the same they are named differently but the only other difference is take profits and trailing stops...is this possible it would seem with magic they would be... i mean i can manually enter 2 buy orders on EUR/USD even from 2 charts ''even the same chart'' with different settings and the ordertickets are different so it seems it would be possible..or would i have to make each currency an ea with a different MAGIC #

Last edited by automatedtrader : 05-26-2006 at 01:25 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 05-26-2006, 01:04 PM
codersguru's Avatar
codersguru codersguru is offline
Senior Member
 
Join Date: Oct 2005
Posts: 987
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Arrow

Quote:
Originally Posted by automatedtrader
Heres what im wondering about MAGIC...ok i have 2 EAs exactly the same only difference is different take profits and trailing stops..I want to open 1 on EUR/USD and open the other on another chart but it needs to be EUR/USD so basically i have 2 EAs but they are the same they are named differently but the only other difference is take profits and trailing stops...is this possible it would seem with magic they would be... i mean i can manually enter 2 buy orders on EUR/USD even from 2 charts ''even the same chart'' with different settings and the ordertickets are different so it seems it would be possible
Sure, it's possible!

I'm writing an article right now about how to host multi expert advisors in the same instance of MetaTrader without conflict.
I'll give you the link when finished!
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 05-26-2006, 01:28 PM
automatedtrader automatedtrader is offline
Senior Member
 
Join Date: Mar 2006
Posts: 128
automatedtrader is on a distinguished road
cool...i tried running 4 currencies 2charts apiece on 1minute i adjusted the magic on all of them different to no avail...it basically for money-management and so i can sleep knowing 1 of the 2 EAs for each currency is taking a profit and the other is running trailing stop..I will be awaitng your article..that would 8 EAs running,,unless i can have only 2 EAs and each one is running 4 currencies which would be fantasic

Last edited by automatedtrader : 05-26-2006 at 01:36 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
modify orders and close pending orders bkgridley Questions 8 05-23-2007 09:49 PM
Open/close trade on same bar's close? WNW Expert Advisors - Metatrader 4 2 03-29-2007 05:37 AM
Do you trade multiple EAs from a single account? tdion Expert Advisors - Metatrader 4 1 03-16-2007 04:47 AM
close all open orders script forextrend General Discussion 2 12-17-2006 06:16 AM
Script to close open orders... babarmughal Expert Advisors - Metatrader 4 1 12-13-2006 04:50 PM


All times are GMT. The time now is 08:04 AM.