OPEN-SOURCE SCRIPT

Simple signals example for Risk Management Wrapper

Simple signals example for Risk Management Wrapper

The unique part is that there is a single variable used for both Buy and Sell conditions.
Technically, a variable can have an infinity of values, so why not use that in our favour.

A value of -1 is used for the SELL alert condition, and a value of +1 is used for the BUY alert condition.
The Risk Management Wrapper can read them and act accordingly.

Any simple indicator on TradingView that gives Sell or Buy signals in a single variable should work.
More complex indicators that give multiple kinds of signals may not work due to TradingView limitations.

Declinazione di responsabilità