Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1700

 
MakarFX #:
tickCount counts trades and if there was more than 1 trade on the tick, "tickCount%100" may not be equal to "0".

% means the remainder of the division, if the number is divisible without a remainder, then it is a multiple of the divisor.

if tickCount%100==0it means the number is a multiple of 100, 200, 300,400...

1

 
Super_good #:
GOOD AFTERNOON ONCE AGAIN. I found out that my main account DanilaMactep was deleted. HOW CAN I KNOW THE REASON FOR DELETION AND WHERE CAN I WRITE A REQUEST FOR REINSTATEMENT? I HAVE ALWAYS COMMUNICATED ACCURATELY AND DID NOT INSULT ANYONE. I HAVE ALWAYS COMMUNICATED IN A POLITE MANNER AND I HAVE NOT BEEN RUDE TO ANYBODY. I COULD NOT HAVE VIOLATED FINANCIAL RULES AS I DEPOSITED MY ACCOUNT BACK IN 2014 AND I HAVE NOT MADE ANY OTHER TRANSACTIONS, I.E. I COULD NOT HAVE ANY FRAUDULENT TRANSACTIONS.

Daniel, your account has been restored. Follow the password recovery procedure: https://www.mql5.com/ru/auth_forgotten

 
MakarFX #:

I'm not good at mql5, but would do this

Thank you, the method works.

 
Taras Slobodyanik #:

% means the remainder of the division, if the number is divisible without a remainder, then it is a multiple of the divisor.

if tickCount%100==0 then it is a multipleof 100, 200, 300, 400...


tickCount counts trades

prev_tick tickCount =99;

curr_tickCount tickCount =101;

How does " tickCount%100" help here?

 
Taras Slobodyanik #:

two times already written-referenced)

https://www.mql5.com/ru/forum/160683/page1698#comment_25500114

Thanks, the method works too, but it works only by cutoffs of 100, 100 trades passed, fix inside the required values, wait for the next cutoff.

I just needed to work within the range of 100 trades, since all cutoffs, times, bars, trades, etc. in calculations are irrelevant, it's already in the past.

 
Konstantin Seredkin #:

Thanks, the method works too, but it works only by cutoffs of 100, 100 trades passed, fix inside the required values, wait for the next cutoff.

I had to work within the range of 100 trades, because all cutoffs, times, bars, trades, etc. are not relevant in calculations, it's already in the past.

so it's the same if the residual value is not zero, then it's within the range of 100 )
if the residual value is zero, then it's another 100.

MakarFX #:

tickCount counts trades

prev_tick tickCount =99;

curr_tickCount tickCount =101;

How can " tickCount%100" help here?

if the remainder is not zero, then it is 99 or 101 or any other value not a multiple of 100

 
Konstantin Seredkin #:
Taras Slobodyanik #:

Everything is much simpler

// Определить количество тиков по суммарному тиковому объёму баров диапазона
   long tickVolumes[];
   int tickVolumeCount=CopyTickVolume(m_symbol,PERIOD_M1,poi,poifin-1,tickVolumes);
   if(tickVolumeCount<=0)
      return;
   long tickVolumesTotal=Sum(tickVolumes);     
// Скопировать тики, нужны только совершённые сделки, нужна информаци только по Last + объём + время тика
   MqlTick ticks[];
   int tickCount=CopyTicks(m_symbol,ticks,COPY_TICKS_TRADE,poi*1000,(uint)tickVolumesTotal);
   int KillCount=tickCount%100;
// Нет тиков - нет гистограммы
   if(tickCount<=0)
     {
      return;
     }
 
Artyom Trishkin #:

Daniel, your account has been restored. Follow the password recovery procedure: https://www.mql5.com/ru/auth_forgotten

Thanks for the help - was the account deleted by mistake or did I violate something?)

 
DanilaMactep #:

Thanks for the help - was the account deleted by mistake or did I do something wrong?)

Accident
 
DanilaMactep #:
And you're back on the horse!))