Forex
Google

Go Back   Forex Trading > Discussion Areas > Metatrader 4
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 12-05-2006, 04:59 AM
forextrend's Avatar
forextrend forextrend is offline
Senior Member
 
Join Date: Nov 2005
Posts: 114
forextrend is an unknown quantity at this point
Lightbulb magic number

What is the purpose of the magic number in EA codes, and what are the magic numbers for all the pairs
??
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 12-05-2006, 07:51 AM
Kalenzo's Avatar
Kalenzo Kalenzo is offline
Senior Member
 
Join Date: Dec 2005
Location: Bydgoszcz - Poland
Posts: 692
Kalenzo is on a distinguished road
Quote:
Originally Posted by forextrend
What is the purpose of the magic number in EA codes, and what are the magic numbers for all the pairs
??
Magic number is the number that you choose. It can be any number that you want eg 12345 or 432121 or 929292 just as you wish. It is used to mark sent order by the ea to find it later to eg. move stop loss or change take profit or close that order. With magic number you can manage many orders with many ea's and each one of them will know which orders are signed to it. Magic number is independent from the currency or timeframe.
__________________
You need proffesional mql coder? Contact me! I will help you!
........................................
http://www.fxservice.eu/
........................................
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 12-07-2006, 11:04 PM
antone antone is offline
Senior Member
 
Join Date: Oct 2006
Posts: 102
antone is on a distinguished road
i'm interested to know as well..

how do you use it? and know the magic number to put? sorry newbie
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 12-08-2006, 06:07 AM
newdigital newdigital is online now
Administrator
 
Join Date: Sep 2005
Posts: 15,432
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
Quote:
Originally Posted by antone
i'm interested to know as well..

how do you use it? and know the magic number to put? sorry newbie
EA should have it in the settings. For example:

TakeProfit = 70;
StopLoss = 100;
Magic Number = 1000;
...........

If you use many EAs in one Metatrader so set magic number value to the different numbers for different pairs.

There are exeptional cases with some EAs but usually coders are telling about it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 12-08-2006, 07:50 AM
antone antone is offline
Senior Member
 
Join Date: Oct 2006
Posts: 102
antone is on a distinguished road
Quote:
Originally Posted by newdigital
EA should have it in the settings. For example:

TakeProfit = 70;
StopLoss = 100;
Magic Number = 1000;
...........

If you use many EAs in one Metatrader so set magic number value to the different numbers for different pairs.

There are exeptional cases with some EAs but usually coders are telling about it.
so how do you set the magic number on the trade? is it the order number?

i know how to put in the EA, how about how to put it in the oreder?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 12-08-2006, 07:55 AM
Kalenzo's Avatar
Kalenzo Kalenzo is offline
Senior Member
 
Join Date: Dec 2005
Location: Bydgoszcz - Poland
Posts: 692
Kalenzo is on a distinguished road
Quote:
Originally Posted by antone
so how do you set the magic number on the trade? is it the order number?

i know how to put in the EA, how about how to put it in the oreder?
int OrderSend( string symbol, int cmd, double volume, double price, int slippage, double stoploss, double takeprofit, string comment=NULL, int magic=0, datetime expiration=0, color arrow_color=CLR_NONE)
__________________
You need proffesional mql coder? Contact me! I will help you!
........................................
http://www.fxservice.eu/
........................................
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 12-08-2006, 10:10 AM
antone antone is offline
Senior Member
 
Join Date: Oct 2006
Posts: 102
antone is on a distinguished road
Quote:
Originally Posted by Kalenzo
int OrderSend( string symbol, int cmd, double volume, double price, int slippage, double stoploss, double takeprofit, string comment=NULL, int magic=0, datetime expiration=0, color arrow_color=CLR_NONE)
not that.. how do i make the order the same magic number as what i place in my EA? is it in the comment?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 12-08-2006, 10:16 AM
Kalenzo's Avatar
Kalenzo Kalenzo is offline
Senior Member
 
Join Date: Dec 2005
Location: Bydgoszcz - Poland
Posts: 692
Kalenzo is on a distinguished road
Quote:
Originally Posted by antone
not that.. how do i make the order the same magic number as what i place in my EA? is it in the comment?
You mean - you have ea that controls orders eg, by magic number 11111 and you want to open manually another trade and set the magic for that manual order to 11111 so the ea could control it?
__________________
You need proffesional mql coder? Contact me! I will help you!
........................................
http://www.fxservice.eu/
........................................
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 12-08-2006, 11:22 AM
matrixebiz's Avatar
matrixebiz matrixebiz is offline
Senior Member
 
Join Date: Oct 2006
Posts: 1,043
matrixebiz is on a distinguished road
What if I pick a number that someone else is using, will our trades get mixed up?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 12-08-2006, 11:27 AM
Kalenzo's Avatar
Kalenzo Kalenzo is offline
Senior Member
 
Join Date: Dec 2005
Location: Bydgoszcz - Poland
Posts: 692
Kalenzo is on a distinguished road
Quote:
Originally Posted by matrixebiz
What if I pick a number that someone else is using, will our trades get mixed up?
LOL, no, magic number is separated for each platform (each metatrader instalation).
__________________
You need proffesional mql coder? Contact me! I will help you!
........................................
http://www.fxservice.eu/
........................................
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
Magic Number question Yoda_Glenn Expert Advisors - Metatrader 4 1 02-22-2007 08:26 AM
MT4 Magic Number DeadEye96 Expert Advisors - Metatrader 4 2 09-19-2006 10:05 PM
How do I modify the magic number on an order? Aaragorn General Discussion 7 07-17-2006 05:46 PM
magic number caldolegare Metatrader 4 4 03-19-2006 05:28 AM


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