Blindly following others will make you blind!
MT4: Create objects in Tester in new build MT4 0 replies
How to make objects can't be selectable in MT4 0 replies
[MT4] - Detect when price approaches arbitrary drawn objects 1 reply
Duplicate Objects in MT4 2 replies
#property strict string SystemTag="Test_",Target=""; enum OBJ_TIMEFRAME_VISIBILITY { OBJ_TIMEFRAMES_NO=-1,//NONE OBJ_TIMEFRAMES_ALL=0//ALL }; int OnInit() { ObjectsDeleteAll(ChartID(),SystemTag); bool obji=ObjectCreate(ChartID(),SystemTag+"_Trend",OBJ_TREND,0,Time[200],High[200],Time[1],High[1]); Target=SystemTag+"_Trend"; return(INIT_SUCCEEDED); } void OnChartEvent(const int id, const long &lparam, const double &dparam, const string &sparam) { if(id==CHARTEVENT_CLICK) { OBJ_TIMEFRAME_VISIBILITY state=(OBJ_TIMEFRAME_VISIBILITY)ObjectGetInteger(ChartID(),Target,OBJPROP_TIMEFRAMES); //if off set on if(state==OBJ_TIMEFRAMES_NO){ObjectSetInteger(ChartID(),Target,OBJPROP_TIMEFRAMES,OBJ_TIMEFRAMES_ALL);} //if on set off if(state==OBJ_TIMEFRAMES_ALL){ObjectSetInteger(ChartID(),Target,OBJPROP_TIMEFRAMES,OBJ_TIMEFRAMES_NO);} } }
DislikedIf you mean changing their visibility yes . Consult the following code : #property strict string SystemTag="Test_",Target=""; enum OBJ_TIMEFRAME_VISIBILITY { OBJ_TIMEFRAMES_NO=-1,//NONE OBJ_TIMEFRAMES_ALL=0//ALL }; int OnInit() { ObjectsDeleteAll(ChartID(),SystemTag); bool obji=ObjectCreate(ChartID(),SystemTag+"_Trend",OBJ_TREND,0,Time[200],High[200],Time[1],High[1]); Target=SystemTag+"_Trend"; return(INIT_SUCCEEDED); } void OnChartEvent(const int id, const long &lparam, const double &dparam, const string &sparam) { if(id==CHARTEVENT_CLICK) { OBJ_TIMEFRAME_VISIBILITY...Ignored
DislikedMaybe this is what you're looking for? https://www.forexfactory.com/thread/...e-manager-cspmIgnored