2Mars strategy [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:
- OKX alerts - priceOffset (Negative numbers cannot be used.)
Added:
- Possibility to turn off - Cross MA strategy
- Checking for trend for stop loss
*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.
- 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.
- Flex stop loss no longer affects SuperTrend + ATR
- OKX: The price for a limit order is now sent more accurately
- 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.
Stop loss price display
For alerts, specify the message {{strategy.order.alert_message}}
- Choice fixed number of contracts for OKX alerts
- Entry trigger
- Stop-loss trigger
- SuperTrend as entry signal
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Per un accesso rapido a un grafico, aggiungi questo script ai tuoi preferiti: per saperne di più clicca qui.
Declinazione di responsabilità
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Per un accesso rapido a un grafico, aggiungi questo script ai tuoi preferiti: per saperne di più clicca qui.