This simple strategy only places a long, when both the and the indicators are at the same time in a oversold condition.
In this new version 1.2 the strategy was simplified even more than before by going long-only, which made the strategy more successful in backtesting than the previous version (that older version also opened short trades).
This strategy does not repaint and was updated to PineScript version 3.
All trading involves high risk; past performance is not necessarily indicative of future results. Hypothetical or simulated performance results have certain inherent limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not actually been executed, the results may have under- or over-compensated for the impact , if any, of certain market factors, such as lack of liquidity. Simulated trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profits or losses similar to those shown.
P.S. For advanced users: If you want also be able to short with the same strategy approach, then please use my older version 1.1:
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.