mobmanager:
Just a beginner...
Would this be the most efficient way of displaying the value of a variable on a chart in a script or expert? Note I don't want to use Comment() because font is too small. If there is a more efficient way, please describe. Thanks
Before posting please read some of the other threads . . . then you would have seen numerous requests like this one:
Please use this to post code . . . it makes it easier to read.mobmanager:
If you try to create an object that already exists you will get an error . . . before you create it you should check to see if it exists, use ObjectFind(), if it does exist just change it's text using ObjectSetText()
Just a beginner...
Would this be the most efficient way of displaying the value of a variable on a chart in a script or expert? Note I don't want to use Comment() because font is too small. If there is a more efficient way, please describe. Thanks
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
Just a beginner...
Would this be the most efficient way of displaying the value of a variable on a chart in a script or expert? Note I don't want to use Comment() because font is too small. If there is a more efficient way, please describe. Thanks
//--------------------------------------
double prof = AccountProfit();ObjectCreate("ObjName", OBJ_LABEL, 0, 0, 0);
ObjectSetText("ObjName",("Account Profit: " + prof), 16, "Arial", Yellow);
ObjectSet("ObjName", OBJPROP_CORNER, 0);
ObjectSet("ObjName", OBJPROP_XDISTANCE, 20);
ObjectSet("ObjName", OBJPROP_YDISTANCE, 20);
//--------------------------------------