Wingding Arrow Error, Displaying Square Instead

 

I realized there are some characters in the wingding code that cannot be displayed properly, it always displays as a square. I use the example in the documentation with several inputs but it's still the same.

void OnStart()
  {
//---
   string up_arrow="up_arrow";
   datetime time=TimeCurrent();
   double lastClose[1];
   int close=CopyClose(Symbol(),Period(),0,1,lastClose);     // Get the Close price
//--- If the price was obtained
   if(close>0)
     {
      ObjectCreate(0,up_arrow,OBJ_ARROW,0,0,0,0,0);          // Create an arrow
      ObjectSetInteger(0,up_arrow,OBJPROP_ARROWCODE,144);    // Set the arrow code
      ObjectSetInteger(0,up_arrow,OBJPROP_TIME,time);        // Set time
      ObjectSetDouble(0,up_arrow,OBJPROP_PRICE,lastClose[0]);// Set price
      ChartRedraw(0);                                        // Draw arrow now
     }
   else
      Print("Unable to get the latest Close price!");


Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Wingdings
Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Wingdings
  • www.mql5.com
Wingdings - Objects Constants - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 

Another test:

void OnStart()
{
   for(int i = 33; i < 256; ++i) // character codes
   {
      const int b = i - 33; // bar number
      const string name = (string)b + "Wingdings-"
         + (string)iTime(_Symbol, _Period, b);
      ObjectCreate(0, name, OBJ_ARROW,
         0, iTime(_Symbol, _Period, b), iHigh(_Symbol, _Period, b) + 100 * _Point);
      ObjectSetInteger(0, name, OBJPROP_ARROWCODE, i);
   }
   
   PrintFormat("%d objects with arrows created", 256 - 33);

Most characters cannot be displayed correctly...

 

It works on my side:

   ObjectCreate(ChartID(),"up_arrow",OBJ_ARROW,0,TimeCurrent(),SymbolInfoDouble(_Symbol, SYMBOL_ASK));
   ObjectSetInteger(ChartID(),"up_arrow",OBJPROP_ARROWCODE,144); 
   ObjectSetInteger(ChartID(),"up_arrow",OBJPROP_WIDTH,5);    


 
Yashar Seyyedin #:It works on my side:

but mine doesn't, maybe it's because I'm using the Beta version?

 
Le Minh Duc #: but mine doesn't, maybe it's because I'm using the Beta version?

Maybe! Please test with the official release build 4153.

Also, please provide details about the operating system you are using?

 

See if the following helps ...

Forum on trading, automated trading systems and testing trading strategies

MT4 Chart Cannot Show Arrows

Chin Min Wan, 2023.12.17 09:24

Finally, my objects issues have the solution, my issues have been resolved and I learned something new today ... thank you to everybody

https://www.mql5.com/en/forum/316034#comment_12122761

  1. Settings
  2. Time & Language
  3. Language (left side)
  4. Administrative Language Setting (right side)
  5. Administrative (tab)
  6. Change System Locale (button)
  7. Uncheck this box : "Beta: Use Unicode UTF-8 for worldwide language support"

Forum on trading, automated trading systems and testing trading strategies

Solved : MT4 wingdings font or character bugs

Koros Jafarzadeh, 2019.06.19 07:12

Thanks, I solved this problem, It came from system locale setting, The solution is :

  1. Settings
  2. Time & Language
  3. Language (left side)
  4. Administrative Language Setting (right side)
  5. Administrative (tab)
  6. Change System Locale (button)
  7. Uncheck this box : "Beta: Use Unicode UTF-8 for worldwide language support"
 
Fernando Carreiro #:

See if the following helps ...

Thanks for the instructions, it worked as it should now

Reason: