51 lines
1.6 KiB
MQL5
51 lines
1.6 KiB
MQL5
|
//+------------------------------------------------------------------+
|
||
|
//| RSI_9_22.mq5 |
|
||
|
//| VZ |
|
||
|
//| https://www.mql5.com |
|
||
|
//+------------------------------------------------------------------+
|
||
|
input ulong InpMagicNumber = 27059122;
|
||
|
|
||
|
input ENUM_TIMEFRAMES tfEntry = PERIOD_M15;
|
||
|
input ENUM_TIMEFRAMES tfCal = PERIOD_M30;
|
||
|
|
||
|
#include <VZLib\util.mqh>
|
||
|
#include <VZStrategies\RSI_9_22_setup.mqh>
|
||
|
|
||
|
//+------------------------------------------------------------------+
|
||
|
//| |
|
||
|
//+------------------------------------------------------------------+
|
||
|
int OnInit()
|
||
|
{
|
||
|
//---
|
||
|
SendTelegramMessage("RSI_9_22_OnInit");
|
||
|
initTrade(InpMagicNumber);
|
||
|
|
||
|
|
||
|
//---
|
||
|
return InitRSI_9_22(tfCal);
|
||
|
}
|
||
|
//+------------------------------------------------------------------+
|
||
|
//| Expert deinitialization function |
|
||
|
//+------------------------------------------------------------------+
|
||
|
void OnDeinit(const int reason)
|
||
|
{
|
||
|
//---
|
||
|
SendTelegramMessage("RSI_9_22_OnDeinit");
|
||
|
DeinitRSI_9_22();
|
||
|
|
||
|
}
|
||
|
//+------------------------------------------------------------------+
|
||
|
//| Expert tick function |
|
||
|
//+------------------------------------------------------------------+
|
||
|
void OnTick()
|
||
|
{
|
||
|
//---
|
||
|
if(isNewBar(tfEntry))
|
||
|
{
|
||
|
|
||
|
EntryRSI_9_22(InpMagicNumber);
|
||
|
}
|
||
|
|
||
|
}
|
||
|
//+------------------------------------------------------------------+
|