facejungle

2Mars strategy [OKX]

facejungle Atualizado   
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:
Notas de Lançamento:
fixed stop loss messages and logic.
Notas de Lançamento:
fixed: problem with the timestamp, due to which signals did not arrive to the OKX exchange
Notas de Lançamento:
Fixed:
  • OKX alerts - priceOffset (Negative numbers cannot be used.)
Added:
  • Possibility to turn off - Cross MA strategy
  • Checking for trend for stop loss
Notas de Lançamento:
update: stop-loss logic
Notas de Lançamento:
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.
Notas de Lançamento:
fixed a conditions
Notas de Lançamento:
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.
Notas de Lançamento:
Added:
  • Flex stop loss for ATR
  • Additional order entries
  • Stop loss price is now displayed
Notas de Lançamento:
Fixed:
  • Flex stop loss no longer affects SuperTrend + ATR
  • OKX: The price for a limit order is now sent more accurately
Notas de Lançamento:
fixed limit order alert
Notas de Lançamento:
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.
Notas de Lançamento:
Fixed minor errors
Stop loss price display
Notas de Lançamento:
Strategy only for OKX exchange
For alerts, specify the message {{strategy.order.alert_message}}
Notas de Lançamento:
Added:
  • for take profit, comparison of the current price with the average entry price
  • display of the last limit order
  • entry points
Notas de Lançamento:
Added:
  • Choice fixed number of contracts for OKX alerts
  • Entry trigger
  • Stop-loss trigger
  • SuperTrend as entry signal
Notas de Lançamento:
Fixed limit orders alert

Script de código aberto

Dentro do verdadeiro espírito TradingView, o autor deste script publicou ele como um script de código aberto, para que os traders possam compreender e checar ele. Um viva ao autor! Você pode usá-lo gratuitamente, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.

Quer usar esse script no gráfico?