Indicators That We Are Using In Our Algos

MerryDay

Administrative
Staff member
Staff
VIP
Lifetime
mode note:
ATTENTION ALGO TRADERS:
Be careful with your coding, folks!

The common mistake that n00b algo traders make is to trade on the current bar.

When you write triggers on the current bar, obviously false signals will occur since the current bar doesn't know what the final close, high, and low is going to be until it's finished forming.
Therefore, by definition, you are asking it to repaint with new information on every tick.

To avoid false signals, use of the previous bar [1] for your calculations within your code.
You, macro recorders, be especially careful to filter your ADDLabel statements using the prior bar [1].

Follow the above simple steps and never experience disappearing signals again!
FYI, for backtesting results, In your ADDORDER statements only: use the open of the next bar open[-1] for accurate non-repainted backtesting data.

We have an on-going thread to discuss the mechanical process of HOW to set up ALGOs with ToS here:
https://usethinkscript.com/threads/auto-trade-algo-in-tos.7546/

This thread focuses on WHAT studies to use in your algo system.
 
Last edited:
I have not found any TOS script that is using the strategy that does not repaint, when you view the trades in TOS you are seeing historical trades. When you are live you will see the trades but they may or may not remain on the screen. There are some strategies I have tested that come close but if you have a bot that is trying to react to was is visually presented, typically it will take the trade as soon as it is shown, then it may disappear then it reappears and your bot takes another trade. I found it too unreliable to auto-trade that is why you need a platform like NinjaTrader to trade strategies
 
I have not found any TOS script that is using the strategy that does not repaint, when you view the trades in TOS you are seeing historical trades. When you are live you will see the trades but they may or may not remain on the screen. There are some strategies I have tested that come close but if you have a bot that is trying to react to was is visually presented, typically it will take the trade as soon as it is shown, then it may disappear then it reappears and your bot takes another trade. I found it too unreliable to auto-trade that is why you need a platform like NinjaTrader to trade strategies

There are ways to make them not paint but the code would have to be re worked quite a bit. I 100% agree with you though!
 
mode note:
ATTENTION ALGO TRADERS:
Let's talk about the term "repaint" and what it means.
Essentially, it refers to a recursive operation that constantly redefines functions like highest and lowest by erasing and redrawing.
Repainting also happens with scripts using future bars or MTF code that have to repaint while waiting for the future to happen.

Now, it's important to note that repainted signals are not recommended for entry, which is why the Forum adds the prefix "repaints" to those indicators. DO NOT use these in algo trading.


@IPA statement is correct!
There are ways to make them not paint but the code would have to be re worked.
Be careful with your coding, folks!
The common mistake that n00b algo traders make is to trade on the current bar. When you write triggers on the current bar, obviously repainting will occur since the current bar doesn't know what the final close, high, and low is going to be until it's finished forming.
Therefore, by definition, you are asking it to repaint with new information on every tick.

To avoid repainting, use of the previous bar [1] for your calculations within your code.
You macro recorders, be especially careful to filter your ADDLabel statements using the prior bar [1].

Follow these simple steps and never experience repainting again!
FYI, for backtesting results, use the open of the next bar open[-1] for accurate non-repainted results.
 
Last edited:
mode note:
ATTENTION ALGO TRADERS:
Let's talk about the term "repaint" and what it means.
Essentially, it refers to a recursive operation that constantly redefines functions like highest and lowest by erasing and redrawing. Repainting also happens with scripts using future bars or MTF code that have to repaint while waiting for the future to happen.

Now, it's important to note that repainted signals are not recommended for entry, which is why the Forum adds the prefix "repaints" to those indicators. DO NOT use these in algo trading.


This brings us to @IPA statement:

Be careful with your coding, folks!

The common mistake that n00b algo traders make is to trade on the current bar. When you write triggers on the current bar, obviously repainting will occur since the current bar doesn't know what the final close, high, and low is going to be until it's finished forming. Therefore, by definition, you are asking it to repaint with new information on every tick.

To avoid repainting, ToS recommends using the open of the next bar open[-1] for entry in strategies,
and use of the previous bar [1] for studies. Thereby, never experiencing repainting again!

So, there you have it - the rundown on "repainting"!


I just do what the pros do, and repaint all of my signals to be the absolute low or high tick of a move. That way I can rip off unsuspecting n00bs and charge them for my worthless indicators that look sexy on my website.

Oh no! Now I've revealed my secret!
 
Last edited by a moderator:

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

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
438 Online
Create Post

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