Download MetaTrader 5
To add comments, please log in or register
Write articles, help other developers and make money
mariusz 2014.10.25 15:17 

 Hi All,

 I am coding a system which will be placing only one trade per day .

On the next day if market meets my requirements  , selected order must be reversed , e.g. sell into buy 

 If the requirements are not met-> the postion should be opened till system reverse it . In that time new trades do not be filled!


 Attached code cause that the new order can be opened and closed at the same day ;/

 What is more next day occurs new trades without closing previous trade.;/

Please help me :) 

 I attached file .

forexlabor 2014.10.27 07:33  


just an idea:

- use D1 timeframe, and check the  numbers of d1 candles

- in the expert init() sections:

int bars_on_the_chart=Bars;

in the expert start() sections:

if (bars_on_the_chart<Bars)  //new day


//close orders ...

//open orders ....



To add comments, please log in or register