How to change a stop after every 10 Minutes?

 

Hi,

I want to develop a method, that enablesto change the stop after every 10 Minutes?

How can I implement this?


Thanks for your support.


Kind regards,

Hoschie

 
int start(){
 bool needToMoveStops = ...;
 static datetime lastMove;  #define TenMinutes 10 * 60
 if (needToMoveStops && TimeCurrent() > lastMove + TenMinutes){
    if (orderModify(...)) lastMove = TimeCurrent();
    else Alert("orderModify failed: ", GetLastError()
 }