Libraries: BestInterval - page 29

 

Hi!

An error appears during compilation. Has anyone encountered it?

I searched the forum, I don't think it's been discussed.

Files:
ys.jpg  31 kb
 
Dmitrii Verevkin #:

an error appears during compilation.

Add these lines to Deal.mqh.

#include "Deal_Base.mqh"

struct DEAL : public DEAL_BASE
{
  int Index;

  void ToNull( DEAL &Deals[] ) const
  {
  #ifdef __MQL5__
    Deals[this.Index].DEAL_BASE::ToNull();
  #else // __MQL5__ - https://www.mql5.com/ru/forum/322209#comment_13314616
    Deals[this.Index].ToNull();
  #endif // __MQL5__

    return;
  }
  
  void operator =( const DEAL_BASE &bDeal )
  {
    /*this.*/ DEAL_BASE::operator=(bDeal); // https://www.mql5.com/ru/forum/1111/page3368#comment_48437633
    
    return;
  }  
};
 
Dmitrii Verevkin #:

Hi!

I get an error when compiling. Has anyone encountered it?

I searched the forum, I don't think it's been discussed.

It helped.

thanks!

 
Please help How can I solve this problem? There are errors after compilation.
Files:
 
1005829945 #:
Please help How can I solve this problem? There are errors after compilation.
OnTick function is missing.
 

Calculations have been significantly accelerated.

#include <fxsaber\Benchmark\Benchmark.mqh> // https://www.mql5.com/en/code/31279

#define  ORDER_COMMISSION 0
#include <fxsaber\Virtual\Virtual.mqh> // https://www.mql5.com/en/code/22577
#include <fxsaber\BestInterval\BestInterval.mqh> // https://www.mql5.com/en/code/22710

// Benchmark script
void OnStart()
{
  if (VIRTUAL::SelectByHandle(VIRTUAL::Create("BestInterval.mqh.virt"))) // https://c.mql5.com/3/492/BestInterval_mqh.zip
  {
    BESTINTERVAL_INPUT Inputs;

    Inputs.AmountDeleteIntervals = 5;
    Inputs.MinPF = 1.0;
    Inputs.OnlyDelete = false;
    Inputs.Method = METHOD_WEEK;
    
    Inputs.Length = 0.8;
    Inputs.Amount = 10;
            
    BESTINTERVAL BestInterval;
    
    _B(BestInterval.FullCalculate(Inputs), 1);
    Print(BestInterval.ToStringConst());
  }  
}


It was.

Alert: Bench_Stack = 0, 1 <= Time[Test6.mq5 174 in OnStart: BestInterval.FullCalculate(Inputs)] = 6724116 mcs.


Now.

Alert: Bench_Stack = 0, 1 <= Time[Test6.mq5 174 in OnStart: BestInterval.FullCalculate(Inputs)] = 394778 mcs.


Optimisation speeds up several times over.

Files:
 
Which files have been updated?
 
hini #:
Which files have been updated?
Holiday.mqh
Deal_Base.mqh
Deal.mqh
Interval.mqh
BestInterval.mqh