//@version=2 // simple cross of daily candle close // strategy("DailyCandleCross", shorttitle="DCC", overlay=true, calc_on_order_fills= true, calc_on_every_tick=true, default_qty_type=strategy.percent_of_equity, default_qty_value=75, pyramiding=0) A=security(tickerid, 'D', close) B=security(tickerid, 'D', close) C=A>B if(C) strategy.entry("Long", strategy.long) if(not C) strategy.entry("Short", strategy.short)
this indicator is an example of repainting. I do not suggest to use it. I would have deleted it years ago, but TV will not allow that.
Have you tried Indicator420b? https://www.tradingview.com/u/SeaSide420/#published-scripts
it will make you 1 million dolla!
it is free
(also the CCI_Hull is great)
when daily candle closes, it has a value, lets say 0.7015
during the next candle (day), the program compares the current price value to the previous close value.
If the current price is lower (0.7014), it will decide on SELL, if price higher (0.7016), then BUY.
this one works the same way, but is better.
the reason that one is better is because it does maths with the values.
it divides the value down into a fraction value, which makes less crossings as price wiggles past crossing value, so less repainting, it also has HullMA cross added to its thinking.
and also with that one you can set a StopLoss amount, and therefore see a more real performance in the report.
Yes it repaints, they all repaint. which means if you reload the page after price has gone back through decision threshold then it might "repaint" the signals.
refreshing the page will show perhaps signal change.
So, basically, if its wrong, and the page is refreshed, its wrong signal will disappear.
therefore the report showing 93% Percent Profitable is not correct for this strategy. you will get traderage when you follow its signal but it takes it back when its wrong.
fair enough too, i understand the newB traderage when loss happens due to Noobness. I do not recommend following this strategy signals blindly, but it is a great tool.
I am not too worried about repaint, as I made this strategy into an Expert Adviser for MetaTrader4 (automated trading robot). It does great, the actual profit percent is 60 - 70 %
(results: average monthly profit 50% of equity (SETTINGS: position_size=10%, TP=420 SL=33 Trail_SL=20 (pip)))
download it here for free http://ss420fx.blogspot.co.nz (Decision-Threshold EA)