// More information about this indicator can be found at: // http://fxcodebase.com/code/viewtopic.php?f=38&t=68838 //+------------------------------------------------------------------+ //| Copyright © 2019, Gehtsoft USA LLC | //| http://fxcodebase.com | //+------------------------------------------------------------------+ //| Developed by : Mario Jemic | //| mario.jemic@gmail.com | //+------------------------------------------------------------------+ //| Support our efforts by donating | //| Paypal : https://goo.gl/9Rj74e | //+------------------------------------------------------------------+ //| Patreon : https://goo.gl/GdXWeN | //| BitCoin : 15VCJTLaz12Amr7adHSBtL9v8XomURo9RF | //| BitCoin Cash : 1BEtS465S3Su438Kc58h2sqvVvHK9Mijtg | //| Ethereum : 0x8C110cD61538fb6d7A2B47858F0c0AaBd663068D | //| LiteCoin : LLU8PSY2vsq7B9kRELLZQcKf5nJQrdeqwD | //+------------------------------------------------------------------+ #property copyright "Copyright © 2019, Gehtsoft USA LLC" #property link "http://fxcodebase.com" #property version "1.0" #property strict #property indicator_chart_window //#property indicator_separate_window #property indicator_buffers 0 input int x = 100; input int y = 100; input ENUM_BASE_CORNER corner = CORNER_LEFT_UPPER; // Corner input color clr = Red; // Color string IndicatorName; string IndicatorObjPrefix; string GenerateIndicatorName(const string target) { string name = target; int try = 2; while (WindowFind(name) != -1) { name = target + " #" + IntegerToString(try++); } return name; } int init() { IndicatorName = GenerateIndicatorName("Volume Display"); IndicatorObjPrefix = "__" + IndicatorName + "__"; IndicatorShortName(IndicatorName); IndicatorBuffers(0); return 0; } int deinit() { ObjectsDeleteAll(ChartID(), IndicatorObjPrefix); return 0; } int start() { string id = IndicatorObjPrefix + "idValue"; if (ObjectFind(0, id) == -1) { ObjectCreate(0, id, OBJ_LABEL, 0, 0, 0); ObjectSetInteger(0, id, OBJPROP_XDISTANCE, x); ObjectSetInteger(0, id, OBJPROP_YDISTANCE, y); ObjectSetInteger(0, id, OBJPROP_CORNER, corner); ObjectSetString(0, id, OBJPROP_FONT, "Arial"); ObjectSetInteger(0, id, OBJPROP_FONTSIZE, 12); ObjectSetInteger(0, id, OBJPROP_COLOR, clr); } ObjectSetString(0, id, OBJPROP_TEXT, "Volume: " + IntegerToString(Volume[0])); return 0; }