Indicators: STARC bands

Mladen Rakic  
Upgraded version STARC band with an addition of a simple criteria for color candles display along with the bands - version 1.1

The criteria for color candles is as simple as it gets : STARC bands are calculated using one average - along with it a "fast" average of a same type and price is calculated, and if the fast average is crossing slow average up, color of the candle is changed to color for up, and in color for down if the fast average crosses the slow average down. Setting the fast period to <= 1 makes it equal to chosen price crossing STARC bands main average value

Mladen Rakic  
Alain Verleyen:

Hi, there is a bug in MTF mode. Both version.

M1 Chart => H1 timeframe, H1 Chart => D1 timeframe.

2016.11.09 11:59:26.956    starc_bands (EURUSD,M1)    cannot load custom indicator 'starc_bands' [4802]
2016.11.09 12:06:15.427    starc_bands_1.1 (EURUSD,H1)    cannot load custom indicator 'starc_bands_1.1' [4802]

Error 4802 is an error that happens with any of the indicators that are calling some other indicator (or itself), especially on weekends when there are no new ticks or when the higher time frame is called for the first time after the initialization.

That is why the handle is checked and re-checked and when that error is cleared, it continues normal operation. That is an issue of mt not of the code. The indicator works as it is supposed to work once when it gets a "pass" by that error 4802 (it can not be forced to wait from an indicator since we can not make the indicator "sleep" to force some action until it is cleared - hence we have to wait for the next occasion to pass through the 4802 "gate"). You also have noticed that it continues to work as it should once when it gets a new tick after that error when used on live charts

All this above said is for real time usage on live charts - back-testing can not be conducted in that mode of multi time framing

Finding a possible work-around of back-testing issues (the error that you got was from back-testing) was not a goal of this type of code. The goal was to make it work as it should in an "as simple as it gets" mode in normal usage.
Mladen Rakic  

Without going into "heavy explanation" why that issue was happening in back-test and it was not in real time, added a version (version 1.2) that solves back-testing issue too

In order to make this version compatible with both previous version, added an option to show candles (as in version 1.1) or hide them (as in version 1.2) so both modes can be emulated with the version 1.2 now

Thanks for indicator. Can someone change a mtf-version: delete filling, only with line-borders?