[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 12

 
Yulia:

For example, as I tried if ( variable X == 0){ draw red Buf_0[i]=High[i]; Buf_0[i-1]=High[i-1]; X=1}

then loop through i if (X==1){ draw green Buf_1[i]=lou[i]; Buf_1[i-1]=lou[i-1]; X=0 }

I understand that I am missing something, that's why I want to understand. I have codes of other indicators, I tried to understand them, but they all contain a lot of conditions, loops, variables, etc. I want to focus only on the basic principles of building such indicators.

Sort out what role does the letteri have? Just above see the beginning of the cycle in which it is presented! It runs through all the values of the period set in extern (bars) starting from the rightmost bar. And it is calculated on every new bar, hence the line comes out solid. It is better, if you start studying the textbook written in clear and understandable language. Patience and diligence will help, and ready-made codes will be even more confusing. Good luck with your studies!
 

Hi ! the question is how to programmatically find an object on a graph or copied from another object ...

I mean a line or a shape , through counter + mouse made a parallel copy ... How to find this object or know its name ???

 
borilunad:
Figure out, what is the role of the letteri? Just above see the beginning of the loop where it is presented! It runs through all values of the period set in extern (bars) starting from the rightmost bar. And it is calculated at every new bar, that is why the line is solid. It is better, if you start studying the textbook carefully, written in simple language. Patience and diligence will help, and ready-made codes will confuse you even more. Good luck with your studies!

It says "CYCLE by i". I understand it very well - we go through the bars starting from the leftmost one, and each buffer stores the value of each High bar shifted by i.

I have enough patience, and I love to learn. If I asked for a simple code example, it means I probably have a need for it.

 
lottamer:


reading...

but this expression int Delta=NormalizeDouble((Bid-Level)Point,0);


equals two

int Delta;

Delta==NormalizeDouble((Bid-Level)Point,0);

???

No it is not, == and= are two different operations, the first is comparison, the second is value assignment.
 
Yulia:

It says "CYCLE by i". I understand it very well - we go through the bars starting from the leftmost one, and each buffer stores the value of each High bar shifted by i.

I have enough patience, and I love to learn. If I asked for a simple code example, it means I must have a need for it.

I was told before that it just wouldn't work. First the Basics, then Buki and so on gradually, step by step, to learn better and faster.

Easiest code in CodeBase: Moving Average. Go for it!

And not the left, but the right!

 
VOLDEMAR:

Hi ! the question is how to programmatically find an object on a graph or copied from another object ...

I mean a line or a shape , through counter + mouse made a parallel copy ... How to find this object or know its name ???


Only by the name of the object.
 
rigonich:
No it's not equal, == and= are two different operations, the first is a comparison, the second an assignment of value.


I'm sorry, I made a bad typo...

That's what it should be.

int Delta;

Delta=NormalizeDouble((Bid-Level)Point,0);

 
Yulia:

It says "CYCLE by i". I understand it very well - we go through the bars starting from the leftmost one, and each buffer stores the value of each High bar shifted by i.

If I asked for a simple code example, it means I must have a need for it.


In order to display an indicator line, you have to:

1. create arrays with certain properties, called indicator buffers, from which the coordinates of points used to draw the indicator line will be taken. Ready-made functions embedded in the terminal are used for this purpose.

2. set the style of drawing of the indicator line by selecting it among the available options. this can also be done using built-in functions of the terminal.

3. fill this array with some values. this is done in the function for starting the indicator. and start the program drawing the indicator.

The terminal has no built-in function that changes the drawing style of one buffer, i.e. it can draw different parts of one line in different styles. For this you need to create your own, user-defined function, and it is not easy, and you should know at least the basics of programming.

 
lottamer:


I'm sorry, I made a bad typo...

That's what it should be.

int Delta;

Delta=NormalizeDouble((Bid-Level)Point,0);


Yes, these are equivalent expressions, the variable declaration can be done together with initialization in one statement.
 
VOLDEMAR:

Hi ! the question is how to programmatically find an object on a graph or copied from another object ...

I mean a line or a shape , through counter + mouse made a parallel copy ... How to find this object or know its name ???

Alternatively, rename it to a name that the software can find ... Since you copied it with your mouse (manually), you see it and can also do the next (2nd) manual renaming operation. The software will pick it up.
Reason: