void OnTick()
{
datetime TA=Time[0];
double PH=High[0];
double PL=Low[0];
ObjectCreate("Low",OBJ_TEXT,0,0,0);
//ObjectSetText("Low",DoubleToStr(Low[0],Digits)+" Low");
ObjectSetString(0,"LoW",OBJPROP_TEXT,DoubleToStr(Low[0],Digits)+" Low");
ObjectMove("Low",0,TA,PH);
ObjectCreate("High",OBJ_TEXT,0,0,0);
//ObjectSetText("High",DoubleToStr(High[0],Digits)+" High");
ObjectSetString(0,"High",OBJPROP_TEXT,DoubleToStr(High[0],Digits)+" Low");
ObjectMove("High",0,TA,PL);
}
Files:
Dinamic_Label.mq4
1 kb
- [Archive!] Writing an advisor for free
- Arrow with Text Question
- Candel Sticks Indicator and Filters
If I move TA from Time[0] to Time[]+100 for example, even if I stay in the same timeframe, if I change the zoom it changes the horizontal position that instead I would like to see in the same point of the screen.
Febe #:
If I move TA from Time[0] to Time[]+100 for example, even if I stay in the same timeframe, if I change the zoom it changes the horizontal position that instead I would like to see in the same point of the screen.
If I move TA from Time[0] to Time[]+100 for example, even if I stay in the same timeframe, if I change the zoom it changes the horizontal position that instead I would like to see in the same point of the screen.
Use button to enter your code properly.
Use Label for your purpose instead of text.

Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Object Types / OBJ_LABEL
- www.mql5.com
OBJ_LABEL - Object Types - Objects Constants - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Thanks,
but I would like it to follow on the y axis the bid price, with Object_Label does not follow the price.
but I would like it to follow on the y axis the bid price, with Object_Label does not follow the price.
Febe #:
Thanks,
but I would like it to follow on the y axis the bid price, with Object_Label does not follow the price.
Thanks,
but I would like it to follow on the y axis the bid price, with Object_Label does not follow the price.
Then keep a constant time with OBJ_TEXT.
Actually I checked you code and it works properly. What do mean by Time[]+100. It should be Time[100].

OBJ_TEXT - Object Types - Objects Constants - Constants, Enumerations and Structures - MQL4 Reference
- docs.mql4.com
OBJ_TEXT - Object Types - Objects Constants - Constants, Enumerations and Structures - MQL4 Reference

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register