Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 587

 
AlexeyVik:
It doesn't work where the if() array is declared... But in the body of the program it can, but not like this, but in a loop or by copying one array to another.

Thanks, I'll try it out.

 
Folks, is there any way to get the indicator to change the colour of the bar when a condition is met ?
 
Question: How can I run the optimizer in the strategy tester to discard options when a StopLoss appears (in the same way as a negative option is discarded)?
 
Frostr:
Folks, is there any way to get the indicator to change the colour of the bar when a condition is met ?

You can either use colouring buffers or oldstyle, in two buffers with different colours and depending on the condition one will write a value into the other nothing.
 
Can I get the horizontal size of the current window in pixels using MQL?
 
Pyro:
Can I get the horizontal size of the current window in pixels using MQL?

int height=ChartGetInteger(0,CHART_HEIGHT_IN_PIXELS,0);
int width=ChartGetInteger(0,CHART_WIDTH_IN_PIXELS,0);
Print("CHART_HEIGHT_IN_PIXELS = ",height," pixels");
Print("CHART_WIDTH_IN_PIXELS = ",width," pixels");
 

artmedia70


Thank you, you're always a help:)

 
splxgf:

You can either use coloring buffers or oldstyle, in two buffers with different colours and depending on the condition, you write a value into one and nothing into the other.


Thanks, but I haven't seen any function that changes the colour of the bars on the chart... I mean something like this Bars ( ..., ...., Color) :) I don't even know how to highlight the bar that needs to change colour.

If anyone knows of such functions (ways), please advise ...

 
Frostr:
Folks, is there any way to get the indicator to change the colour of the bar when a condition is met ?


Look at the code of the Heiken Ashi indicator
 
Slivator:

Maybe this would work http://www.kimiv.ru/index.php?option=com_remository&Itemid=13&func=fileinfo&id=8

Only why would you want to change the colour of the bar? If the bar needs to be marked, maybe just put an icon.

That's just the way the man wants it. And rightly so...
Reason: