OPEN-SOURCE SCRIPT
Updated 2Mars strategy [OKX]

The strategy is based on the intersection of two moving averages, which requires adjusting the parameters (ratio and multiplier) for the moving average.
Basis MA length: multiplier * ratio
Signal MA length: multiplier
The SuperTrend indicator is used for additional confirmation of entry into a position.
Bollinger Bands and position reversal are used for take-profit.
About stop loss:
If activated, the stop loss price will be updated on every entry.
Basic setup:

Additional:

Alerts for OKX:

Basis MA length: multiplier * ratio
Signal MA length: multiplier
The SuperTrend indicator is used for additional confirmation of entry into a position.
Bollinger Bands and position reversal are used for take-profit.
About stop loss:
If activated, the stop loss price will be updated on every entry.
Basic setup:
Additional:
Alerts for OKX:
Release Notes
fixed stop loss messages and logic.Release Notes
fixed: problem with the timestamp, due to which signals did not arrive to the OKX exchangeRelease Notes
Fixed:- OKX alerts - priceOffset (Negative numbers cannot be used.)
Added:
- Possibility to turn off - Cross MA strategy
- Checking for trend for stop loss
Release Notes
update: stop-loss logicRelease Notes
Fixed:*When an stoploss and takeprofit was triggered, double notification was sent to a "tradingview". With alerts to "OKX" had all well.
Update:
- Strategy name
- Change a default strategy style
- Appearance of a the settings window
Added:
- Options for a customiser ma, bb
When using the strategy only for alerts to the exchange OKX, you can use this: alert() function calls only. And the required webhook URL.
Release Notes
fixed a conditionsRelease Notes
Fixed:- minor errors
Added:
- SuperTrend + ATR option as stop-loss price
- For ATR stop-loss: when "Use TP orders 3" on and price cross bb lower or upper line #3, updates a stop-loss price.
Release Notes
Fixed:- Flex stop loss no longer affects SuperTrend + ATR
- OKX: The price for a limit order is now sent more accurately
Release Notes
fixed limit order alertRelease Notes
Added:- Stop loss by StdDev
Changed:
- Logic for additional shorts.
- Logic updating stop loss price.
- Before opening a position or when a stop loss (SuperTrend) is triggered, open orders in the opposite direction are now closed.
Attention!
If used additional short orders, stop loss or limit orders then need check profit after update.
Release Notes
Fixed minor errorsStop loss price display
Release Notes
Strategy only for OKX exchangeFor alerts, specify the message {{strategy.order.alert_message}}
Release Notes
Added:- Choice fixed number of contracts for OKX alerts
- Entry trigger
- Stop-loss trigger
- SuperTrend as entry signal
Release Notes
Fixed limit orders alertOpen-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.