Join our fan page
Economic Calendar CSV - script for MetaTrader 5
- Views:
- 766
- Rating:
- Published:
- 2024.10.22 16:31
- Need a robot or indicator based on this code? Order it on Freelance Go to Freelance
This is an extended version of the script CalendarForDates.mq5 presented in the algotrading book.
Input variables allows you to specify a country code, a currenty code, and a time range to filter required records. If the inputs are left empty, a complete calendar can be requested (if the calendar is requested first time after the terminal started, it can take a while for downloading its base or even time out and produce no results - then please run the script once again).
As a result, you'll get a CSV-file with calendar records with most important fields (not all fields are exported - feel free to adjust the source code according to your needs).
Optionally, one can input a *.cal-file (archived complete copy of the calendar for specific time) created by the indicator CalendarMonitorCached.mq5 also introduced in the book.
The attached mqh-files (CalendarFilter.mqh, CalendarCache.mqh, QuickSortStructT(Ref).mqh) contain bugfixes and improvements compared to their original versions from the book.
A sample pine code converted to MQL
Push Notification for Opened / Closed Trades (Netting)This code provides a simple function for sending push notifications to your mobile device whenever trades are opened or closed in MetaTrader 5. It's designed for netting accounts (where only one position per symbol is allowed).
This service periodically checks swaps for predefined symbols and saves detected changes into CSV-files for further analysis and potential replay (not implemented here). Also it monitors and alerts swap changes of existing positions.
AutoFibo indicator of two last swings based on ZigZag for MT5The AutoFibo indicator is an advanced Fibonacci retracement tool that automatically draws Fibonacci levels based on the ZigZag pattern. This indicator is designed to help traders quickly identify potential support and resistance levels in trending markets.