Szymon Jan Szarowski / Publications
Forum
Limiting trade duration according to working day
Dear all, I am trying to limit the duration of my trade in my ea. In this example to 1 day. int openTime = PositionGetInteger ( POSITION_TIME ); int inpCheckMaxTradeDuration = 1 ; int time = TimeCurrent (); if (openTime > 0 && ((openTime + (inpCheckMaxTradeDuration * 86400 )) < TimeCurrent