VPS resync

 

Hi all,

I have searched the forum but I am struggling to find a definitive answer... any help gratefully received.

When I resync the VPS it adds the new charts I want to move to the VPS correctly, but in doing so it reenters orders on the original EAS so that I incorrectly have multiple orders on at the same levels even though my code specifies only one entry per level. What is the solution to this? Hope what I've written makes sense!

Thank you

Jade

 

You can check VPS logs/journal about what was synchronized.
If everything is fine so check your home Metatrader - because automading should be off on your home Metatrader.
Why?
Because MQL5 VPS for MT4/MT5 is your second Metatrader in cloud.
And if this Metatrader in VPS is trading together with your home Metatrader so you will get double entries/orders.

You can check subscription procedure once again here (it is something aboiut synchronization and so on in the end of the post) - post

Virtual hosting for MetaTrader 5
Virtual hosting for MetaTrader 5
  • www.mql5.com
Virtual hosting for MetaTrader 4/5 is the best VPS solution for Forex. It is cheap, it requires no configuration and it features minimum delays to the server. For only 15 USD per month, you obtain a virtual platform that works around the clock, saves your profit and pays off. Create a remote copy of the application directly from the...
 
Sergey Golubev:

You can check VPS logs/journal about what was synchronized.
If everything is fine so check your home Metatrader - because automading should be off on your home Metatrader.
Why?
Because MQL5 VPS for MT4/MT5 is your second Metatrader in cloud.
And if this Metatrader in VPS is trading together with your home Metatrader so you will get double entries/orders.

You can check subscription procedure once again here (it is something aboiut synchronization and so on in the end of the post) - post

Thank you Sergey. I have had autotrading off, do I have to turn it on before pressing resync?

 
slimjadey:

Hi all,

I have searched the forum but I am struggling to find a definitive answer... any help gratefully received.

When I resync the VPS it adds the new charts I want to move to the VPS correctly, but in doing so it reenters orders on the original EAS so that I incorrectly have multiple orders on at the same levels even though my code specifies only one entry per level. What is the solution to this? Hope what I've written makes sense!

Thank you

Jade

If your EA was coded well, it shouldn't open new identical trades, because it would recoginize the already open trades.

If this cannot be fixed, try to synchronize/migrate your EAs with MQL5 VPS with no open trades.

 
Eleni Anna Branou:

If your EA was coded well, it shouldn't open new identical trades, because it would recoginize the already open trades.

If this cannot be fixed, try to synchronize/migrate your EAs with MQL5 VPS with no open trades.

Right ok its probably the code thank you. Which part of the code is responsible? Do you have to tell the bot to pull the current status from the broker information so it knows where it is in the sequence or make code more robust to stop it from entering more than once?

I suppose I am a bit unclear what actually happens to current EAs on a resync. Does the VPS simply imitate exact local set up so just assumes start position?


Thanks for your help on this I really appreciate it.


Jade

 
slimjadey:

Right ok its probably the code thank you. Which part of the code is responsible? Do you have to tell the bot to pull the current status from the broker information so it knows where it is in the sequence or make code more robust to stop it from entering more than once?

I suppose I am a bit unclear what actually happens to current EAs on a resync. Does the VPS simply imitate exact local set up so just assumes start position?


Thanks for your help on this I really appreciate it.


Jade

Yes, it replicates local setup, so your EA must open duplicate trades locally too.

 
Is there a way to tell which trades are taken by server vs local?
 
slimjadey:
Is there a way to tell which trades are taken by server vs local?

I don't think so, only the timing can help you with that.

 
Eleni Anna Branou:

I don't think so, only the timing can help you with that.

It doesnt seem to duplicate locally when I turn the platform on or off without VPS, can you suggest another way to test or am I not understanding? Sorry I am so backward with this! :/

 
slimjadey:

It doesnt seem to duplicate locally when I turn the platform on or off without VPS, can you suggest another way to test or am I not understanding? Sorry I am so backward with this! :/

I hope you don't keep your local EA on (Auto Trading button clicked), while you are trading on MQL5 VPS, right?

If yes, that is the cause of your issue.

 
Eleni Anna Branou:

I hope you don't keep your local EA on (Auto Trading button clicked), while you are trading on MQL5 VPS, right?

If yes, that is the cause of your issue.

No that turns off automatically when I sync

Reason: