-
Help you with what? You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your problem.
No free help 2017.04.21Or pay someone. Top of every page is the link Freelance.
Hiring to write script - General - MQL5 programming forum 2018.05.12 -
Not such thing as a text box.
Perhaps you should read the manual.
How To Ask Questions The Smart Way. 2004
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up.
-
Help you with what? You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your problem.
No free help 2017.04.21Or pay someone. Top of every page is the link Freelance.
Hiring to write script - General - MQL5 programming forum 2018.05.12 -
Not such thing as a text box.
Perhaps you should read the manual.
How To Ask Questions The Smart Way. 2004
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up.
Well, I did state clearly to reference the images which you will be able to see what a text box is. And yes, I did state the problem (also referenced by comparing the two images, showing that it is the 'text' which i'm missing)...
There's a reason why i'm posting it on the forums and not paid MQL4 Freelance because the indicator is way too simple to be paid.
Question and problem: How do I add a text box beside it that says 'YLP - 1.19049' (Stands for Yesterday's Low Pivot - Price of plotted line) etc.? An example of what I want and what I have is attached. (notmine.jpeg is what I want to achieve with the text)
Create an OBJ_TEXT for each line. These only need to be created once so create them in OnInit().
Use ObjectSetInteger() to set the time co-ordinate to Time[0] and also the anchor point to left.
Use ObjectSetString() to set the text
In OnCalculate check for a new bar and when there is a new bar
re-set the time co-ordinate to Time[0]
check if the text needs to be changed
check if the price co-ordinate needs to be changed using ObjectSetDouble().
Create an OBJ_TEXT for each line. These only need to be created once so create them in OnInit().
Use ObjectSetInteger() to set the time co-ordinate to Time[0] and also the anchor point to left.
Use ObjectSetString() to set the text
In OnCalculate check for a new bar and when there is a new bar
re-set the time co-ordinate to Time[0]
check if the text needs to be changed
check if the price co-ordinate needs to be changed using ObjectSetDouble().
Hey,
Thanks for helping out. I tried doing what you said but I was unsuccessful (i just started coding). Is it possible you paste it in my code to show me how it's done?
Much thanks!
Hey,
Thanks for helping out. I tried doing what you said but I was unsuccessful (i just started coding). Is it possible you paste it in my code to show me how it's done?
Much thanks!
Show the code that you have done and I will tell you what you have done wrong.
You will learn by doing this.
If I just do the code for you, you will not learn.
Additional tip: Give your buffers (and variables) meaningful names, it will make your code easier to follow.
Buffer1 etc is meaningless. DayHighBuffer is meaningful.
Show the code that you have done and I will tell you what you have done wrong.
You will learn by doing this.
If I just do the code for you, you will not learn. No problem Keith, I've attached the code. I've added the OBJ_TEXT and ObjectSetString as a test but when compiling there were errors. If I can't even get that right I will have difficulties trying to add time.
It's surpassingly a very easy code? Hence why I left my code open to the public because anyone could do it haha. Just having big issues with the text. That way you know i'm trying to learn from you :)
//+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ // AS INDICATED TO PLACE IT UNDER ONINIT int OnInit() { IndicatorBuffers(4); SetIndexBuffer(0, Buffer1); SetIndexEmptyValue(0, EMPTY_VALUE); SetIndexBuffer(1, Buffer2); //ADDED AND MODIFIED BELOW, BUT I AM REALLY CONFUSED CAUSE I'M STILL PRETTY NEW// OBJ_TEXT ObjectSetString("Hello") // ABOVE SetIndexEmptyValue(1, EMPTY_VALUE); SetIndexBuffer(2, Buffer3); SetIndexEmptyValue(2, EMPTY_VALUE); SetIndexBuffer(3, Buffer4); SetIndexEmptyValue(3, EMPTY_VALUE); //initialize myPoint myPoint = Point(); if(Digits() == 5 || Digits() == 3) { myPoint *= 10; } return(INIT_SUCCEEDED); }
If I just do the code for you, you will not learn. No problem Keith, I've attached the code. I've added the OBJ_TEXT and ObjectSetString as a test but when compiling there were errors. If I can't even get that right I will have difficulties trying to add time.
It's surpassingly a very easy code? Hence why I left my code open to the public because anyone could do it haha. Just having big issues with the text. That way you know i'm trying to learn from you :)
Are you reading the documentation?
Read the documentation for ObjectCreate() and ObjectSetString()
Are you reading the documentation?
Read the documentation for ObjectCreate() and ObjectSetString()
I guess i'll go back to YouTube videos lol.
For anyone who will like to help with the code, feel free to do so!
I guess i'll go back to YouTube videos lol.
For anyone who will like to help with the code, feel free to do so!
Increasing your knowledge will be very slow if you are not prepared to read the documentation.
Increasing your knowledge will be very slow if you are not prepared to read the documentation.
//+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ // AS INDICATED TO PLACE IT UNDER ONINIT int OnInit() { IndicatorBuffers(4); SetIndexBuffer(0, Buffer1); SetIndexEmptyValue(0, EMPTY_VALUE); SetIndexBuffer(1, Buffer2); //Create the object ObjectCreate("Pivot", OBJ_TEXT,) //Set the time ObjectSetString("Pivot", ObjectSetInterger()) SetIndexEmptyValue(1, EMPTY_VALUE); SetIndexBuffer(2, Buffer3); SetIndexEmptyValue(2, EMPTY_VALUE); SetIndexBuffer(3, Buffer4); SetIndexEmptyValue(3, EMPTY_VALUE); //initialize myPoint myPoint = Point(); if(Digits() == 5 || Digits() == 3) { myPoint *= 10; } return(INIT_SUCCEEDED); }
This is what I got out of the manual, still really boggled
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi guys,
I've made a simple 'pivot point' that is an additional add-on to standard pivot points. This pivot point adds yesterday's low/high as well as the previous week's low/high.
Question and problem: How do I add a text box beside it that says 'YLP - 1.19049' (Stands for Yesterday's Low Pivot - Price of plotted line) etc.? An example of what I want and what I have is attached. (notmine.jpeg is what I want to achieve with the text)
I'll leave the MQL4 code here can anyone please help me out? Thanks!!!