I have working code that creates arrows on my chart, but I wanted to start putting text on my charts instead of arrows. I cannot get the text to show up on my charts.
Don't call TimeCurrent() multiple times or you may find that it changes between calls and then you will have a strange situation . . . also you don't need to call TimeTostring() at all. Just use a string to store the Object name . . .
string TextObjName = "arrow" + TimeCurrent(); ObjectCreate(0, TextObjName, OBJ_LABEL, 0, TimeCurrent(), H1wave.Low());
also, your code is different, in the working code you use H1wave.High() in the failed code you use H1wave.Low(), maybe this function is the problem ? or maybe angevoyageur is correct ;-)
Use OBJ_TEXT instead.
Don't call TimeCurrent() multiple times or you may find that it changes between calls and then you will have a strange situation . . . also you don't need to call TimeTostring() at all. Just use a string to store the Object name . . .
also, your code is different, in the working code you use H1wave.High() in the failed code you use H1wave.Low(), maybe this function is the problem ? or maybe angevoyageur is correct ;-)
Use OBJ_TEXT instead.
string objName = "arrow" + TimeCurrent(); if (H1pool.Direction() != -1 && H1pool.MacdBar(1) < H1pool.MacdSignal(1)) { H1pool.Direction(-1); ObjectCreate(0, objName,OBJ_LABEL,0,TimeCurrent(),H1wave.Low()); ObjectSetInteger(0,objName,OBJPROP_COLOR,clrWhite); ObjectSetString(0,objName,OBJPROP_TEXT,"A"); H1wave.Calc(m_symbol.Bid(), true); } else if (H1pool.Direction() != 1 && H1pool.MacdBar(1) > H1pool.MacdSignal(1)) { H1pool.Direction(1); ObjectCreate(0, objName,OBJ_ARROW_SELL,0,TimeCurrent(),H1wave.Low()); ObjectSetInteger(0,objName,OBJPROP_COLOR,clrDarkSeaGreen); H1wave.Calc(m_symbol.Bid(), true); }this code produces the above chart. I would like the text to show like the arrow does, which is when the macd & signal are confirmed crossing
this code produces the above chart. I would like the text to show like the arrow does, which is when the macd & signal are confirmed crossing
Do you read the response when you ask a question ?
huh? I tried what raptor suggested
Use OBJ_TEXT instead.
huh? I tried what raptor suggested

- www.mql5.com
huh? I tried what raptor suggested
never mind. i see i did not change it to object_text, DUH

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have working code that creates arrows on my chart, but I wanted to start putting text on my charts instead of arrows. I cannot get the text to show up on my charts.
WORKING CODE
FAILED CODE