Comparison on ThinkorSwim

Discussion in 'Strategy Building' started by trader_knight, Sep 13, 2020.

  1. wetodit

    wetodit

    Hi all,
    This seems like a recent thread that hits at what I'm trying to do so hopefully you all can help.
    I'd like to create my own "compare to" TOS script for the sake of being able to customize the line thickness, but am having trouble with getting the secondary chart to overlay on top of the primary chart.
    The end result is that the primary chart is displayed properly but the secondary chart is just a line at the bottom of the chart because it is not scaled correctly. See attached. My code is below, I'm just trying to figure out how to do this so I can customize my compared chart appearance. I'm guessing it's simple but I don't know what I'm missing.
    Thank you!

    input comparisonStyle = {"BAR", "CANDLE", default "LINE"};
    input secondarySecurity = "";
    def timeplot = getaggregationperiod();
    plot compareTo = close(secondarySecurity,period=timeplot);
     
    #21     Dec 8, 2020
  2. Click the "Left axis" to scale the new plot on left axis. See below:
    upload_2020-12-8_8-0-23.png
     
    #22     Dec 8, 2020
  3. wetodit

    wetodit

    YES! Thank you!!:thumbsup:
     
    #23     Dec 8, 2020