Advertisement
Guest User

DCA PV Alert Syntax

a guest
Apr 27th, 2022
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 4.07 KB | None | 0 0
  1. [if _boqty and _percent]
  2. side=[side] type=market quantity=[_boqty]% expect=1 retries=5 error=abort id=bo save
  3. wait=2
  4. [end]
  5. [if _boqty and _fixed]
  6. side=[side] type=market quantity=[_boqty] expect=1 retries=5 error=abort id=bo save
  7. wait=2
  8. [end]
  9. [if _start_notify_telegram]
  10. notify=telegram:"*Deal started*\nExchange: {e} \nSymbol: {s} \nAccount: {a} \nDirection: {lastside} \nPrice: {lastprice}"
  11. [end]
  12. [if _start_notify_discord]
  13. notify=discord:"*Deal started*\nExchange: {e} \nSymbol: {s} \nAccount: {a} \nDirection: {lastside} \nPrice: {lastprice}"
  14. [end]
  15.  
  16.  
  17. [if _tplevel]
  18. check=position side=[side] ifnone=closemarket
  19. cancel=order id=tp
  20. close=pos side=[side] type=limit price=@[_tplevel] id=tp
  21. [end]
  22. [if _isttp]
  23. cancel=order side=[side]
  24. [end]
  25. [if _stoplevel]
  26. check=position side=[side] ifnone=closemarket
  27. cancel=order id=sl
  28. side=[!side] stoploss=@[_stoplevel] type=market quantity=[_stopqty]% yield=total id=sl reduce=1 expect=1 retries=5 error=closemarket notify=0
  29. [end]
  30.  
  31. [if _so1price and _percent]
  32. side=[side] type=limit quantity=[_so1qty]% price=@[_so1price] yield=total id=so1 notify=0
  33. [end]
  34. [if _so1price and _fixed]
  35. side=[side] type=limit quantity=[_so1qty] price=@[_so1price] yield=total id=so1 notify=0
  36. [end]
  37. [if _so2price and _percent]
  38. side=[side] type=limit quantity=[_so2qty]% price=@[_so2price] yield=total id=so2 notify=0
  39. [end]
  40. [if _so2price and _fixed]
  41. side=[side] type=limit quantity=[_so2qty] price=@[_so2price] yield=total id=so2 notify=0
  42. [end]
  43. [if _so3price and _percent]
  44. side=[side] type=limit quantity=[_so3qty]% price=@[_so3price] yield=total id=so3 notify=0
  45. [end]
  46. [if _so3price and _fixed]
  47. side=[side] type=limit quantity=[_so3qty] price=@[_so3price] yield=total id=so3 notify=0
  48. [end]
  49. [if _so4price and _percent]
  50. side=[side] type=limit quantity=[_so4qty]% price=@[_so4price] yield=total id=so4 notify=0
  51. [end]
  52. [if _so4price and _fixed]
  53. side=[side] type=limit quantity=[_so4qty] price=@[_so4price] yield=total id=so4 notify=0
  54. [end]
  55. [if _so5price and _percent]
  56. side=[side] type=limit quantity=[_so5qty]% price=@[_so5price] yield=total id=so5 notify=0
  57. [end]
  58. [if _so5price and _fixed]
  59. side=[side] type=limit quantity=[_so5qty] price=@[_so5price] yield=total id=so5 notify=0
  60. [end]
  61. [if _so6price and _percent]
  62. side=[side] type=limit quantity=[_so6qty]% price=@[_so6price] yield=total id=so6 notify=0
  63. [end]
  64. [if _so6price and _fixed]
  65. side=[side] type=limit quantity=[_so6qty] price=@[_so6price] yield=total id=so6 notify=0
  66. [end]
  67. [if _so7price and _percent]
  68. side=[side] type=limit quantity=[_so7qty]% price=@[_so7price] yield=total id=so7 notify=0
  69. [end]
  70. [if _so7price and _fixed]
  71. side=[side] type=limit quantity=[_so7qty] price=@[_so7price] yield=total id=so7 notify=0
  72. [end]
  73. [if _so8price and _percent]
  74. side=[side] type=limit quantity=[_so8qty]% price=@[_so8price] yield=total id=so8 notify=0
  75. [end]
  76. [if _so8price and _fixed]
  77. side=[side] type=limit quantity=[_so8qty] price=@[_so8price] yield=total id=so8 notify=0
  78. [end]
  79. [if _so9price and _percent]
  80. side=[side] type=limit quantity=[_so9qty]% price=@[_so9price] yield=total id=so9 notify=0
  81. [end]
  82. [if _so9price and _fixed]
  83. side=[side] type=limit quantity=[_so9qty] price=@[_so9price] yield=total id=so9 notify=0
  84. [end]
  85. [if _so10price and _percent]
  86. side=[side] type=limit quantity=[_so10qty]% price=@[_so10price] yield=total id=so10 notify=0
  87. [end]
  88. [if _so10price and _fixed]
  89. side=[side] type=limit quantity=[_so10qty] price=@[_so10price] yield=total id=so10 notify=0
  90. [end]
  91.  
  92. [if _end_notify_telegram]
  93. check=pos side=[side] iffound=retry jumpdelay=10 save log=warn
  94. notify=telegram:"⬇*Deal ended*⬇\nExchange: {e} \nSymbol: {s} \nAccount: {a} \nDirection: {lastside} \nPos PnL: {lastpnl}% \nTotal PnL: {lastpnltotal}%"
  95. cancel=order
  96. close=pos type=market
  97. [end]
  98. [if _end_notify_discord]
  99. check=pos side=[side] iffound=retry jumpdelay=10 save log=warn
  100. notify=discord:"*Deal ended*\nExchange: {e} \nSymbol: {s} \nAccount: {a} \nDirection: {lastside} \nPos PnL: {lastpnl}% \nTotal PnL: {lastpnltotal}%"
  101. cancel=order
  102. close=pos type=market
  103. [end]
  104.  
  105. [if _dealend]
  106. wait=2
  107. cancel=order
  108. close=pos type=market
  109. exit
  110. [end]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement