How to solve this issues?

 
I run my developed EA from laptop.

problom is when internet disconnected the EA placing order again and all trailing stops collapsed.

How to solve this issues? Is there any method to avoid re orders when EA restatrs?
 
  1. If you want help, use a title that explains the problem. "Issues" does not
  2. EA's must be coded to recover from problems: Chart accidentally closed and reopened, terminal accidentally closed and reopened, OS crashes and/or rebooted, Power failure, PC restarts. Where are your checks?
 
WHRoeder:
  1. If you want help, use a title that explains the problem. "Issues" does not
  2. EA's must be coded to recover from problems: Chart accidentally closed and reopened, terminal accidentally closed and reopened, OS crashes and/or rebooted, Power failure, PC restarts. Where are your checks?

1. Sorry my title is simple. i apologise for my inconvenience.

2. when EA restarts after disconnection of internet/power failure or restarts the EA placing order again even previous closed order for the day.

is there any idea to store order id/history on system and restore the values?

if yes please assist me!