Download MetaTrader 5

Intra-bar trades

To add comments, please log in or register
jamesh99
53
jamesh99  

Hi

 

If I am using an EA whose logic runs using the OnTick() event, and it is linked to a chart whose timeframe is M1 then will trades ONLY occur at minute start/ends, or is an intra-minute trade possible?

 

Thanks. 

Daniela Bluemel
597
Daniela Bluemel  
Like the function says it runs every tick...
Ievgen Ryzhov
136
Ievgen Ryzhov  
jamesh99:

Hi

 

If I am using an EA whose logic runs using the OnTick() event, and it is linked to a chart whose timeframe is M1 then will trades ONLY occur at minute start/ends, or is an intra-minute trade possible?

 

Thanks. 

The EA is executed on every tick - particulary OnTick() method. So for example if during 1 munites it will be 100 ticks then OnTick() will be called 100 times. So in general if you want to control minute's start-end you'll need to do it manually - for example 

 datetime currTime = TimeCurrent();

if(TimeSeconds(currTime ) == 0) 

{

.... 

} 
To add comments, please log in or register