[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 46
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello! I need help in redoing the code. The main part of the code is attached as a file. The code builds a table. I figured out how to insert my values into Content - table content, but unsuccessfully tried to do the same with font colour.
And so, you need to do a text colour control like done with Content:
i.e. roughly like this:
aContentTextColor [i][j] // i, j номер колонки и строки - присваивать им цвет
Hello! I need help in redoing the code. The main part of the code is attached as a file. The code builds a table. I figured out how to insert my values into Content - table content, but unsuccessfully tried to do the same with font colour.
And so, you need to do text colour control as done with Content:
i.e. something like this:
increase number of elements by "lines" (e.g. for(int j=0;j<4;j++) and in array declaration, too, accordingly ) and write in 2nd and 3rd (by numbers) elements colour codes in convenient for further interpretation
or for a colour you can define the second array of the same dimension, as for the content
increase the number of elements per "line" ( for(int j=0;j<4;j++) and in the array declaration, too, respectively ) and write in the 2nd and 3rd (by number) elements the colour codes in a convenient form for further interpretation
or for the colour, you can create a second array of the same dimensions as for the content
Thanks for the reply!
Tried the second option with the addition of the array, but the other code is tied - tried to change the other code purely logically by analogy with the content - errors.
I don't understand it with the first variant, but I have a feeling it won't work - it won't be compact)
Thanks for the reply!
Tried the second option with the array addition, but the other code is tied - tried changing the other code purely logically by analogy with the content - errors.
I don't understand it with first variant, but I feel, that it will not work - it will not be compact)
Let me explain the first variant:
declare array not, for example, < string Content[100][2] >, but <string Content [100][3]>, in loop processing besides your string <Content[i][j]="Column "+(j+1)+", string "+(i+1);>
add < Content[i][j+1]="Green" > if you only need one colour per line. Or ="1", depending on how you decide to code colours there
Let me explain the first option:
declare an array not, for example, < string Content[100][2] >, but <string Content [100][3]>, in the processing loop besides your string <Content[i][j]="Column "+(j+1)+", string "+(i+1);>
add < Content[i][j+1]="Green" > if you only need one colour per line. Or ="1", depending on how you decide to code colours there
I see what I mean now, thank you!
atztek, so look at the code, if you know what the function code looks like and it's positioned like this:
ZS: if the function is in INIT() or DEINIT() you can try it without the code :)Some operations that the function is allowed to do in deinit are not allowed in start, etc. (it is used several times in different parts of the code). Thought maybe there is a command that allows you to check.
And in general, it was solved by adding one more external variable to the list of function variables.
Let me explain the first option:
declare an array not, for example, < string Content[100][2] >, but <string Content [100][3]>, in the processing loop besides your string <Content[i][j]="Column "+(j+1)+", string "+(i+1);>
add < Content[i][j+1]="Green" > if you only need one colour per line. Or ="1", depending on how you decide to code colours there
Unfortunately it was not clear to me, why change the number of columns from 2 to 3? And why assign a value (string value) to Green? It's not clear to me...
Some operations that functions are allowed to perform in deinit are not allowed in start, etc. (it's used several times in different parts of the code). Thought maybe there's a command that lets you check.
And in general, it was solved by adding one more external variable to the list of function variables.
Guys, please advise!
I need the program to keep SL in ten pips from the price and when closing at the level of SL, it will change the order to the opposite one. How this can be done?
It is better to define a variable at global level, which can be assigned a value depending on which function the program is in. Then there is no need to keep track of the parameter passed into the user function, which is a potential source of errors.
Thank you!