The legend seems to be slightly different when on=NA
, so a kludgey work-around is to call the first myRSI
with on=NA
and legend=""
before calling the two you actually want:
R> chartSeries(AAPL,subset='last 6 months')
R> myRSI(8, on = NA, maType = 'EMA', col = 'red', legend='')
R> myRSI(8, on = 3, maType = 'EMA', col = 'red', legend='auto')
R> myRSI(13, on = 3, maType = 'EMA', col = 'blue', legend='auto')