Это, кажется, ответ:
void OnChartEvent(const int id,
const long &lparam,
const double &dparam,
const string &sparam)
{
//---
long lNextChartID = 0, lSecondChartID = 0;
datetime dtOpenTime,dtCloseTime;
double dOpenPrice,dClosePrice;
if(id==CHARTEVENT_OBJECT_CREATE)
{
if(ObjectType(sparam) == OBJ_TREND)
{
lNextChartID = ChartNext(ChartID());
lSecondChartID == ChartNext(lNextChartID);
dtOpenTime = ObjectGet(sparam,OBJPROP_TIME1);
dtCloseTime = ObjectGet(sparam,OBJPROP_TIME2);
dOpenPrice = ObjectGet(sparam,OBJPROP_PRICE1);
dClosePrice = ObjectGet(sparam,OBJPROP_PRICE2);
if(ChartSymbol(lNextChartID) == ChartSymbol(0) &&
ChartPeriod(lNextChartID) < ChartPeriod(0))
{
ObjectCreate(lNextChartID,sparam + "1",OBJ_TREND,0,dtOpenTime,dOpenPrice,dtCloseTime,dClosePrice);
}
}
}
}