Reply To: Divergence Tool – Backtest

Optuma Forums Optuma Scripting Divergence Tool – Backtest Reply To: Divergence Tool – Backtest

  • Topics: 5
  • Replies: 616
  • Posts: 621

Hi Mark,

The Divergence() function doesn’t have a Type field to reference.  The way it works is a result of +1 is a positive divergence and -1 is a negative divergence.


If you wanted to buy for a positive divergence you could use:

and to exit on a negative divergence would be:

If you apply a divergence script via a Show View along the bottom of the chart you will see where it is triggering for positive / negative divergence. Not every bar in the shaded zone will be a match, to see why i’d recommend viewing the chart with training mode, you can see how the zones build as new data comes in).

Pin It on Pinterest