///////////////////\\\\\\\\\\\\\\\\\\ ////////// Extend_Box \\\\\\\\\\\\ //////////// Fillellin \\\\\\\\\\\\ ///////////////////\\\\\\\\\\\\\\\\\\ #property indicator_chart_window #property description "© Extend Box" #property copyright "Copyright © 2017, Alexander Voronkov / Fillellin" #property strict #property link "https://www.mql5.com/ru/users/fillellin" input string NameObject = "ext"; // Object Prefix Name: input int MoveObjRight = 2; // Move Object Right: //———————————————————————————————————————————————————————————————| void OnChartEvent(const int id, const long &lparam, const double &dparam, const string &sparam) {if (id == CHARTEVENT_OBJECT_CLICK || id == CHARTEVENT_CHART_CHANGE) ChartSetSymbolPeriod(0,NULL,0);} //—————————————————————————————————————————————————————————————| 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[]) { //————————————————————————————————————————————————————| int objTotals = ObjectsTotal(); string name; for(int i = objTotals - 1; i >= 0; i--) { name = ObjectName(i); if(StringFind(name , NameObject)== 0) ObjectSet (name,OBJPROP_TIME2,time[0]+MoveObjRight*PeriodSeconds()); } return(rates_total); } //—————————————————————————| end of the algorithm |—————————————————————————|