Can't change lot size in expert advisor

 

Hi there,

I tried to write my first EA today and everything seemed to work ok apart from that I wasn't able to specify a lot size for orders greater than 0.1 on most symbols.

I'm using the following code to open a buy:

 trade.Buy( 0.1,NULL,Ask,Ask*0.992,Ask*1.006,NULL );

where trade is a CTrade object. When I specify lot(volume) size of 1.0 the EA does not make any deals when I run it in the strategy tester on symbols such as EURUSD.

Please advise,

Many thanks in advance,

Michael.

 
indigo79:

Hi there,

I tried to write my first EA today and everything seemed to work ok apart from that I wasn't able to specify a lot size for orders greater than 0.1 on most symbols.

I'm using the following code to open a buy:

 trade.Buy( 0.1,NULL,Ask,Ask*0.992,Ask*1.006,NULL );

where trade is a CTrade object. When I specify lot(volume) size of 1.0 the EA does not make any deals when I run it in the strategy tester on symbols such as EURUSD.

Please advise,

Many thanks in advance,

Michael.

Post the code here