I need help!!! I wanted to create a button, which would look like. I created the button using mql4 help.
The essence of the problem is to set a triangle in the button, I tried to do it withSymbolic constants by translating them to a string, specifying them in the text of the button.
explicit symbol '▼' is not recognized in the log says Y.
Who has already encountered the solution, please share!!!!
I couldn't find any ASCII code in the character table.
//--- добавим символ в строку string test="";
StringSetCharacter(test,0,0xAE);
Print(test);
korobok777: wanted to create a button, ..... with a triangle in the '▼' button
//+------------------------------------------------------------------+//| Создается кнопь и демонстрируется что надо. Э-Кнопка.mq4 |//+------------------------------------------------------------------+#property strict//+------------------------------------------------------------------+//| Инициализация - создается кнопь |//+------------------------------------------------------------------+intOnInit()
{
ObjectCreate (0,"Кнопь",OBJ_BUTTON,0,0,0); // Создать кнопкуObjectSetInteger(0,"Кнопь",OBJPROP_CORNER,CORNER_RIGHT_UPPER); // Правый верхний уголObjectSetInteger(0,"Кнопь",OBJPROP_XDISTANCE,185); // Расстояние от (правого) края окнаObjectSetInteger(0,"Кнопь",OBJPROP_YDISTANCE,52); // Расстояние по высоте от (верха окна) ObjectSetInteger(0,"Кнопь",OBJPROP_XSIZE,180); // Размер по ширинеObjectSetInteger(0,"Кнопь",OBJPROP_YSIZE,25); // Размер по высотеObjectSetString (0,"Кнопь",OBJPROP_FONT,"Wingdings 3"); // А это что? Угадай!!!ObjectSetString (0,"Кнопь",OBJPROP_TEXT,"qsИФЬд"); // Надпись из 6 стрелок
ObjectSetInteger(0,"Кнопь",OBJPROP_COLOR,White); // Цвет надписи - можно и черный
ObjectSetInteger(0,"Кнопь",OBJPROP_BGCOLOR,Green); // Цвет фона - можно ...
ObjectSetInteger(0,"Кнопь",OBJPROP_BORDER_COLOR,Yellow);// Цвет рамкиObjectSetInteger(0,"Кнопь",OBJPROP_HIDDEN,false); // Не прятать в списке объектовObjectSetInteger(0,"Кнопь",OBJPROP_STATE,false); // Ненажатое состояниеObjectSetInteger(0,"Кнопь",OBJPROP_FONTSIZE,12); // Размер шрифтаreturn(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+//| Expert tick function |//+------------------------------------------------------------------+voidOnTick()
{
}
//+------------------------------------------------------------------+//| Реакция на события |//+------------------------------------------------------------------+voidOnChartEvent(constint id,
constlong &lparam,
constdouble &dparam,
conststring &ИмяКнопки)
{
if(ИмяКнопки=="Кнопь")
{
ObjectSetInteger(0,"Кнопь",OBJPROP_STATE,false);
ObjectSetInteger(0,"Кнопь",OBJPROP_BGCOLOR,Yellow);
ObjectSetString (0,"Кнопь",OBJPROP_TEXT,"Ладно, ухожу");
ObjectSetInteger(0,"Кнопь",OBJPROP_COLOR,Black);
ObjectSetInteger(0,"Кнопь",OBJPROP_BORDER_COLOR,Red);
ObjectSetString (0,"Кнопь",OBJPROP_FONT,"Arial");
WindowRedraw(); // Перерисовать окноSleep(777); // Пауза для разглядыванияObjectDelete("Кнопь"); // Поглядели - и хватит
ExpertRemove(); // Дело сделано, вы свободны...
}
}
Good afternoon. I need help. maybe there is already such a code element. i need to view the order history and return the opening price of the last order. thank you in advance
korobok777: where to look for information on fonts?
BUT! Instead of studying fonts and buttons, the point of entry into the market is sought!!!!!! This is more important than anything else. And when we write an income-generating Expert Advisor, then we will go ... and there at our leisure we'll look for everything else
BUT! Instead of studying fonts and buttons, the point of entry into the market is sought!!!!!! This is more important than anything else. And when we write an income-generating Expert Advisor, then we will go ... and at our leisure we will look for everything else.
Thanks again, I've been racking my brain....
The Expert Advisor is written!!! Now all that is left is buttons at your leisure :-):-)and jokes...
ara66676: I can't understand why position search and closing stops in the loop, I've already reversed the loop and increased the number of positions, in the tester it still skips (leaves) positions. Please advise if you can see where and what is wrong...
Doubtful is the value of -1 for x1. If it is used as position number in their list, there is no such number.
Good afternoon! I can't find the \Terminal\Common\Files folder. I can't even find the file name if FILE_COMMON is added. Can you explain where this shared folder of all client terminals is?
Help, please! There are 2 files: an indicator and an Expert Advisor. How to correctly refer to the function in the indicator via #include? iCustom is not suitable for various reasons. This is what I have written in the indicator:
bool BuyTrue(double& переменная, int переменная) export
{
//тело функцииreturn(true);
}
And this is what I wrote in the Expert Advisor:
#import "НазваниеИндикатора.ex4"bool BuyTrue(double& переменная, int переменная);
if (BuyTrue(переменная, переменная))
Opn_B = true;
But for some reason, the Expert Advisor does not work, the indicator does not appear in the price chart during testing. Did I write it correctly, and if there is an error, where is it?
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.
I need help!!! I wanted to create a button, which would look like
. I created the button using mql4 help.
The essence of the problem is to set a triangle in the button, I tried to do it withSymbolic constants by translating them to a string, specifying them in the text of the button.
explicit symbol '▼' is not recognized in the log says Y.
Who has already encountered the solution, please share!!!!
I couldn't find any ASCII code in the character table.
Take your pick ...
Thank you very much,where can I see more information about fonts?
Thank you,thank you,thank you!!!!!!
BUT! Instead of studying fonts and buttons, the point of entry into the market is sought!!!!!! This is more important than anything else. And when we write an income-generating Expert Advisor, then we will go ... and there at our leisure we'll look for everything else
BUT! Instead of studying fonts and buttons, the point of entry into the market is sought!!!!!! This is more important than anything else. And when we write an income-generating Expert Advisor, then we will go ... and at our leisure we will look for everything else.
I can't understand why position search and closing stops in the loop, I've already reversed the loop and increased the number of positions, in the tester it still skips (leaves) positions. Please advise if you can see where and what is wrong...
I can't find the \Terminal\Common\Files folder. I can't even find the file name if FILE_COMMON is added. Can you explain where this shared folder of all client terminals is?
Tuta.
Help, please! There are 2 files: an indicator and an Expert Advisor. How to correctly refer to the function in the indicator via #include? iCustom is not suitable for various reasons. This is what I have written in the indicator:
And this is what I wrote in the Expert Advisor:
But for some reason, the Expert Advisor does not work, the indicator does not appear in the price chart during testing. Did I write it correctly, and if there is an error, where is it?