How please write a formula so that I can display the name of the current month in the label ?
Create a string function that based on the passed integer number of month return the name of it.
An example.
string MonthToName(int month_number) { switch(month_number) { case 1 : return "January"; case 2 : return "February"; case 3 : return "March"; case 4 : return "April"; case 5 : return "May"; case 6 : return "June"; case 7 : return "July"; case 8 : return "August"; case 9 : return "September"; case 10 : return "October"; case 11 : return "November"; case 12 : return "December"; default : return ""; } return ""; }
string Months[]= { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", }; .. { Months[month_number] } ..
Simpler to access although zero based... But you risk out of range problems.
Thank you all many times l, I'm a total string amateur, what should I write in the line ?
ObjectSetString(0,"Month,OBJPROP_TEXT,...
You should study the documentation.
I agree with @Yashar Seyyedin
If you don't know how to use our snippets, I think you should start study mql language and read documentation...
thanks, but I don't want to be a programmer
because of one question and one solution?
Paul Anscombe #:
If you can’t be bothered to look at the documentation then why should people be bothered to spoon feed you
I looked in the documentation, unfortunately I didn't find a workable solution for me. I don't know that I would ask you anything. So don't lecture me If someone can help me I will be glad, but I know it is a kindness.
If you can’t be bothered to look at the documentation then why should people be bothered to spoon feed you
And One question leads to another
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