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

Subtract Time - MetaTrader 5 Script | Trading Script Download - MT4/MT5 Resources - MetaTrader 5 Resources

author EAcpu | 5 reads | 0 comments |

With this short code you will learn how to subtract time.
It can be very useful to determine when trades are entered and exited and to develop strategies based on the timing.

I'm using a tick counter to perform the subtraction.
Note that the initial date is: 1970.01.01 00:00:00, which you can use as a calculation parameter.

---
To use it, just grab it into your chart and you'll see a comment with this information on your screen.


Attachment download

📎subtracttime.mq5 (1.08 KB)

Source: MQL5 #43883

Subtract Time - MetaTrader 5 Script | Trading Script Download - MT4/MT5 Resource Usage and Screening Suggestions

Subtract Time - MetaTrader 5 Script | Trading Script Download - MT4/MT5 resources are trading script related resources. Before downloading or referencing, it is recommended to confirm the platform version, transaction type, time period, whether DLL is required, whether source code is included, parameter description and historical update records.

Both automated trading tools and foreign exchange indicators should first undergo backtesting, simulated account observation, and small capital verification. Pay special attention to spreads, slippages, maximum drawdowns, position opening frequency, stop loss methods, trading periods and broker rules, and avoid direct real-time execution based only on titles or short-term profit descriptions.

Verification code Refresh