why in new session,the EA can't close the previouse session trade?

 

would anybody help me here. I found a strange issue, my EA close trade by tickets number,when there are some trades opening and i shut down my computer (or pull out the ea temporarily),the next time, when i start MT4 with that ea again, although the sell and buy lines and close trades target lines are on the chart, but it doesnt' close my trades as expected when hit the target line.my ea select opening trades by ticket numbers. how this happened. is there any solution? no body can keep the computer going on for whole year long or something happen to break the session,next session should be continuously,right?

thanks

 

Altogether now :)

Show us the code!

-BB-

 
thanks BarrowBoy. but now it seems more strange and not related to my code.there is a comment in my code, it is inside start() function, so each tick coming, the comment information change accordingly, now, the comment doesn't display on the chart at all. the ea is active for sure, the connection is ok (the price on the chart is moving), it seems to me, the ea doesn't receive the tick or the tick doesn't evoke the start() function at all.
 
BarrowBoy wrote >>

Altogether now :)

Show us the code!

-BB-

...

 

if (!caijsShowUsCode)

iForumThread++;


CB

 
cloudbreaker wrote >>

if (!caijsShowUsCode)

iForumThread++;

CB

spot on...

I do sympathise with people tho, I have always felt funny posting my gibberish. Methinks is cuz the decades of peer reviews just sapped my hacking confidence lifeforce from me. Those damn sessions were always seen as ego platforms by generally >1 participant and having to constantly justify ones very reason for holding a post in the company, let alone submitting code to a review was soooo draining.

My first session when veeery wet behind ears left me in tears of frustration and thoughts of murderous calamaties befalling the sessions attackers .

Can laugh now but was hell at time. - L.O.L. !!!!

 

Ha ha. You ought to see some of my rambling code!

Right caijs - we're not interested in stealing any secrets from you - so you can leave bits out if appropriate.

And we're not going to slag off your code (unless it looks like its fresh from a decompiler!).


CB

Reason: