Magic number - page 2

To add comments, please log in or register
Kale
1411
Kale  
matrixebiz:
So if I use 1111 and you use 1111 we are still ok? adn we are on the same platform. Sorry, just confused a bit

Yes, if we both open accounts in the same broker, and we both be using the same magic numbers at the same broker, they will work fine. Magic number is only for inside use of one metatrader installation. It will also work if you will install metatrader twice in separated folders and run both installations with the same broker with the same magic.

matrixebiz
1733
matrixebiz  
Kalenzo:
Yes, if we both open accounts in the same broker, and we both be using the same magic numbers at the same broker, they will work fine. Magic number is only for inside use of one metatrader installation. It will also work if you will install metatrader twice in separated folders and run both installations with the same broker with the same magic.

Ok, got it now thanks. It's just to help my installation of MT4 on my own machine.

antone
178
antone  
Kalenzo:
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?

i manually take orders.. so how do i do it?

yes, so how do i use the magic number?

Kale
1411
Kale  
antone:
i manually take orders.. so how do i do it? yes, so how do i use the magic number?

It is impossible to input magic number for manual trade. If you want to manage choosen trades by ea, you should use order comment instead magic number.

antone
178
antone  
Kalenzo:
It is impossible to input magic number for manual trade. If you want to manage choosen trades by ea, you should use order comment instead magic number.

thanks for your reply..

Nomura
93
Nomura  

Can MetaTrader do it ?

Kalenzo:
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?

Kalenzo,

It is good for semi-manual traders who want eas to manage orders with MM only. Can MetaTrader do it ?

Thanks in advance.

Nomura

lepiricus
319
lepiricus  

How to code a magic number?

Hello,

I am trying to build my 1st EA and I got alot of help from here

Expert Advisor Builder for MetaTrader 4

Its nothing fancy, and sucks something fierce but I am just building it to learn

I would like to put a magic number function in the code. Does anyone have a basic code I could use to associate a magic number with the EA's trades.

I couldn't find how to do it from that site.

Thanks!

matrixebiz
1733
matrixebiz  

Magic Numbers in EA's

I have an EA on GBP/JPY running three charts within the same platform: 5M, 15M and 30M

The EA is assigning different Magic Numbers for each chart which is good so open and close of an order is handled correctly.

Now my question is, once all the trades are closed how can I tell which chart or Magic Number closed the trade ??

The history detailed report doesn't list the Magic Number that controlled each trade. Does it? maybe I need to have an option triggered to show me the Magic number ??

What I need to know of course is if I have a loosing trade which TF chart made that trade.

Thanks

wolfe
1037
wolfe  
matrixebiz:
I have an EA on GBP/JPY running three charts within the same platform: 5M, 15M and 30M

The EA is assigning different Magic Numbers for each chart which is good so open and close of an order is handled correctly.

Now my question is, once all the trades are closed how can I tell which chart or Magic Number closed the trade ??

The history detailed report doesn't list the Magic Number that controlled each trade. Does it? maybe I need to have an option triggered to show me the Magic number ??

What I need to know of course is if I have a loosing trade which TF chart made that trade.

Thanks

I'm assuming you have the same EA attached to 3 different charts with 3 different time frames, all the same currency pair. Right?

You could probably code the EA to have a Print statement to the journal after an OrderClose() function telling you which time frame was closed. That's my thought.

matrixebiz
1733
matrixebiz  
wolfe:
I'm assuming you have the same EA attached to 3 different charts with 3 different time frames, all the same currency pair. Right? You could probably code the EA to have a Print statement to the journal after an OrderClose() function telling you which time frame was closed. That's my thought.

Ok, thanks. Yes it is EA dependant. If the EA doesn't have the code telling it to print the MagicNumber on the trade then it won't display it in the history.

To add comments, please log in or register