It is not recommended to backtest individual indicators.
There is no research that has found that a stand-alone indicator can be a profitable strategy for all instruments in all market conditions.
Minimally, strategies require these components:
https://usethinkscript.com/threads/basics-for-developing-a-good-strategy.8058/
However, if your goal is to review when an indicator makes profitable trades vs significant losses; in order to build a strategy. Backtesting could help.
Take care, overfitting is generally the negative result of these types of attempts.
To backtest an indicator
1, copy the indicator to the strategy tab
2. add this code snippet to the bottom of the study
THIS TYPE OF BACKTESTING IS NOT RECOMMENDED!
Strategies need to be built from the top down based on the underlying market dynamics.
Building from the bottom up based on random buy arrows will yield profits in strong bull markets, but otherwise tends to perform suboptimally.
There is no research that has found that a stand-alone indicator can be a profitable strategy for all instruments in all market conditions.
Minimally, strategies require these components:
https://usethinkscript.com/threads/basics-for-developing-a-good-strategy.8058/
However, if your goal is to review when an indicator makes profitable trades vs significant losses; in order to build a strategy. Backtesting could help.
Take care, overfitting is generally the negative result of these types of attempts.
To backtest an indicator
1, copy the indicator to the strategy tab
2. add this code snippet to the bottom of the study
substitute ReplaceWithBuyPlot and ReplaceWithSellPlot with the of the signals that you are testing.AddOrder(type = OrderType.BUY_TO_OPEN, condition = ReplaceWithBuyPlot, tickColor = Color.CYAN, arrowColor = Color.CYAN);
AddOrder(type = OrderType.SELL_TO_CLOSE, condition = ReplaceWithSellPlot, tickColor = Color.magenta, arrowColor = Color.magenta);
THIS TYPE OF BACKTESTING IS NOT RECOMMENDED!
Strategies need to be built from the top down based on the underlying market dynamics.
Building from the bottom up based on random buy arrows will yield profits in strong bull markets, but otherwise tends to perform suboptimally.
Last edited: