Adding lookback function to a watchlist

Mr.Edssr

New member
Question:
I noticed while using "OnDemand" in TOS the CCI watchlist by merryday (or any custom watchlist I have loaded) does not adjust to the look back date selected.
Say I want to see what my list looked like on Tuesday of last week. I set the "OnDemand" to MAY 10 @ 0930. The LAST and NET column info changes but my custom columns stay the same

Can "lookback" functionality be added to Merrydays CCI average labels and watchlist script to display the past info for the day I choose in OnDemand?
If so.......and someone has done it, can you please share the script.

Also.....a BIG thanks to Merryday on a kickazz script. Just trying to "tweek" it so I can do proper backtesting.
Here is his script I copied:

#TOS CCI Average Labels & Watchlist by @MerryDay 12/20
# https://www.stockmarkethacks.com/commodity-channel.html

declare lower;
#def lookback = 100;
def cci_length = 21;
def cci_avg_length = 14;
def over_sold = -150 ;
def over_bought = 150 ;
def CCI = reference CCIAverage("cci length" = cci_length, "cci avg length" = cci_avg_length)."CCI" ;
def CCIAvg = reference CCIAverage("cci length" = cci_length, "cci avg length" = cci_avg_length)."CCIAvg" ;

# Charting & Formatting
AddLabel(yes,
if CCI < over_sold and CCI >=CCIAvg then "BUY " + Round(CCI, 0) else
if CCI < over_sold and CCI > CCI[1] then "Reversing " + Round(CCI, 0) else
if CCI < over_sold then "Bottom " + Round(CCI, 0) else
if CCI >= over_bought and CCI >= CCI[1] then "Strong Trend " + Round(CCI, 0) else
if CCI > over_bought then "Watch It " + Round(CCI, 0) else
if CCI crosses above CCIAvg then "TREND BEGIN " + Round(CCI, 0) else
if CCI crosses below CCIAvg then "TREND END " + Round(CCI, 0) else
if CCI < CCIAvg and CCI>CCI[1] then "Pre-Trend " + Round(CCI, 0) else
if CCI > CCI[1] then "👍 " + Round(CCI, 0) else
"👎 " + Round(CCI, 0), color.black );

AssignBackgroundColor(
if CCI < over_sold and CCI >=CCIAvg then color.cyan else
if CCI < over_sold and CCI > CCI[1] then color.cyan else
if CCI < over_sold then CreateColor(120, 10, 2) else
if CCI > over_bought and CCI > CCI[1] then color.dark_orange else
if CCI > over_bought then CreateColor(255, 0, 255) else
if CCI crosses above CCIAvg then CreateColor(000, 255, 000) else
if CCI crosses above CCIAvg then color.orange else
if CCI crosses below CCIAvg then CreateColor(0, 100, 250) else
if CCI < CCIAvg and CCI>CCI[1] then color.yellow else
if CCI > CCI[1] then color.green else
CreateColor(225, 0, 0) ) ;

# code end
 
Question:
I noticed while using "OnDemand" in TOS the CCI watchlist by merryday (or any custom watchlist I have loaded) does not adjust to the look back date selected.
Say I want to see what my list looked like on Tuesday of last week. I set the "OnDemand" to MAY 10 @ 0930. The LAST and NET column info changes but my custom columns stay the same

Can "lookback" functionality be added to Merrydays CCI average labels and watchlist script to display the past info for the day I choose in OnDemand?
If so.......and someone has done it, can you please share the script.
The 'official' response from ToS support states:
On Demand wasn't designed to hone skills trading or for testing studies. It was designed to help traders get familiar with the basics features of the platform.
On Demand's basic functionality will not accommodate your request. :(
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
357 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top