Forum

Something really weird is going on...

In my code to detect a MA cross and only buy when two MAs cross, it somehow does not detect a cross but still goes on and starts a position. Furthermore, these positions start by being a 'Buy', then closing, then all positions after that are a 'Sell'. What am I doing wrong? input double Lots =

How do I check how long a trade has been open for?

So basically I'm trying to make the EA close a trade if it has been open for more than 48 hours. How would I do that? Thank you