TradingView
facejungle
2023년 10월 4일 오후 4시 39분

2Mars strategy [OKX] 

SOLUSDT Perpetual Swap ContractOKX

설명

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:

릴리즈 노트

fixed stop loss messages and logic.

릴리즈 노트

fixed: problem with the timestamp, due to which signals did not arrive to the OKX exchange

릴리즈 노트

Fixed:
  • OKX alerts - priceOffset (Negative numbers cannot be used.)

Added:
  • Possibility to turn off - Cross MA strategy
  • Checking for trend for stop loss

릴리즈 노트

update: stop-loss logic

릴리즈 노트

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.

릴리즈 노트

fixed a conditions

릴리즈 노트

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.

릴리즈 노트

Added:
  • Flex stop loss for ATR
  • Additional order entries
  • Stop loss price is now displayed

릴리즈 노트

Fixed:
  • Flex stop loss no longer affects SuperTrend + ATR
  • OKX: The price for a limit order is now sent more accurately

릴리즈 노트

fixed limit order alert

릴리즈 노트

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.

릴리즈 노트

Fixed minor errors
Stop loss price display

릴리즈 노트

Strategy only for OKX exchange
For alerts, specify the message {{strategy.order.alert_message}}

릴리즈 노트


Added:
  • for take profit, comparison of the current price with the average entry price
  • display of the last limit order
  • entry points

릴리즈 노트

Added:
  • Choice fixed number of contracts for OKX alerts
  • Entry trigger
  • Stop-loss trigger
  • SuperTrend as entry signal

릴리즈 노트

Fixed limit orders alert
코멘트
d-rass
UJuYj8PwJQq2ufB55R8zAtmmisuL8u
If I am not on the OKX exchange, can I use automatic order placement on other exchanges?
vik2k
Hello. I have a question, TP is triggered at each BB intersection, so there can be 20 or 30 alarms at a time, which leads to the fact that the alerts are turned off due to being triggered too often. How do I make it so that there are 1 positives?
woshicaoxin
Can I use this strategy for other cryptocurrencies? Sol doesn't seem very user-friendly as it doesn't support decimals.
d-rass
Hello will this work in their Demo environment? I am trying to test this script in their Demo mode and can not get the signal to come through. Thank you
facejungle
@d-rass, Hi, no matter what URL is specified, the notification should come.
The problem may be in the message being sent, or in the way it is processed. If everything is fine with the settings, write to me, I will test this demo URL in more detail.

Also make sure that you have selected the correct instrument on TradingView , the same as in the signal settings on the exchange. Otherwise the signal will not arrive.

example for swap, ADAUSDT.P

facejungle
Limit order alert not working properly >_<
Does anyone need them? :)
woshicaoxin
@facejungle, Could you please release the latest version? Thank you! Kisses!
autoexecbat08
thx for your work
facejungle
@autoexecbat08, I hope this will be useful to you
더보기