Help displaying text on a chart
Results 1 to 4 of 4

Thread: Help displaying text on a chart

  1. #1
    Hi everyone. .

    I need help on showing text to the chart.
    Illuion:
    rule 1
    rule 2
    rule 3
    etc

    Quote Originally Posted by ;
    //p ------------------------------------------------------------------
    //| dtext.mq4 |
    //| Copyright 2014, MetaQuotes Software Corp.. |
    //| http://www.mql5.com |
    //p ------------------------------------------------------------------
    #property copyright Copyright 2014, MetaQuotes Software Corp..
    #property Hyperlink http://www.mql5.com
    #property version 1.00
    #property strict
    #property indior_chart_window
    // ------------------------------------------------------------------
    //| Custom indior initialization function |
    //p ------------------------------------------------------------------
    int OnInit()

    //-- indior buffers mapping

    //--
    return(INIT_SUCCEEDED);

    // ------------------------------------------------------------------
    //| Custom indior iteration serve |
    // ------------------------------------------------------------------
    //--
    ObjectSetText(text_object,Hello world! ,10,Times New Roman,Green);
    //-- return value of prev_calculated for next call
    //p ------------------------------------------------------------------
    on the left down corner
    I have mistake
    Quote Originally Posted by ;
    'ObjectSetText' - declaration without kind dtext.mq4 26 4
    Tutorial from here http://docs.mql4.com/objects/objectsettext

    Can someone help?

    Thanks

  2. #2
    Quote Originally Posted by ;
    // ------------------------------------ ------------------------------
    //| dtext.mq4 |
    //| Copyright 2014, MetaQuotes Software Corp.. |
    //| http://www.mql5.com |
    // ------------------------------------ ------------------------------
    #property copyright Copyright 2014, MetaQuotes Software Corp..
    #property link http://www.mql5.com
    #property variant 1.00
    #property stringent
    #property indior_chart_window
    // ------------------------------------ ------------------------------
    //| Custom indior initialization function |
    // ------------------------------------ ------------------------------
    int start()

    ObjectCreate(ObjName, OBJ_LABEL, 0, 0, 0);
    ObjectSetText(ObjName,your Text,7, Verdana, Red);
    mistake
    '}' - maybe not all control paths return a value

    sorry that is my first time and have no idea.... Or if someone has code illuion of displaying text on a chart?
    thanks

  3. #3
    Int start() expects an integer to be returned. As you don't return a value you get the warning not all control paths return a value

    You Make a tag, but you don't give it some x, y co-ordinates to place it on the chart

  4. #4
    ObjectSetText(...) function is only the final portion of the text displaying.

    You have to create it initially with ObjectCreate(...) function.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners more information