vdubus

Vdub FX Sniper VX3 / Strategy

25076 69 2903
Original coding
Vdub FX SniperVX2 Color v2

*Modified signal generator

Remove from Favorite Scripts Add to Favorite Scripts
//@version=2
//╭╮╱╱╭╮╭╮╱╱╭╮
//┃╰╮╭╯┃┃┃╱╱┃┃
//╰╮┃┃╭┻╯┣╮╭┫╰━┳╮╭┳━━╮
//╱┃╰╯┃╭╮┃┃┃┃╭╮┃┃┃┃━━┫
//╱╰╮╭┫╰╯┃╰╯┃╰╯┃╰╯┣━━┃
//╱╱╰╯╰━━┻━━┻━━┻━━┻━━╯
//╭━━━┳╮╱╱╱╱╱╱╱╭╮
//┃╭━╮┃┃╱╱╱╱╱╱╱┃┃
//┃┃╱╰┫╰━┳━━┳━╮╭━╮╭━━┫┃
//┃┃╱╭┫╭╮┃╭╮┃╭╮┫╭╮┫┃━┫┃
//┃╰━╯┃┃┃┃╭╮┃┃┃┃┃┃┃┃━┫╰╮
//╰━━━┻╯╰┻╯╰┻╯╰┻╯╰┻━━┻━╯
//━╯
// http://www.vdubus.co.uk/
strategy(title='Vdub FX SniperVX3 / Strategy  v3', shorttitle='Vdub_FX_SniperVX3_Strategy', overlay=true, pyramiding=0, initial_capital=1000, currency=currency.USD)

//Candle body resistance Channel-----------------------------//
len = 34
src = input(close, title="Candle body resistance Channel")
out = sma(src, len)
last8h = highest(close, 13)
lastl8 = lowest(close, 13)
bearish = cross(close,out) == 1 and falling(close, 1)
bullish = cross(close,out) == 1 and rising(close, 1)
channel2=input(false, title="Bar Channel On/Off")
ul2=plot(channel2?last8h:last8h==nz(last8h[1])?last8h:na, color=black, linewidth=1, style=linebr, title="Candle body resistance level top", offset=0)
ll2=plot(channel2?lastl8:lastl8==nz(lastl8[1])?lastl8:na, color=black, linewidth=1, style=linebr, title="Candle body resistance level bottom", offset=0)
//fill(ul2, ll2, color=black, transp=95, title="Candle body resistance Channel")

//-----------------Support and Resistance 
RST = input(title='Support / Resistance length:', type=integer, defval=10) 
RSTT = valuewhen(high >= highest(high, RST), high, 0)
RSTB = valuewhen(low <= lowest(low, RST), low, 0)
RT2 = plot(RSTT, color=RSTT != RSTT[1] ? na : red, linewidth=1, offset=+0)
RB2 = plot(RSTB, color=RSTB != RSTB[1] ? na : green, linewidth=1, offset=0)

//--------------------Trend colour ema------------------------------------------------// 
src0 = close, len0 = input(13, minval=1, title="EMA 1")
ema0 = ema(src0, len0)
direction = rising(ema0, 2) ? +1 : falling(ema0, 2) ? -1 : 0
plot_color = direction > 0  ? lime: direction < 0 ? red : na
plot(ema0, title="EMA", style=line, linewidth=1, color = plot_color)

//-------------------- ema 2------------------------------------------------//
src02 = close, len02 = input(21, minval=1, title="EMA 2")
ema02 = ema(src02, len02)
direction2 = rising(ema02, 2) ? +1 : falling(ema02, 2) ? -1 : 0
plot_color2 = direction2 > 0  ? lime: direction2 < 0 ? red : na
plot(ema02, title="EMA Signal 2", style=line, linewidth=1, color = plot_color2)

//=============Hull MA//
show_hma = input(false, title="Display Hull MA Set:")
hma_src = input(close, title="Hull MA's Source:")
hma_base_length = input(8, minval=1, title="Hull MA's Base Length:")
hma_length_scalar = input(5, minval=0, title="Hull MA's Length Scalar:")
hullma(src, length)=>wma(2*wma(src, length/2)-wma(src, length), round(sqrt(length)))
plot(not show_hma ? na : hullma(hma_src, hma_base_length+hma_length_scalar*6), color=black, linewidth=2, title="Hull MA")

//============ signal Generator ==================================//
Piriod=input('720')
ch1 = security(tickerid, Piriod, open)
ch2 = security(tickerid, Piriod, close)
longCondition = crossover(security(tickerid, Piriod, close),security(tickerid, Piriod, open))
if (longCondition)
    strategy.entry("BUY", strategy.long)
shortCondition = crossunder(security(tickerid, Piriod, close),security(tickerid, Piriod, open))
if (shortCondition)
    strategy.entry("SELL", strategy.short)

///////////////////////////////////////////////////////////////////////////////////////////
Looks great, is it repainting? Looks almost too good! Anyways I think you should add a stop loss to the strategy ;)
Reply
I haven't tested this out fully as yet. The signal generated work well together with the Rejection spike strategy integrated into the system
Rejection Spike Strategy - By Russ Horn

snapshot
Reply
If I change the input settings, it does not change anything in the signals... I wanted to have more signals (for stocks), intraday signals, with current settings , there is a signal every few days. Is there a way to make the change of settings work on the strategy signal generating? Thank you.
+10 Reply
ChartArt Hausky
Yes, this strategy repaints, same as the popular ANN strategy by Sirolf2009. It uses future data from a higher time frame which vdubus named "signal generator". I was stunned by the performance and looked at the code. The backtest results were too good to be true :)

Besides this issue that the backtest data isn't reliable due to the repainting, I assume that this strategy still performs very good in live trading. Thanks for sharing this strategy with everyone, vdubus!
+10 Reply
zmm20 ChartArt
@ChartArt, Yep. All this strategy does is buy if the close price is higher than the open price, and sell if the close price is lower than the open price. Because of the way Tradingview implements custom timeframes, all the strategy is doing is comparing open/close values that are known at the BEGINNING of the interval, so the results are completely worthless. I wrote my own strategy just like this that gets even better results, it's only 4 lines long lol.
+4 Reply
@zmm20, your full of shit
+3 Reply
burrr PRO Glenn_Guitarist
Reply
MarxBabu Hausky
IMPORTANT : EACH ONE OF YOUR VOTE bring this most powerful feature come true and be available in Tradingview.This is best indicator and Screener option needed.Please vote your count in this link please
https://getsatisfaction.com/tradingview/topics/supertrend-v1-0-v5-0-most-powerful-and-profitable-indicator?rfm=1
+5 Reply
GoodJob!!! Can i see more signals on m5 timeframe?
Reply
vdubus PRO Evgenich
Have a play with the period time frame currently set at 720. For a m5 id say change it to 240, 120 or even 60 mins
+1 Reply
Evgenich vdubus
Thank you. Good luck
+1 Reply
I think it is repainting, cause I just had a long signal, and 1 hour later it is gone :/
+4 Reply
Hausky Hausky
snapshot
+2 Reply
Hausky Hausky
The buy signal is marked with a green arrow, and is now gone as you see
+2 Reply
the signal generated are a simple cross over, I have noticed it disappearing also,, but it is also my understanding that TV indicators don't exact;y re- paint so my best assumption is the cross over wasn't conclusive. May also help by refreshing the page.
Reply
ChartArt vdubus
They repaint. Always. As soon as you use a higher time-frame you have repainting. Because the MTF close is never known ... until the close. The Tradingview backtest engine can only use the final close of a higher time-frame, where as when using it live it always repaints. I had a great idea for a system last year until I had to learn this repainting made my idea too unreliable in live-trading.
Reply
Also help if you have another form of indication when building up a case for entry
snapshot
Reply
rishi12 vdubus
give me template
Reply
@rishi12, You unscrupulous scammers pumped my money
Reply
The strategy is written in 6 lines of code. the rest is not used. Men disagree is the same as
GetTrendStrategy
for period 720
+5 Reply
vdubus PRO YaroslavG
The signal are inconsistent as with the original indicator that this strategy has been applied to but should give you a basic idea of the performance. Thank you
Reply
I understand your idea. Thank you!
Reply
Repainting
+6 Reply
This strategy is invalid. It uses data from the NEXT 12 hours and then it decides to go long if the next 12 hours market will go up, and short if the next 12 hours the market will go down.
If you paint the ch1 and ch2 series you'll understand why some signals disappear and why the statistics are so incredible.
Nice try, but it doesn't work. :-(
+8 Reply
vdubus PRO doremisolla
yes please don't trade the signal alone without doing you own analysis
+3 Reply
Seal PRO doremisolla
Vdubus is this true? It looks very impressive but wasn't aware that signals change in history. Thanks
Reply
This is amazing! Keep up the great work!
Reply
can you make this into an ea for mt4? or is there anyway to atleast get this indicator on mt4?
please get back to me, i love this thing!!!! fantastic job vdubus
+1 Reply
has anyone figured out how to code a strategy that closes a position at the end of everyday?
Reply
ZoharCho PRO Zack_The_Lego
PUT THIS 2 LINES AT THE FIRST LINES OF THE CODE
stopalltime=hour
stopmintime=minute

PUT THIS LINE AT THE END OF YOUR CODE:
strategy.close_all(when=stopalltime>14 and stopmintime>50) //no swing command , CHANGE IT TO THE DESIRED TIME (14:50) ...
+10 Reply
bowler2p ZoharCho
@ZoharCho,

Ooooh,.....Did I need that.

Thank you,

Very newbei
Reply
Is there any reason why the BUY and SELL markers have stopped drawing properly? Example: http://i.imgur.com/rsD86Nl.png
Reply
Did you set your chart to use percentages?
+1 Reply
I have created a ticket about the repainting issue, Please upvote it so that it might actually get fixed: https://getsatisfaction.com/tradingview/topics/strategies-and-indicators-are-repainting
+1 Reply
vdubus PRO sirolf2009
I have already stated not to trade the signals they are unreliable to trade by themselves. this is not a tradingview issue more the indicator it's self. I have no intention of updating this strategy
Reply
If you can't trade the signals doesn't that make this an indicator and not a strategy?
+1 Reply
your strategy seems working great on 15min crude oil and silver,
its not working on daily,
seems that it works on futures with round the clock trading and
have certain period of hours during the day which have very thin
volume
+1 Reply
scarf PRO rcchong
You need to change the Period input from 720 mins to something higher. 720 is 12 hours so won't work properly on a higher timeframe (which is 24 hours, obviously)
Reply
Hi my name is repaint.

Piriod=input('720')
ch1 = security(tickerid, Piriod, open)
ch2 = security(tickerid, Piriod, close)
longCondition = crossover(security(tickerid, Piriod, close),security(tickerid, Piriod, open))
if (longCondition)
strategy.entry("BUY", strategy.long)
shortCondition = crossunder(security(tickerid, Piriod, close),security(tickerid, Piriod, open))
if (shortCondition)
strategy.entry("SELL", strategy.short)
+10 Reply
profprof UrbiGT
How do I remove and test the strategy without repainting?
+1 Reply
Yes, looks great!
VDUBUS a question: the signals appears in realtime (last candle) or upon a past one? In other words: the strategy have some "candle delay?"
Very good work!! Great your tuning about period/timing setting!
Reply
jarno.rossi PRO morphinestyle
yes please VDUBUS, clarify the way your system repaints. How many candles (or time) after the signal we can consider it definitive?
Reply
Hello vdubus. I tried to copy the script and paste it to the pine editor, but it gives me an error message. Please help. Thank you. Eddie122275@gmail.com
Reply
scarf PRO EduardoCuevas
It's easier to click the share icon and choose 'Make It Mine': http://i.imgur.com/VelLhUA.png
Reply
hi. is this a repaint?
Reply
mo_trade mo_trade
how do i apply this on mt4?
Reply
Why the signal is lost
Reply
Hi.. do you have the MT4 or 5 version?
Reply
This works very accurate in Weekly chart. The only strategy that predicts future level buy or sell level using Zone Analysis.
ZONE Supply Demand Strategy1
Reply
Anybody with Mr mani pine script should please share it.
My email is jeffumu@yahoo.co.uk
+1 Reply
Great script !
I would like to understand how the security is calculated function is calculated. Unfortunatelly the doc doesn't show the implementation (https://www.tradingview.com/study-script-reference/#fun_security). Do you know where I could find more information on how to calculate the security function ?

I would like to make this function in javascript.
Reply
i have 4 100% accurate binary option 1 min trading method . know i need to create some indicator for that can you help me . my email id is viprinson@gmail.com Contact no +918754916662
+2 Reply
mkdeep04 VinobaPrinson
which software u using present mt4 ? or ..
Reply
Hi, why does the signal come after 3 bars? what can i do to make it work?
Reply
Сможешь объяснить как работать по ней?
Reply
Since PRO Nikolay480909
@Nikolay480909, Не питай излишних иллюзий к скрипту, сигналы перерисовываются.
Reply
what the moving averages 9 and 18?
Reply
As many other people have said, the strategy is invalid. It uses future data to make trade decisions - i.e. the close value is known at the beginning of the tick to determine the trade for that tick -

longCondition = crossover(security(tickerid, Piriod, close),security(tickerid, Piriod, open))
shortCondition = crossunder(security(tickerid, Piriod, close),security(tickerid, Piriod, open))

So gives no useful data when used realtime, aka repaints
Reply
I am new to Trading View.I copied the programme onto Pine but it does not accept it.A message comes up saying try adding @version 2, but this is already on there.Could you please suggest what to do.Thanks.
+1 Reply
nosense, too nice to be true. The code use 720 future data in order to decide the position.
fake
Reply
vdubus PRO AdrianoRenzi
It's already been stated that this strategy doesn't work. Try reading
+1 Reply
https://www.youtube.com/watch?v=l9st2vhD4MU&t=218s some one tell me which script is this video one
+2 Reply
vdubus PRO VessiBoki169
@VessiBoki169, why don't ask Mr mani of london ? He seems to like stealing peoples scripts and selling them as his own.
+2 Reply
@vdubus, that why i ask you i don`t want to pay him.Any one know about that please tell me
Reply
is there anyway to deal with repaint?
Reply
Hi vdubus

Please allow me access to this software.

Kind Regards
Lucas
Reply
WHY would anybody make a strategy, that scammes itself?? I spent 2 days and nights working with this scam... I bet some people even used it for real and lost their money. Wouldnt be surprised if somebody would be calling for a persecution... Now this is the last drop! There is no easy way in trading, back to the real work and I will never use anything made by anybody else than me personally... this sucks, really...
Reply
This script is junk. It uses the close of a future 8H bar in the strategy. It is not live, it knows information not available 7 hours in advance for the backtesting. Please understand this. You should immediately question a backtest that looks like that kind of performance.
Reply
mortdiggiddy PRO mortdiggiddy
@mortdiggiddy First of all these lines, with "Period" spelled incorrectly,

Piriod=input('720')
ch1 = security(tickerid, Piriod, open)
ch2 = security(tickerid, Piriod, close) // <----
longCondition = crossover(security(tickerid, Piriod, close),security(tickerid, Piriod, open))

The 3rd line with the arrow, the backtest study will "know" the closing price of the 8HR bar. There are ways around this but this strategy is complete crap. This is similar to that crap ANN Strategy out there. It knows information ahead of time in the back test study, since the close of a previous 8HR bar is known to the database well in advance.
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
France
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Forex Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Account and Billing Sign Out