Hi, dBc,

I guess this line "if (month(0) != month(1)) { // once a month do" could be also changed to "if(tdm() == 1 && !is(LOOKBACK)){ // 1st trading day of the month"