UnknownUnicorn2151907

RePaNoCHa [Alerts]

Script for automatic trading with Alerts (Use Backtest to customize your own settings)
All timeframes but good results on 2H.

LG --> Long
ST --> Short
TS --> Trailing Stop
xL --> Close Long Position
xS --> Close Short Position
SL --> Stop Loss

The trailing stop closes the trade if the price changes direction by a specified percentage or offset. There is no ideal distance because markets and price are always changing and we know that is impossible to exit on the top or bottom. This script interpolate the trailing Stop Offset with profit, higher profit -- > higher Trailing Stop Offset. Despite this, it's difficult to catch the price. If someone comes up with a good idea, comment, I'm happy to learn.
No security() function so no repaint but has time() and can appear a warning for it.

Alerts:

'Once per bar' More profit but not confirmed alerts (10-20% fake alerts)... I like risk
'Once per bar close' Confirmed alerts (0% fake alerts)... You will sleep better

Some settings:

XBTUSD (BITMEX)

Timeframe = 2H
Position Side = BOTH
Source = hlc3
T3 Length = 5
T3 Volume Factor = 0.9
Sampling Period = 16
Range Multiplier = 1.3
ADX lenght = 10
ADX Threshold = 20
SAR start = 0.07
SAR inc = 0.02
SAR max = 0.15
Pyramiding = 10
Trailing Stop Activation % = 0.5
Trailing Stop Offset % (when profit=0.5 %) = 0.35
Trailing Stop Offset % (when profit=10 %) = 1.5
Stop Loss = 3.5
Tics/Pips Correction = 10
Initial Capital = 1000
Quantity = 100 %
Commission value = 0.075 %

ETHUSD (BITMEX)

Timeframe = 2H
Position Side = BOTH
Source = hlc3
T3 Length = 5
T3 Volume Factor = 0.7
Sampling Period = 13
Range Multiplier = 0.9
ADX lenght = 11
ADX Threshold = 19
SAR start = 0.06
SAR inc = 0.03
SAR max = 0.15
Pyramiding = 10
Trailing Stop Activation % = 0.5
Trailing Stop Offset % (when profit=0.5 %) = 0.35
Trailing Stop Offset % (when profit=10 %) = 1.5
Stop Loss = 4
Tics/Pips Correction = 100
Initial Capital = 1000
Quantity = 100 %
Commission value = 0.075 %

BNBUSDT (BINANCE)

Timeframe = 2H
Position Side = LONG
Source = hlc3
T3 Length = 3
T3 Volume Factor = 1.6
Sampling Period = 17
Range Multiplier = 1.3
ADX lenght = 5
ADX Threshold = 18
SAR start = 0.04
SAR inc = 0.03
SAR max = 0.25
Pyramiding = 10
Trailing Stop Activation % = 0.5
Trailing Stop Offset % (when profit=0.5 %) = 0.4
Trailing Stop Offset % (when profit=10 %) = 1.5
Stop Loss == false
Tics/Pips Correction = 10000
Initial Capital = 1000
Quantity = 100 %
Commission value = 0.075 %

LTCUSDT (BINANCE)

Timeframe = 2H
Position Side = LONG
Source = hlc3
T3 Length = 3
T3 Volume Factor = 1.6
Sampling Period = 11
Range Multiplier = 1.1
ADX lenght = 6
ADX Threshold = 22
SAR start = 0.07
SAR inc = 0.04
SAR max = 0.15
Pyramiding = 10
Trailing Stop Activation % = 0.5
Trailing Stop Offset % (when profit=0.5 %) = 0.4
Trailing Stop Offset % (when profit=10 %) = 1.5
Stop Loss == false
Tics/Pips Correction = 100
Initial Capital = 1000
Quantity = 100 %
Commission value = 0.075 %

TRXUSDT (BINANCE)

Timeframe = 2H
Position Side = LONG
Source = hlc3
T3 Length = 3
T3 Volume Factor = 0.9
Sampling Period = 8
Range Multiplier = 1.2
ADX lenght = 4
ADX Threshold = 22
SAR start = 0.07
SAR inc = 0.04
SAR max = 0.15
Pyramiding = 10
Trailing Stop Activation % = 0.5
Trailing Stop Offset % (when profit=0.5 %) = 0.4
Trailing Stop Offset % (when profit=10 %) = 1.5
Stop Loss == false
Tics/Pips Correction = 100000
Initial Capital = 1000
Quantity = 100 %
Commission value = 0.075 %

NAS100 (OANDA)

Timeframe = 2H
Position Side = BOTH
Source = hlc3
T3 Length = 3
T3 Volume Factor = 1
Sampling Period = 12
Range Multiplier = 1.3
ADX lenght = 18
ADX Threshold = 21
SAR start = 0.08
SAR inc = 0.06
SAR max = 0.25
Pyramiding = 10
Trailing Stop Activation % = 0.2
Trailing Stop Offset % (when profit=0.5 %) = 0.15
Trailing Stop Offset % (when profit=10 %) = 1
Stop Loss = 1.8
Tics/Pips Correction = 10
Initial Capital = 1000
Quantity = 3 contracts
Commission value = 0.2 USD per contract

NATGAS(OANDA)

Timeframe = 2H
Position Side = BOTH
Source = hlc3
T3 Length = 3
T3 Volume Factor = 1
Sampling Period = 18
Range Multiplier = 1.1
ADX lenght = 10
ADX Threshold = 17
SAR start = 0.1
SAR inc = 0.04
SAR max = 0.35
Pyramiding = 10
Trailing Stop Activation % = 0.2
Trailing Stop Offset % (when profit=0.5 %) = 0.15
Trailing Stop Offset % (when profit=10 %) = 1
Stop Loss = 1.6
Tics/Pips Correction = 1000
Initial Capital = 1000
Quantity = 4500 contracts
Commission value = 0.002 USD per contract

SPX500 (OANDA)

Timeframe = 2H
Position Side = BOTH
Source = hlc3
T3 Length = 3
T3 Volume Factor = 0.6
Sampling Period = 14
Range Multiplier = 1.3
ADX lenght = 12
ADX Threshold = 17
SAR start = 0.23
SAR inc = 0.05
SAR max = 0.2
Pyramiding = 10
Trailing Stop Activation % = 0.15
Trailing Stop Offset % (when profit=0.5 %) = 0.1
Trailing Stop Offset % (when profit=10 %) = 0.75
Stop Loss = 1.5
Tics/Pips Correction = 10
Initial Capital = 1000
Quantity = 8 contracts
Commission value = 0.2 USD per contract

US30 (OANDA)

Timeframe = 2H
Position Side = BOTH
Source = hlc3
T3 Length = 4
T3 Volume Factor = 0.9
Sampling Period = 11
Range Multiplier = 1.1
ADX lenght = 16
ADX Threshold = 24
SAR start = 0.08
SAR inc = 0.03
SAR max = 0.05
Pyramiding = 10
Trailing Stop Activation % = 0.15
Trailing Stop Offset % (when profit=0.5 %) = 0.1
Trailing Stop Offset % (when profit=10 %) = 0.75
Stop Loss = 1.5
Tics/Pips Correction = 10
Initial Capital = 1000
Quantity = 1 contracts
Commission value = 1.5 USD per contract

WHEAT (OANDA)

Timeframe = 2H
Position Side = BOTH
Source = hlc3
T3 Length = 3
T3 Volume Factor = 1.1
Sampling Period = 12
Range Multiplier = 1
ADX lenght = 13
ADX Threshold = 21
SAR start = 0.07
SAR inc = 0.05
SAR max = 0.15
Pyramiding = 10
Trailing Stop Activation % = 0.2
Trailing Stop Offset % (when profit=0.5 %) = 0.15
Trailing Stop Offset % (when profit=10 %) = 1
Stop Loss = 2.5
Tics/Pips Correction = 1000
Initial Capital = 1000
Quantity = 2500 contracts
Commission value = 0.003 USD per contract
版本注释:
Now the script is 75% shorter and the Pyramiding is infinite.
Added a time delay for Trailing Stop alerts to try to catch the price at top/bottom...
受保护脚本
该脚本是闭源发布的,您可以自由使用它。您可以收藏它以在图表上使用。您无法查看或修改其源代码。
免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?