Added Commission and Slippage.
Updated to Version 4 pinescript.
Added option to change Candle crossover timeframe.
Edit to script to reduce repainting (Barmerge.).
Edit to MacD (EMA replaced with HMA)
Removal of TP & SL (still in script if user wants to activate it (remove the //'s)
Indicator drawing script (at bottom of script) is deactivated but ready to use (remove the //'s)
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.
the script is open to see. Either suggest a fix to it, or move on.
I would delete this if i were able too. No one should use this script.
The strategy actually works fine as a MT4 robot, but here on tradingview there is repainting on the chart.
Why dont yall complain to tradingview to make a backtester that doesnt repaint, then i can bring you the win
or just use MT4 robot or API robot
Charting are joke anyway
I only trade with robots, which never paint anything, they simply enter or exit trades, which cannot be repainted
confidence=(security(tickerid, 'D', close)-security(tickerid, 'D', close))/security(tickerid, 'D', close)
confidence=(close-security(tickerid, 'D', close))/security(tickerid, 'D', close)
It's that simple. You were using the close of the current day which can be "seen ahead of time for historical data". What you need to do is use the current close of the day which is basically the close at any time. The previous close values marked with for the previous day are "already locked in".
confidence=(security(tickerid, '480', close)-security(tickerid, 'D', close))/security(tickerid, 'D', close)