I want to make two changes to an existing indicator "macd_histogram" and I would appreciate your kind help:
I want to show the date in alert window in "hh:mm:ss" format. By
default the indicator shows the date of alerts in alert window in
"yyyy:mm:dd, hh:mm:ss" format. (pls see the attached image 1.jpg.) I
read that TimeToString function should be used, but I do not know how. In fact, I want to use TimeToString (datetime,TIME_SECONDS) that gets results as "hh:mm:ss" format.
I want to transfer the input of colors (MACD, Signal MA, Signal MA, Buy
& Sell) from "colors" tab (pls see image 2.jpg) to "inputs" tab
(pls see image 3.jpg). In other words, I want to have all inputs in
"inputs" tab and eliminate the "Colors" tab. I know that it should be
done by creating "input color..." instead of "#property..." in the
indicator, but I do not know how to modify the content of the code so
that it gets the colors from input color rather than #property.
Yes, you can, see this: https://www.mql5.com/en/docs/common/alert :
Displays a message in a separate window.
void Alert( argument, // first value ... // other values );
[in] Any values separated by commas. To split the information output in several lines you can use the line feed character "\n" or "\r\n". The number of parameters can not exceed 64.
No return value.
Arrays can't be passed to the Alert() function. Arrays should be output elementwise. Data of the double type are output with 8 digits after the decimal point, data of the float type are displayed with 5 digits after the decimal point. To output the real numbers with a different precision or in a scientific format, use the DoubleToString() function.
Data of the bool type is output as "true" or "false" strings. Dates are output as YYYY.MM.DD HH:MI:SS. To display a date in another format use the TimeToString() function. Data of the color type are output either as an R,G,B string or as a color name, if the color is present in a color set.
Yes, you can!!!
Pls read the Alert command description more carefully:
Dates are output as YYYY.MM.DD HH:MI:SS. To display a date in another format use the TimeToString() function.