Envelope 2.11 - page 9

 

Magic number?

I have ran accross the term "magic number" a few times. Could anyone explain to me what it is? or at least refer me to a section of the forum where its being discussed?

I really appreciate your help!

newdigital:
Last versions with magic munber are working with many pairs simultaniously. I am testing it attaching to the 6 charts in one MetaTrader. You just need to change the magic number keeping the last two digit numbers as 00.

My magic numbers are the following:

11000 for EURUSD;

12000 for GBPUSD;

13000 for USDJPY;

14000 for USDCHF;

15000 for AUDUSD;

16000 for USDCAD.

I attached EA to 6 charts with magic numbers (see below) and everything is working fine. No need to change inside the code anything. Just use EA (new version) with madgic number options.
 
bradottawa:
I have ran accross the term "magic number" a few times. Could anyone explain to me what it is? or at least refer me to a section of the forum where its being discussed? I really appreciate your help!

When I am taking EA for testing I am always asking author or some programmers modify EA for me to be tested with many pairs simultaniously and to work with other EAs in one MetaTrader. This Envelope EA was modified by Igorad in this way. Of course this EA is testing alone (quite alone) in MetaTrader because I have Metatraders enough. But this EA can work together with other EAs.

When EA opened the order how we can recognize which EA opened the order? How EA can recognize which order should be modified? For example we have two orders on EURUSD M15 timeframe opened in one Metatrader: one from Goldwarrior, the other one is from Envelope. Which one should be modified or closed by Envelope. There are the same one: EURUSD, M15 timeframe.

Yes. There are some coding pieces inside the code for EA to know which one. And magic number.

Some people are coding this magic numbers which were already inserted inside the code and we do not need to set it manually. For example: DayTrading3. If we attach this EA to the M15 chart with default settings we will have magic number 19015 automatically and it will allow EA to know the orders (M5 is 19005, M30 is 19030 and so on). So it was codded especially to work with many EAs all together. Some EAs which are participating in contest now were coded like this, for example.

Some EAs were coded with magic numbers which we need to set manually if we plan to use it with many pairs or together with other EA.

 

So, there are several cases:

- all the orders from EA is having the same unique number; For example all the orders from EA is having the number 1000.

- orders for each pairs from EA is having unique numbers, for example: EURUSD - 1100; GBPUSD - 1200 etc.

Second case is more good. Because I had some funny case when one EA opened order on EURUSD and modified the stop loss from USDJPY price and finally could not close this EURUSD order with USDJPY price.

 

I looked at the trades and want to say the this EA did more than +360 pips in profit just for 1 and half a day (from this Monday) for one pair only.

Files:
 

You are correct New regarding the EA's changing SL, TP setups in other EA's if the Magic # is not set.

I had a trade this mourning I placed manual and due to the Envelope EA on and Stop trades in the que, one of my trades triggered a SL, but fortunately it was in the green!

But we need to be very careful to set the Magic #'s correctly.

thanks

 

Testing Envlope2.11!

Thank you NewDigital for answering my previous question about magic numbers, it was great!

I have another question for you, concerning the testing and the settings of envlope2.11.

I am testing the same EA with 2 different brokers: MIG and North Finance.

Here is what I noticed:

1- The same settings for the EA seems to work with MIG but not with Northern finance. The EA icon on top of the chart is not smiling.I have used the same presets and settings on both and both are connected to the server.

2- when i did the testing on the 2 brokers, one was profitable (MIG) the other wasnt. I used the same settings for the same pair eur/usd, the same time frame. 2 images are attached to this message to see for yourself.

How do you explain that?

your help is truely appreciated!

newdigital:
So, there are several cases:

- all the orders from EA is having the same unique number; For example all the orders from EA is having the number 1000.

- orders for each pairs from EA is having unique numbers, for example: EURUSD - 1100; GBPUSD - 1200 etc.

Second case is more good. Because I had some funny case when one EA opened order on EURUSD and modified the stop loss from USDJPY price and finally could not close this EURUSD order with USDJPY price.
 

I am testing on North Finance and the figures of profit and the statements are from North Finance data.

This EA should have similar results on almost every brokers. Not the same but very similar.

As to smiling face so read this thread.

Besides there is some thread with many links which may help also.

And files' thread may be usefull.

 

Invalid price ?

Why what GoldWarrior on USDJPY M15 written "invalid price for ordersend function" the price registered with 8 figure after the point?

Thanks

 

error

Excus my error.... invalid price for USDJPY for Envelope, i think because numbre 4 (digits) in "(NormalizeDouble(bline,4))" ????

 
maje:
Excus my error.... invalid price for USDJPY for Envelope, i think because numbre 4 (digits) in "(NormalizeDouble(bline,4))" ????

The same. I got invalid price fo USDJPY for Envelope yesterday. It was for the first time.

Reason: