TradingView
UnknownUnicorn2151907
28 de Nov. de 2019 5:00

$ SuPeR-RePaNoCHa $ [Alerts] 

Bitcoin / TetherUSBinance

Descripción

Script for automatic trading (Alerts). This is the second part of the previous RePanoCHa script but with Take Profit.

It Use 6 indicators + volume:

-JURIK MOVING AVERAGE
-RANGE FILTER (DONOVAN WALL)
-ADX (ORIGINAL VERSION)
-PARABOLIC SAR
-RSI + VOLUME WEIGHTED (LAZYBEAR)
-MACD
-VOLUME

To close the position you can choose between Take Profit only, Trailing Stop only or both at the same time.


Example of bot syntax: (alerts once per bar)

LONG | e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT c=order | delay=1 | e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT c=position b=short t=market ro=1 | delay=1 | e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT b=long q=100% t=market | delay=1 | e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT c=position b=long p=0.7% q=50% t=post ro=1

SHORT | e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT c=order | delay=1 | e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT c=position b=long t=market ro=1 | delay=1 | e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT b=short q=100% t=market | delay=1 | e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT c=position b=short p=-0.7% q=50% t=post ro=1

LONG TP | e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT c=position q=50% t=market ro=1 (if you set the TP from entry this alert is not necessary)

SHORT TP | e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT c=position q=50% t=market ro=1 (if you set the TP from entry this alert is not necessary)

LONG TS | e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT c=position q=10% t=market // (alerts once per minute)

SHORT TS | e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT c=position q=10% t=market // (alerts once per minute)

XLONG/STOP-LOSS | e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT c=order | delay=1 | e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT c=position b=long t=market ro=1

XSHORT/STOP-LOSS | e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT c=order | delay=1 | e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT c=position b=short t=market ro=1

Comentarios
JayP999
Hey your script looks really good. I mainly use only the short and long condtions. But these work great.
I have recently enabled the trailing stop and stop loss function and had no problems so far.
However, since yesterday evening a problem occurred. Your script opens a trade and does not close it anymore. Both the TS and SL are not executed.
You can see this at my charti in the green box (18 April at 12pm (UTC)):

tradingview.com/chart/6Zvke20s/

The error occurs with the following settings on the chart BTCUSD Perpetual Contract 1h BYBIT on 18 April at 12pm (UTC).

I use the default settings.
I only change the following things.

- Change exit strategy from BOTH to TRAILING STOP
- ACTIVATE STOP LOSS
- Set the STOP LOSS to 2%

Do you have an idea what could be the reason for this?
rhanna
Thank you very much!
biswad
Why its saying the indicator can re paint warning while setting alert. does it re paint?
duurrrr1
@XaviZ Thank you for the great script! I was wondering if there would be a way to create an alert when the bars turn green or red. It would be a good strategy when you have your candles on Heiken Ashi. Thanks so much!
goldshillings
So for example?
One alert for long:
e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT b=long q=100% t=market
One for TP:
e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT c=position q=50% t=market ro=1
and one for TS:
e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT c=position q=10% t=market
RobeX_Scalping
You have a mistake here
----
LONG | e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT c=order | delay=1 | e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT c=position b=short t=market ro=1 | delay=1 | e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT b=long q=100% t=market | delay=1 | e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT c=position b=long p=0.7% q=50% t=post ro=1

SHORT | e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT c=order | delay=1 | e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT c=position b=long t=market ro=1 | delay=1 | e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT b=short q=100% t=market | delay=1 | e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT c=position b=short p=-0.7% q=50% t=post ro=1
---

in last command

---
e=BINANCEFUTURES a=ACCOUNT s=BTCUSDT c=position b=long p=0.7% q=50% t=post ro=1
---

it is TP1 right? Then "b" need to be "short" for LONG position?
ggumuskanat
can we determine leverage in this system?
EfeErdost
how to set up long short alarms
gokhanaktas
Thank you for great work. I try to combine all alerts to one alert option. I am not sure will work but here is the code:

Pine script version 5

LongAlert = input.string('Long')
ShortAlert = input.string('ShortAlert')
LongTS = input.string('LongTS')
ShortTS = input.string('ShortTS')
LongStop = input.string('LongStop')
ShortStop = input.string('ShortStop')

if Final_longCondition
alert(LongAlert, alert.freq_once_per_bar)
if (Final_shortCondition)
alert(ShortAlert, alert.freq_once_per_bar)
if (Final_Long_ts and close > hband) and not Closing_long_ts
alert(LongTS, alert.freq_all)
if (Final_Short_ts and close < lband) and not Closing_short_ts
alert(ShortTS, alert.freq_all)
if Final_XL or Final_Long_sl or Closing_long_ts or (Final_Long_ts_pump and (close > last_open_longCondition*(1+Act_ts_pump/100)) and Act_not_conf)
alert(LongStop, alert.freq_once_per_bar)
if Final_XS or Final_Short_sl or Closing_short_ts or (Final_Short_ts_pump and (close < last_open_shortCondition*(1-Act_ts_pump/100)))
alert(ShortStop, alert.freq_once_per_bar)
PolTW
Hi, why in the backtest show some times "Close entry(s) open" to close a position?
Más