Included, Library, Script or Indicator to set relative SL & TSL at specified time and Close EA

 

I'm trying to figure out how to make a (compact, low overhead, efficient) module that at a specified time, will set a Stop Loss Point relative to the Current Price for all open, active trades; set Trailing Stop Losses and then close the EA. I would prefer that it not be a Library file as their is more overhead with a Library file than an Included file.

Regardless of if it is an Indicator, Included, Library or Script file, it must not exclude the usage of EAs on a chart. This is why I have not included making an EA to do this task.

 

To work at a certain time...

int start, stop;// Your start and stop hours

if(Hour() > stop || Hour() < start){
return(0);}

In setting your stop levels you need to be mindful of the stop level.

See here

https://book.mql4.com/appendix/limits

for more

 

Hi ssn,

Nice, finding out the 'limits' makes it doubly so. (< 8)

Thanks a Lot !

Reason: