[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 199

 
FAQ:


Define a foreground chart colour, write an intercept handler, and repaint.

Is that clear?


The point is clear. I don't know what function to use to pull the parameter. Okay, thank you.

I'll try poking around in the guts of something like zup, where the text

about patterns inherits the text colour of the window colour scheme.

 
It's pretty simple, use WINAPI's GetPixel() function to grab the colour at the 4,4 point - this will be the colour of the foreground, the rest is nothing.
 

In one indicator I came across the following construction:

int R; //variable is declared on the global level

I found the same variable with the & symbol in a user-defined function like this

void Function(int A, int B, int &R) {R = A*B}

Can anyone tell me why this is done and where I can read about it in detail?

 
AndEv:

In one indicator I came across the following construction:

int R; //variable is declared on the global level

I found the same variable with the & symbol in a user-defined function like this

void Function(int A, int B, int &R) {R = A*B}

Can anyone tell me why this is done and where I can read more about it?


The tutorial is here, and google rules!
 
Roman.:

Tutorial here and google rules!


I don't understand what would change if it were like this:

void Function(int A, int B) {R = A*B}

The R variable is declared globally and will be visible within the function anyway. In what cases is it necessary to pass parameters by reference?

 
Vinin:

You can, but you need to get the EA up to speed

Yes, I understand that :) It's just that you often try some strategy, a tester version, just to see how the idea works out. Sometimes errors there reveal themselves in a completely different light. And you don't have time to waste, if you need to compose and see it in a hurry.

Is there any way to bluntly close it, so that it does not copy what he writes to the log file? Question about it.

 
Pyro:

That's understandable:) It's just that often you just try a strategy, a tester version, just to see how the idea works out. Sometimes the mistakes come out in a completely different light. And you don't have time to waste, if you need to compose and see it in a hurry.

Is there any way to bluntly close it, so that it does not copy what he writes to the log file? Question about it.



How can you trust an EA that works in error
 
alsu:

It needs something else - to change the program's internal variable, the reference point for drawing the indicator, and then to re-calculate and redraw the line after the key combination is pressed.

Why doesn't MT want hooks, by the way?


Thank you for understanding!):
Reason: