The problem is having object created in a TF (e.g the 4H TF) to be displayed on the the 4H TF and lower TF,.
but getting it to display multiple objects created from different TF is somewhat is hard to solve.
Just set the display mask from the current TF and store. What's so hard?
Not compiled, not tested, just typed.
int periodToDisplay(ENUM_TIMEFRAME period=PERIOD_CURRENT{ if(period == PERIOD_CURRENT) period=_Period; const static int conv[9][2]={ PERIOD_M1, OBJECT_PERIOD_M1, PERIOD_M5, OBJECT_PERIOD_M5, ⋮ PERIOD_MN1, OBJECT_PERIOD_MN1 } int obj_per = 0; for(int i=8; i >= 0; --i) if( PeriodSeconds(conv[i][0]) <= PeriodSeconds(period) ) obj_per |= conv[i][1]; return obj_per; }
Not compiled, not tested, just typed.
The problem is having object created in a TF (e.g the 4H TF) to be displayed on the the 4H TF and lower TF, anything greater than the 4H TF it won't display. I know using
OBJ_PERIOD_D1|OBJ_PERIOD_H4 // would get you to display the Object on only the 4H and Daily TF and nothing else
but getting it to display multiple objects created from different TF is somewhat is hard to solve with that, as a single function is creating all objects
but looking at the visualization tab, when the object is displaying, everything is marked, when the timeframe is changed to a TF it is not suppose to display, nothing is marked. Am asking if there is a better way to get my desire result. thanks