Envelope 2.11 - page 6

 

Try to look at the "Journal" or "Experts" log files in MetaTrader. It may be written something.

I attached the image and marked everything that you need to check.

Files:
4_1.gif  48 kb
 
maje:
With H1 not M15 ?

With m15 timeframe.

 

???

I removed the other EA to leave only "envelope" times that there was a conflict, but does not go yet.

Look at my MT space.

Files:
 
maje:
I removed the other EA to leave only "envelope" times that there was a conflict, but does not go yet. Look at my MT space.

I have no idea about it.

May be your connection between MetaTrader and broker's server is not good. I don't know.

I know that this EA is placing stop orders in GMT midnight as well.

 

Problem?

I believe that the problem comes from this sector,

if(bline>Close[0] && sline<Close[0])

{

btp1=(NormalizeDouble(bline,Digits))+(FirstTP*Point);

ticket=OrderSend(Symbol(),

OP_BUYSTOP,

LotsOptimized(),

(NormalizeDouble(bline,Digits)),

0,

(NormalizeDouble(sline,Digits)),

btp1,

Period()+comment+"btp1",

21,

0,

Aqua);

The variable LotsOptimized() is defined where ?

Thanks!

 

Oups!

This ;

if(bline>Close[0] && sline<Close[0])

{

btp1=(NormalizeDouble(bline,4))+(FirstTP*Point);

ticket=OrderSend(Symbol(),

OP_BUYSTOP,

LotsOptimized(),

(NormalizeDouble(bline,4)),

0,

(NormalizeDouble(sline,4)),

btp1,

"",

Magic+2,

TimeClose,

Aqua);

 

Yes!

I found the problem. In the code;

ticket=OrderSend(Symbol(),

OP_BUYSTOP,

0.1,

(NormalizeDouble(bline,4)),

0,

(NormalizeDouble(sline,4)),

btp1,

" ",

Magic+2,

0,

Aqua);

Instead of the zero at the end (for the annulment of the order at 11 p.m.) there was the variable "TimeClose" I do not know why on my MT4 with this variable the order did not pass.

 

OK this solution for my version MT4

ticket=OrderSend(Symbol(),

OP_SELLSTOP,

LotsOptimized(),

(NormalizeDouble(sline,4)),

0,

(NormalizeDouble(bline,4)),

stp3,

"",

Magic+5,

TimeHour(TimeClose),

HotPink);

Bye, thanks!

 

Newdigital,

Question,

I uploaded the EA, and need to know where exactly to insert one of the Presets included in the Zip file for this EA?

And of the 2 Presets, what does what?

Sorry, I am new to MT formatting...

thanks

E

 
pikachucom:
Newdigital,

Question,

I uploaded the EA, and need to know where exactly to insert one of the Presets included in the Zip file for this EA?

And of the 2 Presets, what does what?

Sorry, I am new to MT formatting...

thanks

E

In pre-set folder, for example: C:\Program Files\MetaTrader4\experts\presets

And you load this pe-set file during the attaching the EA.

There are two pre-set files: one is with MM. The othe one is without any MM and EA is openning the fixed lot size (by 0.1 lot or any you defined).

Reason: