Code for minimums seconds before able to close

 

Is there any code that sets a minimum time before the EA is able to close a position? My broker have a minimum 180 seconds rule for open/close, but my EA can open/close within a few seconds. Not bc SL/TP but its algo.

My knowledge for code is zero.


Thanks

 
lucatonifx:

Is there any code that sets a minimum time before the EA is able to close a position? My broker have a minimum 180 seconds rule for open/close, but my EA can open/close within a few seconds. Not bc SL/TP but its algo.

My knowledge for code is zero.


Thanks

Are you tryiing to say that your Broker does not allow you to open a position WHEN you want?
 
Flavio Jarabeck #:
Are you tryiing to say that your Broker does not allow you to open a position WHEN you want?
No, sorry. My broker does not allow to close a position within 180 sec after open. Usually no problems, but when market gets volatile my EA can open and close positions within seconds. Very profitable but not allowed. I would just need some function that make the EA wait for 180 sec.
 
lucatonifx # I would just need some function that make the EA wait for 180 sec.

So what's your problem? Remember or get the Order Open Time and compare to the current time.

Show us your attempt (using the CODE button) and state the nature of your difficulty.
          No free help (2017)

 
William Roeder #:

So what's your problem? Remember or get the Order Open Time and compare to the current time.

Show us your attempt (using the CODE button) and state the nature of your difficulty.
          No free help (2017)

Thank you so much William. I got 99 problems but get lucky googling ain't one. Found what I needed.