I would like to calculate an indicator on indicator rocoflinreg (ROC by 3 days of LinReg by 5 days) with changeable variables and I have a couple of questions
// In ninjascript #region Variables private int period=5; private int [COLOR=Red]rocperiod[/COLOR]=3; // Question 1) I guess I need to add [COLOR=Red]rocperiod[/COLOR] as Variable like above? //... /// <summary> /// Called on each bar update event (incoming tick) /// </summary> protected override void OnBarUpdate() { double [COLOR=SeaGreen]rocoflinreg[/COLOR] = ROC(LinReg(), period)[0]; // Question 2) Where above should I add the [COLOR=Red]rocperiod[/COLOR] variable?
Comment