TradingView
marco.dillenburg
١١ نيسان أبريل ٢٠١٧ ٠٥:١١
Backtest History Setup 1.0
FWB:SAP
SAP SE O.N.
FWB
الوصف
⋅
١١ نيسان أبريل ٢٠١٧ ٠٥:١١
Script of strategy component to setup the backtext lookback. You setup the maximum days back in the history, which will be used for backtest.
strategy
backtest
components
history
TIME
timeframe
التعليقات
HedgedTrader
⋅
١ آذار مارس ٢٠١٨ ٠٧:١٢
Hi
@marco
.dillenburg Thanks for this! Apologies is this is rookie mistake, but I'm having a problem adding this to built in strategies. Anyway you can help on this sample one? Thanks in advance!
//
@version
=3
strategy("ChannelBreakOutStrategy", overlay=true)
length = input(title="Length", type=integer, minval=1, maxval=1000, defval=5)
upBound = highest(high, length)
downBound = lowest(low, length)
if (not na(close[length]))
strategy.entry("ChBrkLE", strategy.long, stop=upBound + syminfo.mintick, comment="ChBrkLE")
strategy.entry("ChBrkSE", strategy.short, stop=downBound - syminfo.mintick, comment="ChBrkSE")
//plot(strategy.equity, title="equity", color=red, linewidth=2, style=areabr)
المزيد
//@version=3
strategy("ChannelBreakOutStrategy", overlay=true)
length = input(title="Length", type=integer, minval=1, maxval=1000, defval=5)
upBound = highest(high, length)
downBound = lowest(low, length)
if (not na(close[length]))
strategy.entry("ChBrkLE", strategy.long, stop=upBound + syminfo.mintick, comment="ChBrkLE")
strategy.entry("ChBrkSE", strategy.short, stop=downBound - syminfo.mintick, comment="ChBrkSE")
//plot(strategy.equity, title="equity", color=red, linewidth=2, style=areabr)