Indicators: Other_Candles - page 2

 
Artyom Trishkin:

Thanks. Maybe someone will take your advice:))))))

First identify the digit and then put it in instead of listing it. I didn't even have the brains to do that.....

 
Alexey Viktorov:

Thanks. Maybe someone will take your advice:))))))

First identify the digit and then put it instead of listing it. I didn't even have the brains for that.....

Well, you've seen yourself that enumerations are sometimes more convenient. And here, in the code of this indicator, it turns out that they are not? It turns out that these are the signs of a terrible code. Strange...

 
Artyom Trishkin:

Well, you have seen yourself that enumerations are sometimes more convenient. And here, in the code of this indicator, it turns out that they are not? It turns out that these are the signs of a terrible code. Strange...

I don't have enough censorious words... Artyom, do you understand the difference between in-house enumerations and self-written ones where there is no need for it?

 
Alexey Viktorov:

I don't have enough censorious words.... Artem, do you understand the difference between in-house and self-written lists where there is no need for it?

I do. Let me give you an example. Do you have tags on the bathroom and toilet doors at home? Many people have them, although each owner knows perfectly well where to wash and where to think.....

Are they creepy people?

 
Artyom Trishkin:

I understand. Let me give you an example. Do you have tags on your toilet and bathroom doors at home? Many have them, although each owner knows perfectly well where to wash and where to think.....

The realisation is terrible...

And in my toilet there are no signs, no signs, no locks. Everyone knows you can't go in there if the lights are on.

I can't remember what Renate calls these codes?

 
Alexey Viktorov:

The realisation is terrible...

And my toilet has no signs, no signs, no locks. Everyone knows you can't go in there if the lights are on.

I can't remember what Renate calls those codes.

Okay, I'm tired of discussing your faith. You'd better get busy, show everyone how to do things. And we'll discuss how creepy it is... Because you're all bad :)

 

Thanks for the criticism, it was a temporary blackout )

The code has been corrected and sent for publication.

 
Scriptor:

Thanks for the criticism, there was a temporary blackout )

I fixed the code and sent it for publication.

Sorry, but it didn't get better.

#property indicator_color1  clrLimeGreen,clrOrangeRed,clrGray

This line contains an array of colours. They are numbered from 0 just like any other array.

   SetIndexBuffer(4,BufferColors,INDICATOR_COLOR_INDEX);



   PlotIndexSetDouble(4,PLOT_EMPTY_VALUE,0);

Why should PLOT_EMPTY_VALUE be assigned to the buffer containing the colour of the lines, and even with a zero, which should be the colour index...?

What the hell are these lines for

input color    InpColorBullish   =  clrLimeGreen;  // Bullish candle colour
input color    InpColorBearish   =  clrOrangeRed;  // Bearish candle colour




   PlotIndexSetInteger(0,PLOT_LINE_COLOR,0,InpColorBullish);
   PlotIndexSetInteger(0,PLOT_LINE_COLOR,1,InpColorBearish);
if deleting them won't change anything?
 
Alexey Viktorov:
... From what side is the colour of the candles in the input parameters? ...

I'll say right away that I haven't delved into the author's code and discussion. I can't afford to devote full time to such things yet.

But on the basis of this phrase of yours, I looked at the work of this indicator on the chart. In terms of saving colours to a set file.

Therefore, I will make my assumption about the reason for outputting colours in the input parameters in this case. Based on my experience in this regard.


The thing is that in some of my indicators I, for example, put in the input parameters the colours of candlesticks for the next one:


You know that in the properties of custom indicators there is a possibility to save individual settings of input parameters to a set file. Using the Save button located in the Input Parameters tab of custom indicators.

/*For example, in order not to replace manually the values of external parameters, different from the default ones, but to load the saved individual ones via the Load button*/.

To illustrate what is said and described below, I will give a screenshot of the buttons/tabs/parameters I have in mind. From my old indicator. I crossed out only its name, as it is from the Market:


So, it is the values from the Input Parameters tab that are saved to the set file via the Save button. And this is logical.

Parameters from the Colours tab are not saved to that file. Added: There is no button to save to set file:



Therefore, to save colours to the set file, I, for example, had to output them in the Input parameters. /*So thatwhen installing an indicator on a chart with settings different from the default ones, you don't need to spend time on travelling through the tabs and setting the settings of interest manually*/.

And this reason is suitable for the indicator, on the page of which the discussion is going on.


P./S.: In the future something may change in the terminal in terms of saving such parameters. I'm writing as it was