TradingView
SeaSide420
14 авг 2018 г., 07:32

TSI/HullMA/VWMA strategy 

Bitcoin / DollarBitfinex

Описание

change the settings to make it profitable.. default settings not apply to any instrument in-particular.. dont be afraid to try different settings to find profitable combo of settings on your chosen crypto/FX/stock etc.. to avoid repaint wait for next candle before confirm signal..
Комментарии
diLiviu
For those who are interested in @version5
Tested with 1D tf, looks good

////////////////////////////
//@version=5
strategy('TSI/HullMA/VWMA strategy', shorttitle='TSI/HullMA/VWMA v5', overlay=true, initial_capital=1000, default_qty_type=strategy.fixed, default_qty_value=0.05, commission_type=strategy.commission.percent, commission_value=0.075, slippage=5, calc_on_order_fills=true, calc_on_every_tick=true, pyramiding=0)
TP = input.float(defval=4.00, title='TargetPoint in $', step=1)
SL = input.float(defval=-100.00, title='StopLoss in $', step=1)
signal = input(title='Signal Length', defval=2)
keh = input(title='HullMA cross', defval=6)
a = input(title='VWMA', defval=10)
long = 35
short = 35
linebuy = 4
linesell = -4
ot = 1
p = ohlc4[0]
double_smooth(src, long, short) =>
fist_smooth = ta.ema(src, long)
ta.ema(fist_smooth, short)
pc = ta.change(p)
rvwma = ta.vwma(p, math.round(a))
rvwma2 = ta.vwma(p, math.round(a * 2))
n2ma = 2 * ta.wma(p, math.round(keh / 2))
nma = ta.wma(p, keh)
diff = n2ma - nma
sqn = math.round(math.sqrt(keh))
n2ma1 = 2 * ta.wma(p[1], math.round(keh / 2))
nma1 = ta.wma(p[1], keh)
diff1 = n2ma1 - nma1
sqn1 = math.round(math.sqrt(keh))
n1 = ta.wma(diff, sqn)
n2 = ta.wma(diff1, sqn)
hullbuy = n1 > n2 and n1 > n2[1] and rvwma > rvwma2
hullsell = n1 < n2 and n1 < n2[1] and rvwma < rvwma2
candlebuy = ohlc4[0] > ohlc4[1] and ohlc4[0] > ohlc4[2] and ohlc4[0] > ohlc4[3]
candlesell = ohlc4[0] < ohlc4[1] and ohlc4[0] < ohlc4[2] and ohlc4[0] < ohlc4[3]
double_smoothed_pc = double_smooth(pc, long, short)
double_smoothed_abs_pc = double_smooth(math.abs(pc), long, short)
tsi_value = 100 * (double_smoothed_pc / double_smoothed_abs_pc)

if tsi_value > ta.ema(tsi_value, signal) and candlebuy and hullbuy
strategy.entry('buy', strategy.long, comment="L", alert_message = "start long")

if tsi_value < ta.ema(tsi_value, signal) and candlesell and hullsell
strategy.entry('sell', strategy.short, comment="S", alert_message = "start short")

if strategy.openprofit > TP or strategy.openprofit < SL
if strategy.position_size > 0
strategy.close("buy", comment = "TP L", alert_message = "TP L")
if strategy.position_size < 0
strategy.close("sell", comment = "TP S", alert_message = "TP S")
talyfe
You guys should check out this guy instead. 100% honest no bs repainting, no TV bugs.

tradingview.com/u/Quansium/
iDS7
Hey @SeaSide420 am I supposed to just port this strategy into script and it'll start taking orders for me live? Sorry man I'm new to script and going to learn but need to know if it will actually place orders or not. It seems i'm having issues with Strategies NOT placing live orders, do you have any idea why?
SeaSide420
@Maustula, click on the ADD TO FAVOURITE SCRIPTS (up and to the right (under the chart)) then it will be in the list of indicators (in your fav's)
or, you can copy the script, then paste it onto your pine script editor, then save it in any name you choose, then it will be in your indicator list.
If the settings make the strategy do over 2000 orders, then the tester fails. just change settings in a way to reduce amount of orders opened, also try different timeframes.
SeaSide420
Low TP require low spread!!
Ещё