1. Grammatical inaccuracy. There is a comment before OnCalculate
//+------------------------------------------------------------------+ //| Average True Range| //+------------------------------------------------------------------+
but it should be like this:
//+------------------------------------------------------------------+ //| Bulls Power OnCalculate function| //+------------------------------------------------------------------+
2. In for(i=limit;i<rates_total;i++) did you accidentally forget about && !IsStopped() ?
1. Grammatical inaccuracy. There is a comment before OnCalculate
but it should be like this:
2. In for(i=limit;i<rates_total;i++) did you accidentally forget about && !IsStopped() ?
You're not a programmer by any chance?
I see, but I can assure you that about 99% of codobase indicators do not contain !IsStopped() in the indicator value calculation loop for(i=limit;i<rates_total;i++)
I understand, but I can assure you that about 99% of codobase indicators do not contain !IsStopped() in the loop of calculating indicator values for(i=limit;i<rates_total;i++)
Let me disagree with you. Indicators posted in CodeBase by users with high ratings, i.e. MQL5 experts and MetaQuotes themselves, contain !IsStopped(). These are the codes I look up to.
Well, rating is a dark matter, apparently you are talking about the latest indicators from codobase, there is one author/programmer GODZILLA.
I don't argue, I may have missed something, but I remember reading articles, for example https://www.mql5.com/ru/articles/35, as well as earlier I looked into kodobase more often, but I don't know about the mandatory use of IsStopped() yet.
let me read what you are guided by except for the latest indicators from kodobase?
Well, rating is a dark matter, apparently you are talking about the latest indicators from kodobase, there is one author/programmer GODZILLA.
I don't argue, I may have missed something, but I remember reading articles, for example https://www.mql5.com/ru/articles/35 as well as earlier I looked into kodobase more often, but I don't know about the mandatory use of IsStopped() yet.
let me read what you are guided by except for the latest indicators from kodobase?
I asked in the forum about && !IsStopped() in the for loop. As I understand it, it is desirable to insert it into the loop, this is the difference from MQL4. At least I write my indicators with !IsStopped().
Had a quick look through your link, but I have not found an answer from the developers yet.
We are on the forum of MT developers and programmers, why not get the right answer by "collective mind"?
here I have created a topic https://www.mql5.com/ru/forum/9783

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Bulls Power:
Everyday trading represents a battle of buyers ("Bulls") pushing prices up and sellers ("Bears") pushing prices down. Depending on what party scores off, the day will end with a price that is higher or lower than that of the previous day. Intermediate results, first of all the highest and lowest price, allow to judge about how the battle was developing during the day.
It is very important to be able to estimate the Bulls Power balance since changes in this balance initially signalize about possible trend reversal. This task can be solved using the Bulls Power oscillator developed by Alexander Elder and described in his book "Trading for a Living: Psychology, Trading Tactics, Money Management". Elder based on the following premises when deducing this oscillator:
On these premises, Elder developed Bulls Power as the difference between the highest price and 13-period exponential moving average (HIGH - EMA).
Author: MetaQuotes Software Corp.