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
|
||||
- `sct_pivotpoints.mq5`
|
||||
|
||||
---
|
||||
> Made with ❤️ for the trading community.
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
+65
@@ -0,0 +1,65 @@
|
||||
//+------------------------------------------------------------------+
|
||||
//| PivotsPoints.mq5 |
|
||||
//| Copyright 2020, Mario Gharib. |
|
||||
//| mario.gharib@hotmail.com |
|
||||
//+------------------------------------------------------------------+
|
||||
#property copyright "Copyright 2020, Mario Gharib. mario.gharib@hotmail.com"
|
||||
#property link "https://www.mql5.com"
|
||||
#property version "1.00"
|
||||
|
||||
#include <Candlestick.mqh>
|
||||
|
||||
string sArrowBuy1 = "";
|
||||
string sArrowBuy2 = "";
|
||||
string sArrowSell1 = "";
|
||||
string sArrowSell2 = "";
|
||||
|
||||
datetime dtBarTimeZ = 0;
|
||||
|
||||
cCandlestick cCS0, cCS1, cCS2, cCS3, cCS4, cCS5, cCS6, cCS7, cCS8;
|
||||
|
||||
//+------------------------------------------------------------------+
|
||||
//| Script program start function |
|
||||
//+------------------------------------------------------------------+
|
||||
void OnStart() {
|
||||
|
||||
for(int z=2;z<=1000;z++) {
|
||||
|
||||
sArrowBuy1 = "";
|
||||
sArrowBuy2 = "";
|
||||
sArrowSell1 = "";
|
||||
sArrowSell2 = "";
|
||||
|
||||
// OHLC, Characteristics and type of Candles
|
||||
|
||||
cCS0.mvGetCandleStickCharateristics(_Symbol,z);
|
||||
cCS1.mvGetCandleStickCharateristics(_Symbol,z-1);
|
||||
cCS2.mvGetCandleStickCharateristics(_Symbol,z-2);
|
||||
cCS3.mvGetCandleStickCharateristics(_Symbol,z-3);
|
||||
cCS4.mvGetCandleStickCharateristics(_Symbol,z-4);
|
||||
cCS5.mvGetCandleStickCharateristics(_Symbol,z+1);
|
||||
cCS6.mvGetCandleStickCharateristics(_Symbol,z+2);
|
||||
cCS7.mvGetCandleStickCharateristics(_Symbol,z+3);
|
||||
cCS8.mvGetCandleStickCharateristics(_Symbol,z+4);
|
||||
|
||||
dtBarTimeZ = iTimeMQL4(NULL,PERIOD_CURRENT,z); // Return the datetime of the z bar of the current symbol on the current timeframe
|
||||
|
||||
if (cCS0.dHighPrice>cCS1.dHighPrice && cCS0.dHighPrice>cCS2.dHighPrice &&
|
||||
cCS0.dHighPrice>cCS3.dHighPrice && cCS0.dHighPrice>cCS4.dHighPrice &&
|
||||
cCS0.dHighPrice>cCS5.dHighPrice && cCS0.dHighPrice>cCS6.dHighPrice &&
|
||||
cCS0.dHighPrice>cCS7.dHighPrice && cCS0.dHighPrice>cCS8.dHighPrice) {
|
||||
|
||||
StringConcatenate(sArrowSell1,"sArrowSell1",string(dtBarTimeZ));
|
||||
ObjectCreate(0,sArrowSell1,OBJ_ARROW_SELL,0,dtBarTimeZ,cCS0.dHighPrice);
|
||||
|
||||
} else if (cCS0.dLowPrice<cCS1.dLowPrice && cCS0.dLowPrice<cCS2.dLowPrice &&
|
||||
cCS0.dLowPrice<cCS3.dLowPrice && cCS0.dLowPrice<cCS4.dLowPrice &&
|
||||
cCS0.dLowPrice<cCS5.dLowPrice && cCS0.dLowPrice<cCS6.dLowPrice &&
|
||||
cCS0.dLowPrice<cCS7.dLowPrice && cCS0.dLowPrice<cCS8.dLowPrice) {
|
||||
|
||||
StringConcatenate(sArrowBuy1,"sArrowBuy1",string(dtBarTimeZ));
|
||||
ObjectCreate(0,sArrowBuy1,OBJ_ARROW_BUY,0,dtBarTimeZ,cCS0.dLowPrice);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user