title: R quantmod chartSeries newTA chob - modify legend and axis (primary and secundary)
body: <p>This is an advanced question.</p>
  
  <p>I use my own layout for the chartSeries quantmod function, and I can even create my own newTA. Everything works fine. But ...</p>
  
  <p>What I want to do but I can't:</p>
  
  <p>a) Manipulate the legend of each of the 3 charts:
       - move to other corner, (from "topleft" to "topright")
       - change the content 
       - remove completely if needed ...</p>
  
  <p>b) My indicator generates 2 legends: 
       value1 
       value2
     same as above ... how could I modify them? how could I delete them?</p>
  
  <p>c) control position and range of yaxis (place it on the left / right
       or even remove them 
       same when there is a secundary axis on the graph</p>
  
  <p>d) Modify main legend (the one in the top right 
    where is written the range of dates</p>
  
  <p>A working sample code:</p>
  
  <pre><code># Load Library
  library(quantmod)
  
  # Get Data
  getSymbols("SPY", src="yahoo", from = "2010-01-01")
  
  # Create my indicator (30 values)
  value1 &lt;- rnorm(30, mean = 50, sd = 25)
  value2 &lt;- rnorm(30, mean = 50, sd = 25)
  
  # merge with the first 30 rows of SPY
  dataset &lt;- merge(first(SPY, n = 30),
                   value1,
                   value2)
  # **** data has now 8 columns:
  # - Open
  # - High
  # - Low
  # - Close
  # - Volume
  # - Adjusted
  # - a       (my indicator value 1)
  # - b       (my indicator value 2)
  #
  
  # create my TA function - This could also be achieve using the preFUN option of newTA
  myTAfun &lt;- function(a){
     # input: a: function will receive whole dataset
     a[,7:8]  # just return my indicator values
  }
  
  # create my indicator to add to chartSeries
  newMyTA &lt;- newTA(FUN   = myTAfun, # chartSeries will pass whole dataset, 
                                    # I just want to process the last 2 columns
                lty   = c("solid", "dotted"),
                legend.name = "My_TA",
                col   = c("red", "blue")
                )
  
  # define my layout 
  layout(matrix(c(1, 2, 3), 3, 1),
         heights = c(2.5, 1, 1.5)
         )
  
  # create the chart
  chartSeries(dataset,
              type        = "candlesticks",
              main        = "",
              show.grid   = FALSE,
              name        = "My_Indicator_Name",
              layout      = NULL,     # bypass internal layout
              up.col      = "blue",
              dn.col      = "red",
              TA          = c(newMyTA(),
                              addVo()
                              ),
              plot        = TRUE,
              theme       = chartTheme("wsj")
              )
  </code></pre>
  
  <p>I have tried using legend command, and also the option legend.name (with very limited control of the output).
  I have had a look at the chob object returned by chartSeries, but I can't figure out what to do next ...</p>
  
  <p>Image below:</p>
  
  <p><img src="https://i.stack.imgur.com/ZVOBh.jpg" alt="Graph with indicators"></p>