Forum

Some extra code needed for a grid EA (which limits its total orders).

Attached is the .mq4 codefile for a grid system EA. Under certain market conditions and with certain settings this EA is net profitable... as long as you keep a constant eye on it and limit its total positions to (for example) 30 by turning it off when the sum of its open positions and pending stop

Positions limiter code needed for grid EA (.mq4 file attached)

Can anyone assist me by adding a little code which would enable the user to define a finite number of open positions the attached EA can commit to? I've tried to do this myself... but I keep getting error messages on debug. I'm just not at a level of understanding code where I can get this limiting

Orders/Positions limiter needed for an EA.

Attached is the .mq4 codefile for a grid system EA. Under certain market conditions and certain settings this EA is net profitable... if you keep a constant eye on it and limit its total positions to (for example) 30 by turning it off when the sum of its open positions and pending stop orders