Initial commit: MQL5 Scripts Collection (MetaTrader 5)
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
# 🚀 Unlock the Power of Trading!
|
||||
|
||||
Welcome to this open-source trading project. Here you will find powerful tools to enhance your trading journey. If you find this project useful, please consider starring ⭐, sharing, or donating to support further development!
|
||||
|
||||
---
|
||||
|
||||
**Support the project:**
|
||||
- Star this repository on GitHub
|
||||
- Share it with your trading friends
|
||||
- [Donate here](https://www.paypal.com/donate/?hosted_button_id=YOUR_BUTTON_ID) to help us grow!
|
||||
|
||||
---
|
||||

|
||||

|
||||

|
||||
|
||||
## Source Files
|
||||
- `s-lastpinkeventdate.mq5`
|
||||
|
||||
---
|
||||
> Made with ❤️ for the trading community.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 8.3 KiB |
@@ -0,0 +1,46 @@
|
||||
//+------------------------------------------------------------------+
|
||||
//| s-LastPinkEventDate.mq5 |
|
||||
//| Alexander Piechotta |
|
||||
//| http://www.metatraders.de/ |
|
||||
//+------------------------------------------------------------------+
|
||||
#property script_show_inputs
|
||||
#property copyright "Alexander Piechotta"
|
||||
#property link "http://www.metatraders.de/"
|
||||
#property version "1.00"
|
||||
#property description "Ein Skript welches als Demonstration aus dem"
|
||||
#property description "Economic Calendar mit aktuelle Wirtschaftsdaten"
|
||||
#property description "das Datum vom letzten wichtigen(Pink) Ereignis ausgibt."
|
||||
#property description "Wenn vorhanden und aktiviert."
|
||||
//+------------------------------------------------------------------+
|
||||
//| Script program start function |
|
||||
//+------------------------------------------------------------------+
|
||||
void OnStart()
|
||||
{
|
||||
//---
|
||||
datetime date=last_pink_event_date(); // ermittelt das Datum des letzten Pink Event
|
||||
if(date>0) MessageBox("LastPinkEventDate = "+string(date),"Information",0); //wenn ein event vorhanden gib mir das Datum aus
|
||||
else MessageBox("Sorry, Kein 'Last Pink Event' vorhanden.","Information",0); // Sorry
|
||||
}
|
||||
//+------------------------------------------------------------------+
|
||||
//| Funktion gibt das Datum vom letzten Pink Ereignis zuruck |
|
||||
//+------------------------------------------------------------------+
|
||||
datetime last_pink_event_date()
|
||||
{
|
||||
string name="";
|
||||
int total=ObjectsTotal(0)-1;
|
||||
|
||||
for(int i=total; i>=0; i --)
|
||||
{
|
||||
name=ObjectName(0,i);
|
||||
|
||||
if(ObjectGetInteger(0,name,OBJPROP_TYPE,0) != 109) continue; // Objekt Typ muss eine event sein
|
||||
if(ObjectGetInteger(0,name,OBJPROP_COLOR,0) != Pink) continue; // Objekt muss Farbe Pink haben
|
||||
|
||||
datetime date=(datetime)StringSubstr(name,0,16); // extrahiere das Datum aus dem Objekt Namen
|
||||
|
||||
return(date); //gibt das Datum zuruck
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
//+------------------------------------------------------------------+
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
Reference in New Issue
Block a user