@sam082000 Would it be possible to scan out of the bulls/bears?
This is a repainting indicator. It uses future bars. Meaning, it waits until the future happens and then goes back and paints the triggers that you see on your charts.
Scripts that repaint should NOT be used in Scans, Labels, Watchlists, Alerts, Conditional Orders or Backtesting Strategies.
a. It will falsely show up in your Scans, Labels, Watchlists, Alerts, Conditional Orders or Backtesting Strategies, but the signal will not be painted on your chart. You will think the script is broken.
b. Or the opposite. It will be painted on your chart but NOT show up in your Scans, Labels, Watchlists, Alerts, Conditional Orders or Backtesting Strategies. This is because it wasn't there in real time! It was painted on afterward.
You will think the script is broken.
As stated above: this should NOT be used in Scans, Labels, Watchlists, Alerts, Conditional Orders
But if you insist, be aware there will be a lag which has shown to result in unprofitable trades.
The workaround: requires that you add the "within x bars" syntax.
where x is how many bars you are willing to go back to find the repainted trigger.
FYI: You might not get any results or you may get a too complex error.
But if you want to make the attempt (not advised)
Add this code snippet to the bottom of your study:
plot FindBULLs = ObBull[-ob_period] within 9 bars; FindBULLs.hide();
or
plot FindBears = ObBear[-ob_period] within 9 bars ; FindBears.hide();