thank you, that's enough for me, exactly, I didn't know it existed, I didn't want the whole code, just to show how to display the current month text label
ObjectSetString(0,"Month",OBJPROP_TEXT, "Month Profit / Loss" +DoubleToString(dayprofywm,2)+" "+AccountInfoString(ACCOUNT_CURRENCY)" "+ );
correction, I know what ObjectSetString is, but I don't know how to add + current month text to the end
Problem solved, in case it's useful to someone in the future
Which problem have you solved, as that code simply provides the number of the month, it doesn't solve your first question of how to make it a text representation of the month, nor the second of how to add the text value to the label ?
Which problem have you solved, as that code simply provides the number of the month, it doesn't solve your first question of how to make it a text representation of the month, nor the second of how to add the text value to the label ?
Of course, a programmer would do it better, but it's enough for me if it works
if (month == 4)
{
ObjectSetString(0,"Month",OBJPROP_TEXT, "April : Profit / Loss " +DoubleToString(dayprofywm,2)+" "+AccountInfoString(ACCOUNT_CURRENCY));
}
assuming you are assigning an int value for the month to the variable month, then use this function so that you only need to code the ObjectSetString once.
perfect, thank you very much, of course I would never have come up with your solution in my life
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
We already helped you providing the code you wanted for retreiving Month name based on month number...
But we can't implement the whole code for you. There is the Freelance section for this kind of requests.
Seems you don't know how to use ObjectSetString command, this can help you.
https://www.mql5.com/en/docs/objects/objectsetstring
We already helped you providing the code you wanted for retreiving Month name based on month number...
But we can't implement the whole code for you. There is the Freelance section for this kind of requests.
Seems you don't know how to use ObjectSetString command, this can help you.
https://www.mql5.com/en/docs/objects/objectsetstring
We already helped you providing the code you wanted for retreiving Month name based on month number...
But we can't implement the whole code for you. There is the Freelance section for this kind of requests.
Seems you don't know how to use ObjectSetString command, this can help you.
https://www.mql5.com/en/docs/objects/objectsetstring
Problem solved, in case it's useful to someone in the future
Problem solved, in case it's useful to someone in the future
Which problem have you solved, as that code simply provides the number of the month, it doesn't solve your first question of how to make it a text representation of the month, nor the second of how to add the text value to the label ?
Which problem have you solved, as that code simply provides the number of the month, it doesn't solve your first question of how to make it a text representation of the month, nor the second of how to add the text value to the label ?
Of course, a programmer would do it better, but it's enough for me if it works
Of course, a programmer would do it better, but it's enough for me if it works
assuming you set an int value for the month to the variable month, use this function so you only need to code ObjectSetString once
assuming you are assigning an int value for the month to the variable month, then use this function so that you only need to code the ObjectSetString once.