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.
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: