ObjectSetInteger(0, "balanceLabel", OBJPROP_XDISTANCE, 150);
ObjectCreate(0, "equityLabel", OBJ_LABEL, 0, 0, 0); ObjectSetInteger(0, "equityLabel", OBJPROP_SELECTABLE, true); ObjectSetInteger(0, "equityLabel", OBJPROP_CORNER, CORNER_RIGHT_UPPER); ObjectSetInteger(0, "equityLabel", OBJPROP_XDISTANCE, 150); ObjectSetInteger(0, "equityLabel", OBJPROP_YDISTANCE, 40); ObjectSetInteger(0, "equityLabel", OBJPROP_FONTSIZE, 10); ObjectSetString(0, "equityLabel", OBJPROP_FONT, "Verdana"); ObjectSetInteger(0, "equityLabel", OBJPROP_COLOR, colour); ObjectSetString(0, "equityLabel", OBJPROP_TEXT, "EQUITY: " + equityString);
//void OnStart() int OnCalculate(const int rates_total, const int prev_calculated, const datetime& time[], const double& open[], const double& high[], const double& low[], const double& close[], const long& tick_volume[], const long& volume[], const int& spread[]) { color BuyColor = clrBlue; color SellColor = clrRed; // Request trade history HistorySelect(0, TimeCurrent()); // Create objects for trade history string name; uint total = HistoryDealsTotal(); ulong ticket = 0; double price; double profit; datetime _time; string symbol; long type; long entry; : : return(rates_total); }
//int OnCalculate(const int rates_total, const int prev_calculated, const int begin, const double &price[]) //{ //return(rates_total); //}
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
Hello, I'm trying to create an indicator to show some basic info but I have problems with text objects. It only draws the last text label like it's overwriting it, I suspect it's because of the indicator buffers but I'm not sure..
Can you help me to fix it, thank you.