Forum

MqlDateTime: Where is the mistake?

Hi all, ich wrote the following code, but i don't work somehow. I check if a position in the current symbol exists. Then i would like to have the "day of the year" for the recent moment (for ab) and the "day of the year" when the position has been opened (for ba). The difference of this two data

Closing after x days

Hi all, i try to code an expert advisor with an automated position closing after x days. It is constructed an a daily basis and in Tradestation there is a function called "barssinceentry" for this routine. The entry is based on a moving average and the advisor have to save the date to close the