Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

ToClearObjectsByTypeByTime - MetaTrader 5 Script - MT4/MT5 Resources

author EAcpu | 4 reads | 0 comments |

If the time coordinates of old objects of the selected type exceed the trigger level, the script will delete these objects from all charts.

 //+--------------------------------------------------------+
//| Script input parameters |
//+--------------------------------------------------------+
Input ENUM_OBJECT OBJ_TYPE=- 1 ; //The type of object to be deleted
Input unit time level = 10 ; //Trigger level (in days)

So, the time level input determines the number of days from the current date. Objects before that day will be deleted.


Attachment download

📎 toclearobjectsbytypebytime.mq5 (4.28 KB)

Source: MQL5 #17998

Verification code Refresh