Ascii Symbol (up arrow) not displaying on chart

 

Hi, can anyone tell me what I am doing wrong here?

I get no errors.


Thank you.


    // Create a unique label name
    string labelName = "AsciiCharacter30";

    // Delete the label if it already exists
    ObjectDelete(labelName);

    // Create a text label on the chart
    if (ObjectCreate(0, labelName, OBJ_LABEL, 0, 0, 0))
    {
        // Set the text of the label to ASCII character 30  - Up Arrow
        string asciiChar30 = CharToString(30);
        ObjectSetText(labelName, asciiChar30, 12, "Arial", clrBlack);

        // Position the label at specific coordinates on the chart
        ObjectSet           (labelName, OBJPROP_CORNER, 2);        
        ObjectSetInteger(0, labelName, OBJPROP_XSIZE, 50);  // Width
        ObjectSetInteger(0, labelName, OBJPROP_YSIZE, 20);  // Height
        ObjectSetInteger(0, labelName, OBJPROP_XDISTANCE, 200); // X position
        ObjectSetInteger(0, labelName, OBJPROP_YDISTANCE, 250); // Y position
    }
    else
    {
        Print("Failed to create label: ", GetLastError());
    } 
 
Lode Loyens:

Hi, can anyone tell me what I am doing wrong here?

I get no errors.


Thank you.


did you read the documentation?  CharToString uses ANSI codes

 
Lode Loyens: what I am doing wrong here?
        string asciiChar30 = CharToString(30);
        ObjectSetText(labelName, asciiChar30, 12, "Arial", clrBlack);
Arial 30 is not an arrow. Use Wingdings - Objects Constants - Constants, Enumerations and Structures - MQL4 Reference
 

Thank you both for your response.  

I tried wingdings and that did the trick.

It's not the arrow I want to display but that will work.


Thank you much.