Updated for RangeBars ver. 3.04

This commit is contained in:
Artur
2020-03-17 23:34:45 +01:00
parent 8035947476
commit 5327473eaf
4 changed files with 37 additions and 7 deletions
+12 -2
View File
@@ -26,13 +26,18 @@ input int InpRSIPeriod = 14; // RSI period
// Example shown below
//
RangeBars rangeBars(MQLInfoInteger((int)MQL5_TESTING) ? false : true);
RangeBars *rangeBars = NULL;
//+------------------------------------------------------------------+
//| Expert initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
if(rangeBars == NULL)
{
rangeBars = new RangeBars(MQLInfoInteger((int)MQL5_TESTING) ? false : true);
}
rangeBars.Init();
if(rangeBars.GetHandle() == INVALID_HANDLE)
return(INIT_FAILED);
@@ -48,7 +53,12 @@ int OnInit()
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
rangeBars.Deinit();
if(rangeBars != NULL)
{
rangeBars.Deinit();
delete rangeBars;
rangeBars = NULL;
}
//
// your custom code goes here...