Bars to read

 
How do I limit how many bars are read by EA? I want my indicators to have the same value as my demo account at fxgame.oanda.

And also, what If there is an open position which is being controled by an EA with a trailing stop,what If someone turns off the computer while I am out?Does broker server save last trailing stop?Or is my capital at the mercy of FX volatilty?

I'm more intrested in having the first question answered by the way.
 
Please, read previously https://www.mql5.com/en/articles/mt4
Reason: