I am using the CCI indicator in my trading strategy and i am currently trying to adjust the alert settings, so far i have managed to get the indicator to give an alert once the CCI value crosses the CCI average (standard it is CCI value crosses overbought/oversold). However now i would like to get an alert every time CCI value crosses both the CCI average and overbought/oversold levels. I have tried multiple things but i keep getting errors, is there anyone who can point me in the right direction? Currently i have it coded like this: m_ccivalue.Value = Bars.CCI(ccilength); m_cciavg.Value = m_ccivalue.Average(cciavglength); Plot1.Set(0, m_ccivalue.Value); Plot2.Set(0, m_cciavg.Value); Plot3.Set(0, overbought); Plot4.Set(0, oversold); if (this.CrossesOver(m_ccivalue, m_cciavg)){ Alerts.Alert("Indicator indicating BUY"); } else{ if (this.CrossesUnder(m_ccivalue, m_cciavg)){ Alerts.Alert("Indicator indicating SELL"); I have tried adding if (this.CrossesOver(m_ccivalue, m_cciavg & oversold)){ Alerts.Alert("Indicator indicating BUY"); And if (this.CrossesOver(m_ccivalue, m_cciavg, oversold)){ Alerts.Alert("Indicator indicating BUY"); However both changes where without succes. Thanks in advance!
I have managed to get it working, now i also would like to get this indicator to plot arrows once the alert conditions are met. I have found some guidelines online but they all seem to be outdated. Does anyone know how to do this or has anyone a link with some guidelines?