Thống kê diễn đàn

Bài viết
113,095
Bình luận
808,222
Thành viên
110,406
Thành viên mới nhất
Kiemnhohehe

Thành viên trực tuyến

Không có thành viên nào trực tuyến.

Tìm cơ hội cược BO với Trend line

Tìm cơ hội cược BO với Trend line

Tìm cơ hội cược BO với Trend line
Đồng bộ tín hiệu của con backtest và con alert :D
Mã:
// BO - Woodies Price's Power - Intraday Backtesting
//v11
// © inno14
//@version=4
strategy("BO - Woodies Price's Power - Intraday Backtesting")

// === INPUT PERIOD OF TIME ===
Date   = input(true, title = "=== Date Option ===")
FromDay   = input(defval = 24, title = "From Day", minval = 1, maxval = 31)
FromMonth = input(defval = 4, title = "From Month", minval = 1, maxval = 12)
FromYear  = input(defval = 2020, title = "From Year", minval = 2017)

ToDay     = input(defval = 24, title = "To Day", minval = 1, maxval = 31)
ToMonth   = input(defval = 4, title = "To Month", minval = 1, maxval = 12)
ToYear    = input(defval = 2020, title = "To Year", minval = 2017)

// === DATE RANGE ===
start     = timestamp(FromYear, FromMonth, FromDay, 00, 00)  // backtest start window
finish    = timestamp(ToYear, ToMonth, ToDay, 23, 59)        // backtest finish window
window()  => time >= start and time <= finish ? true : false // create function "within window of time"

// === Trading Time ===
CTimeDvM   = input(true, title = "=== Trading Time ===")
Time_zone = input(7,title="Time Zone")
FromHourDvM   = input(defval = 07, title = "From Hour", minval = 00, maxval = 23)
FromMinuteDvM = input(defval = 00, title = "From Minute", minval = 00, maxval = 59)
ToHourDvM   = input(defval = 16, title = "To Hour", minval = 00, maxval = 23)
ToMinuteDvM = input(defval = 00, title = "To Minute", minval = 00, maxval = 59)

GMT_FHDvM=FromHourDvM<Time_zone?FromHourDvM-Time_zone+24:FromHourDvM-Time_zone
GMT_THDvM=ToHourDvM<Time_zone?ToHourDvM-Time_zone+24:ToHourDvM-Time_zone
fhDvM= (GMT_FHDvM<10?"0"+tostring(GMT_FHDvM):tostring(GMT_FHDvM))
fmDvM= (FromMinuteDvM<10?"0"+tostring(FromMinuteDvM):tostring(FromMinuteDvM))
thDvM= (GMT_THDvM<10?"0"+tostring(GMT_THDvM):tostring(GMT_THDvM))
tmDvM= (ToMinuteDvM<10?"0"+tostring(ToMinuteDvM):tostring(ToMinuteDvM))
WorkingHourDvM = fhDvM+fmDvM+"-"+thDvM+tmDvM
t0_DvM = time(timeframe.period, WorkingHourDvM)
htrtime = input(true,title="Highlight Trading Time")
bgcolor(htrtime? t0_DvM? color.white : na:na, title="Trading Time", transp=0)

//Price's Power
pptt = input(true,title="=== Price's Power ===")
cyclePeriod = input(title="Cycle Period", type=input.integer, minval=1, defval=20)
//hline0=hline(0,linewidth=3,linestyle=hline.style_solid,color=color.new(color.olive,0))
//0.truncate() truncates a given number to a certain number of decimals
truncate(number, decimals) =>
    factor = pow(10, decimals)
    int(number * factor) / factor
//1. EMA
midband=ema(close, cyclePeriod)

//2.Standard Deviation
mlt_std = 1
upper_en_std = midband + stdev(close, cyclePeriod)*mlt_std
lower_en_std = midband - stdev(close, cyclePeriod)*mlt_std

//3.Power
pu=close-upper_en_std
pl=close-lower_en_std
upb=upper_en_std-midband
lob=lower_en_std-midband
bull=pu>=0 and pu[1]>=0?(pu+upb)/upb:0
bear=pl<=0 and pl[1]<=0?-((pl+lob)/lob):0

//5.Label value
pp_sigtext=
       bull>0?" * Bull's Power = "+tostring(truncate(bull,2)):na
       or
       bear<0?" * Bear's Power = "+tostring(truncate(bear,2)):na

//MA
trend_tt=input(true,title="=== Trend Filter ===")
ma_inpt=input(title="WMA", type=input.integer, defval=100)
trend_line=wma(close,ma_inpt)
//Woodies CCI
cci_ft=input(true,title="=== CCI Signal ===")
cciTurboLength = 6
cci14Length = input(title="CCI Length", type=input.integer, defval=14)

source = close
cciTurbo = cci(source, cciTurboLength)
cci14 = cci(source, cci14Length)

last5IsDown = cci14[5] < 0 and cci14[4] < 0 and cci14[3] < 0 and cci14[2] < 0 and cci14[1] < 0
last5IsUp = cci14[5] > 0 and cci14[4] > 0 and cci14[3] > 0 and cci14[2] > 0 and cci14[1] > 0
histogramColor = last5IsUp ? color.green : last5IsDown ? color.red : cci14 < 0 ? color.gray : color.gray

//Plot Woodies CCI
//plot(cci14, title="CCI Histogram", color=histogramColor, style=plot.style_histogram, linewidth=2, transp=40)
//plot(0, title="Zero Line", color=cciTurbo>100?color.blue:cciTurbo<-100?color.red:color.navy, style=plot.style_line, linewidth=6, transp=20)
hline(200, title="Hundred Line", color=color.black, linestyle=hline.style_dotted)
hline(-200, title="Minus Line", color=color.black, linestyle=hline.style_dotted)

//Plot lingreg CCI14
linreg_len=input(4,title="Linear Regression Length")
linreg_cci14=linreg(cci14, linreg_len, 0)
//plot(linreg_cci14, color=color.aqua, linewidth=4)

//
ext_linreg=input(100,title="Extreme Level")

//peak & top
peak_cci=
       linreg_cci14[2]>linreg_cci14[3] and linreg_cci14[1]>linreg_cci14[2] and linreg_cci14[0]<linreg_cci14[1] and linreg_cci14[1]>ext_linreg
bott_cci=
       linreg_cci14[2]<linreg_cci14[3] and linreg_cci14[1]<linreg_cci14[2] and linreg_cci14[0]>linreg_cci14[1] and linreg_cci14[1]<-ext_linreg
peak_cci_1=
       linreg_cci14[2]>linreg_cci14[3] and linreg_cci14[1]>linreg_cci14[2] and linreg_cci14[0]<linreg_cci14[1]
bott_cci_1=
       linreg_cci14[2]<linreg_cci14[3] and linreg_cci14[1]<linreg_cci14[2] and linreg_cci14[0]>linreg_cci14[1]
//
fil_len=input(6,title="Filter Length")
top_ext=highest(linreg_cci14,fil_len)
bot_ext=lowest(linreg_cci14,fil_len)

//Put signal
x1=
       peak_cci
       and linreg_cci14[1]==top_ext
       and linreg_cci14[1]>valuewhen(peak_cci_1,linreg_cci14[1],1)
       and close>low[1]
       and close<trend_line
       and bull==0 and bear==0
      
      

//Call signal
y1=
       bott_cci
       and linreg_cci14[1]==bot_ext
       and linreg_cci14[1]<valuewhen(bott_cci_1,linreg_cci14[1],1)
       and close<high[1]
       and close>trend_line
       and bull==0 and bear==0
      
      

no_orders =
       not strategy.opentrades

//Function
xTech=
       (x1
       and no_orders)
      

yTech=
       (y1
       and no_orders)
      

sumtrades=strategy.losstrades[0]+strategy.wintrades[0]
losstrades=strategy.losstrades[0]
wintrades=strategy.wintrades[0]
//Fibonacci Money Management
fibo_tt=input(true,title="=== Fibonacci Money Management ===")
take_profit=input(300,title="Take profit = wintrades - losstrades =")
//Bid level
current_bid_lv=
       losstrades == 0 and wintrades == 0?1:
       losstrades-wintrades == -1?1:
       losstrades>0 and (losstrades-wintrades == 0)?2:
       losstrades-wintrades == 1?3:
       losstrades-wintrades == 2?5:
       losstrades-wintrades == 3?8:
       losstrades-wintrades == 4?13:
       losstrades-wintrades == 5?21:
       losstrades-wintrades == 6?34:
       1
bid_level=current_bid_lv
take_profit_val = wintrades - losstrades
//Plot Analyzing Signals
//hline1=hline(-1.2*300)
hline2=hline(-1.6*300)
hline0=hline(0)
sigtext=
       xTech?"Put signal"+ " * Current Bid Level: " + tostring(bid_level):yTech?"Call signal"+ " * Current Bid Level: " + tostring(bid_level):
       "Backtesting date: "+tostring(FromDay)+"/"+tostring(FromMonth)+"/"+tostring(FromYear)
       + " * From: "+tostring(FromHourDvM)+":"+tostring(FromMinuteDvM)+" To "+tostring(ToHourDvM)+":"+tostring(ToMinuteDvM)
       + " * Take profit: " + tostring(wintrades-losstrades)+"/"+tostring(take_profit)
       + " * Bid Level: " + tostring(bid_level)
       + " * Linreg Length: " + tostring(linreg_len)
       + pp_sigtext

sig_col=xTech?color.new(color.red,10):yTech?color.new(color.blue,10):color.new(color.navy,10)
label_sig_text = label.new(bar_index[0], -1.5*300, text=sigtext, style=label.style_none, textcolor=sig_col, size=size.large)
label.delete(label_sig_text[1])

//Plot Color Panel of Finobacci Money Management
fib_sigtext=
       "Color Panel of Finobacci Money Management"
      
fib_sig_col=color.new(color.navy,10)
label_fib_sig_text = label.new(bar_index[5], 250, text=fib_sigtext, style=label.style_none, textcolor=fib_sig_col, size=size.large)
label.delete(label_fib_sig_text[1])
fib_put=50
fib_col=-150

fib_put_lv1=color.new(color.red,0)
plotshape(fib_put, title='Put Lv1', text="Put Lv1", style=shape.circle, location=location.absolute, color=fib_put_lv1, textcolor=color.black, offset=-9, size=size.normal, show_last=2)
fib_call_lv1=color.new(color.blue,0)
plotshape(fib_col, title='Call Lv1', text="Call Lv1", style=shape.circle, location=location.absolute, color=fib_call_lv1, textcolor=color.black, offset=-9, size=size.normal, show_last=2)

fib_put_lv2=color.new(color.red,10)
plotshape(fib_put, title='Put Lv2', text="Put Lv2", style=shape.circle, location=location.absolute, color=fib_put_lv2, textcolor=color.black, offset=-8, size=size.normal, show_last=2)
fib_call_lv2=color.new(color.blue,10)
plotshape(fib_col, title='Call Lv2', text="Call Lv2", style=shape.circle, location=location.absolute, color=fib_call_lv2, textcolor=color.black, offset=-8, size=size.normal, show_last=2)

fib_put_lv3=color.new(color.orange,0)
plotshape(fib_put, title='Put Lv3', text="Put Lv3", style=shape.circle, location=location.absolute, color=fib_put_lv3, textcolor=color.black, offset=-7, size=size.normal, show_last=2)
fib_call_lv3=color.new(color.green,0)
plotshape(fib_col, title='Call Lv3', text="Call Lv3", style=shape.circle, location=location.absolute, color=fib_call_lv3, textcolor=color.black, offset=-7, size=size.normal, show_last=2)

fib_put_lv5=color.new(color.orange,10)
plotshape(fib_put, title='Put Lv5', text="Put Lv5", style=shape.circle, location=location.absolute, color=fib_put_lv5, textcolor=color.black, offset=-6, size=size.normal, show_last=2)
fib_call_lv5=color.new(color.green,10)
plotshape(fib_col, title='Call Lv5', text="Call Lv5", style=shape.circle, location=location.absolute, color=fib_call_lv5, textcolor=color.black, offset=-6, size=size.normal, show_last=2)

fib_put_lv8=color.new(color.maroon,0)
plotshape(fib_put, title='Put Lv8', text="Put Lv8", style=shape.circle, location=location.absolute, color=fib_put_lv8, textcolor=color.black, offset=-5, size=size.normal, show_last=2)
fib_call_lv8=color.new(color.lime,0)
plotshape(fib_col, title='Call Lv8', text="Call Lv8", style=shape.circle, location=location.absolute, color=fib_call_lv8, textcolor=color.black, offset=-5, size=size.normal, show_last=2)

fib_put_lv13=color.new(color.maroon,10)
plotshape(fib_put, title='Put Lv13', text="Put Lv13", style=shape.circle, location=location.absolute, color=fib_put_lv13, textcolor=color.black, offset=-4, size=size.normal, show_last=2)
fib_call_lv13=color.new(color.lime,10)
plotshape(fib_col, title='Call Lv13', text="Call Lv13", style=shape.circle, location=location.absolute, color=fib_call_lv13, textcolor=color.black, offset=-4, size=size.normal, show_last=2)

fib_put_lv21=color.new(color.olive,0)
plotshape(fib_put, title='Put Lv21', text="Put Lv21", style=shape.circle, location=location.absolute, color=fib_put_lv21, textcolor=color.black, offset=-3, size=size.normal, show_last=2)
fib_call_lv21=color.new(color.yellow,0)
plotshape(fib_col, title='Call Lv21', text="Call Lv21", style=shape.circle, location=location.absolute, color=fib_call_lv21, textcolor=color.black, offset=-3, size=size.normal, show_last=2)

fib_put_lv34=color.new(color.olive,10)
plotshape(fib_put, title='Put Lv34', text="Put Lv34", style=shape.circle, location=location.absolute, color=fib_put_lv34, textcolor=color.black, offset=-2, size=size.normal, show_last=2)
fib_call_lv34=color.new(color.yellow,10)
plotshape(fib_col, title='Call Lv34', text="Call Lv34", style=shape.circle, location=location.absolute, color=fib_call_lv34, textcolor=color.black, offset=-2, size=size.normal, show_last=2)
//plot Signal
PutSignal= xTech and window() and t0_DvM and take_profit_val<take_profit?-1.2*300:na
CallSignal= yTech and window() and t0_DvM and take_profit_val<take_profit?-1.2*300:na
putcol =
       PutSignal ?
       bid_level==1? color.new(color.red,0):
       bid_level==2? color.new(color.red,10):
       bid_level==3? color.new(color.orange,0):
       bid_level==5? color.new(color.orange,10):
       bid_level==8? color.new(color.maroon,0):
       bid_level==13? color.new(color.maroon,10):
       bid_level==21? color.new(color.olive,0):
       bid_level==34? color.new(color.olive,10):
       color.new(color.red,0): na
callcol =
       CallSignal ?
       bid_level==1? color.new(color.blue,0):
       bid_level==2? color.new(color.blue,10):
       bid_level==3? color.new(color.green,0):
       bid_level==5? color.new(color.green,10):
       bid_level==8? color.new(color.lime,0):
       bid_level==13? color.new(color.lime,10):
       bid_level==21? color.new(color.yellow,0):
       bid_level==34? color.new(color.yellow,10):
       color.new(color.blue,0): na
plotshape(PutSignal, title='Put', text="Put", style=shape.circle, location=location.absolute, color=putcol, textcolor=color.black, offset=1, size=size.large)
plotshape(CallSignal, title='Call', text="Call", style=shape.circle, location=location.absolute, color=callcol, textcolor=color.black, offset=1, size=size.large)

//Backtesting
exp_tt=input(true,"Expiry Option By Bars")
exp_val=input(3,"Number of Bars")
strategy.entry("Call", strategy.long, when=yTech and window() and t0_DvM and take_profit_val<take_profit)
strategy.entry("Put", strategy.short, when=xTech and window() and t0_DvM and take_profit_val<take_profit)
strategy.close_all(when=barssince(xTech)==exp_val or barssince(yTech)==exp_val)
//EOF
 
 
Đồng bộ tín hiệu của con backtest và con alert :D
Mã:
// BO - Woodies Price's Power - Intraday Backtesting
//v11
// © inno14
//@version=4
strategy("BO - Woodies Price's Power - Intraday Backtesting")

// === INPUT PERIOD OF TIME ===
Date   = input(true, title = "=== Date Option ===")
FromDay   = input(defval = 24, title = "From Day", minval = 1, maxval = 31)
FromMonth = input(defval = 4, title = "From Month", minval = 1, maxval = 12)
FromYear  = input(defval = 2020, title = "From Year", minval = 2017)

ToDay     = input(defval = 24, title = "To Day", minval = 1, maxval = 31)
ToMonth   = input(defval = 4, title = "To Month", minval = 1, maxval = 12)
ToYear    = input(defval = 2020, title = "To Year", minval = 2017)

// === DATE RANGE ===
start     = timestamp(FromYear, FromMonth, FromDay, 00, 00)  // backtest start window
finish    = timestamp(ToYear, ToMonth, ToDay, 23, 59)        // backtest finish window
window()  => time >= start and time <= finish ? true : false // create function "within window of time"

// === Trading Time ===
CTimeDvM   = input(true, title = "=== Trading Time ===")
Time_zone = input(7,title="Time Zone")
FromHourDvM   = input(defval = 07, title = "From Hour", minval = 00, maxval = 23)
FromMinuteDvM = input(defval = 00, title = "From Minute", minval = 00, maxval = 59)
ToHourDvM   = input(defval = 16, title = "To Hour", minval = 00, maxval = 23)
ToMinuteDvM = input(defval = 00, title = "To Minute", minval = 00, maxval = 59)

GMT_FHDvM=FromHourDvM<Time_zone?FromHourDvM-Time_zone+24:FromHourDvM-Time_zone
GMT_THDvM=ToHourDvM<Time_zone?ToHourDvM-Time_zone+24:ToHourDvM-Time_zone
fhDvM= (GMT_FHDvM<10?"0"+tostring(GMT_FHDvM):tostring(GMT_FHDvM))
fmDvM= (FromMinuteDvM<10?"0"+tostring(FromMinuteDvM):tostring(FromMinuteDvM))
thDvM= (GMT_THDvM<10?"0"+tostring(GMT_THDvM):tostring(GMT_THDvM))
tmDvM= (ToMinuteDvM<10?"0"+tostring(ToMinuteDvM):tostring(ToMinuteDvM))
WorkingHourDvM = fhDvM+fmDvM+"-"+thDvM+tmDvM
t0_DvM = time(timeframe.period, WorkingHourDvM)
htrtime = input(true,title="Highlight Trading Time")
bgcolor(htrtime? t0_DvM? color.white : na:na, title="Trading Time", transp=0)

//Price's Power
pptt = input(true,title="=== Price's Power ===")
cyclePeriod = input(title="Cycle Period", type=input.integer, minval=1, defval=20)
//hline0=hline(0,linewidth=3,linestyle=hline.style_solid,color=color.new(color.olive,0))
//0.truncate() truncates a given number to a certain number of decimals
truncate(number, decimals) =>
    factor = pow(10, decimals)
    int(number * factor) / factor
//1. EMA
midband=ema(close, cyclePeriod)

//2.Standard Deviation
mlt_std = 1
upper_en_std = midband + stdev(close, cyclePeriod)*mlt_std
lower_en_std = midband - stdev(close, cyclePeriod)*mlt_std

//3.Power
pu=close-upper_en_std
pl=close-lower_en_std
upb=upper_en_std-midband
lob=lower_en_std-midband
bull=pu>=0 and pu[1]>=0?(pu+upb)/upb:0
bear=pl<=0 and pl[1]<=0?-((pl+lob)/lob):0

//5.Label value
pp_sigtext=
       bull>0?" * Bull's Power = "+tostring(truncate(bull,2)):na
       or
       bear<0?" * Bear's Power = "+tostring(truncate(bear,2)):na

//MA
trend_tt=input(true,title="=== Trend Filter ===")
ma_inpt=input(title="WMA", type=input.integer, defval=100)
trend_line=wma(close,ma_inpt)
//Woodies CCI
cci_ft=input(true,title="=== CCI Signal ===")
cciTurboLength = 6
cci14Length = input(title="CCI Length", type=input.integer, defval=14)

source = close
cciTurbo = cci(source, cciTurboLength)
cci14 = cci(source, cci14Length)

last5IsDown = cci14[5] < 0 and cci14[4] < 0 and cci14[3] < 0 and cci14[2] < 0 and cci14[1] < 0
last5IsUp = cci14[5] > 0 and cci14[4] > 0 and cci14[3] > 0 and cci14[2] > 0 and cci14[1] > 0
histogramColor = last5IsUp ? color.green : last5IsDown ? color.red : cci14 < 0 ? color.gray : color.gray

//Plot Woodies CCI
//plot(cci14, title="CCI Histogram", color=histogramColor, style=plot.style_histogram, linewidth=2, transp=40)
//plot(0, title="Zero Line", color=cciTurbo>100?color.blue:cciTurbo<-100?color.red:color.navy, style=plot.style_line, linewidth=6, transp=20)
hline(200, title="Hundred Line", color=color.black, linestyle=hline.style_dotted)
hline(-200, title="Minus Line", color=color.black, linestyle=hline.style_dotted)

//Plot lingreg CCI14
linreg_len=input(4,title="Linear Regression Length")
linreg_cci14=linreg(cci14, linreg_len, 0)
//plot(linreg_cci14, color=color.aqua, linewidth=4)

//
ext_linreg=input(100,title="Extreme Level")

//peak & top
peak_cci=
       linreg_cci14[2]>linreg_cci14[3] and linreg_cci14[1]>linreg_cci14[2] and linreg_cci14[0]<linreg_cci14[1] and linreg_cci14[1]>ext_linreg
bott_cci=
       linreg_cci14[2]<linreg_cci14[3] and linreg_cci14[1]<linreg_cci14[2] and linreg_cci14[0]>linreg_cci14[1] and linreg_cci14[1]<-ext_linreg
peak_cci_1=
       linreg_cci14[2]>linreg_cci14[3] and linreg_cci14[1]>linreg_cci14[2] and linreg_cci14[0]<linreg_cci14[1]
bott_cci_1=
       linreg_cci14[2]<linreg_cci14[3] and linreg_cci14[1]<linreg_cci14[2] and linreg_cci14[0]>linreg_cci14[1]
//
fil_len=input(6,title="Filter Length")
top_ext=highest(linreg_cci14,fil_len)
bot_ext=lowest(linreg_cci14,fil_len)

//Put signal
x1=
       peak_cci
       and linreg_cci14[1]==top_ext
       and linreg_cci14[1]>valuewhen(peak_cci_1,linreg_cci14[1],1)
       and close>low[1]
       and close<trend_line
       and bull==0 and bear==0
     
     

//Call signal
y1=
       bott_cci
       and linreg_cci14[1]==bot_ext
       and linreg_cci14[1]<valuewhen(bott_cci_1,linreg_cci14[1],1)
       and close<high[1]
       and close>trend_line
       and bull==0 and bear==0
     
     

no_orders =
       not strategy.opentrades

//Function
xTech=
       (x1
       and no_orders)
     

yTech=
       (y1
       and no_orders)
     

sumtrades=strategy.losstrades[0]+strategy.wintrades[0]
losstrades=strategy.losstrades[0]
wintrades=strategy.wintrades[0]
//Fibonacci Money Management
fibo_tt=input(true,title="=== Fibonacci Money Management ===")
take_profit=input(300,title="Take profit = wintrades - losstrades =")
//Bid level
current_bid_lv=
       losstrades == 0 and wintrades == 0?1:
       losstrades-wintrades == -1?1:
       losstrades>0 and (losstrades-wintrades == 0)?2:
       losstrades-wintrades == 1?3:
       losstrades-wintrades == 2?5:
       losstrades-wintrades == 3?8:
       losstrades-wintrades == 4?13:
       losstrades-wintrades == 5?21:
       losstrades-wintrades == 6?34:
       1
bid_level=current_bid_lv
take_profit_val = wintrades - losstrades
//Plot Analyzing Signals
//hline1=hline(-1.2*300)
hline2=hline(-1.6*300)
hline0=hline(0)
sigtext=
       xTech?"Put signal"+ " * Current Bid Level: " + tostring(bid_level):yTech?"Call signal"+ " * Current Bid Level: " + tostring(bid_level):
       "Backtesting date: "+tostring(FromDay)+"/"+tostring(FromMonth)+"/"+tostring(FromYear)
       + " * From: "+tostring(FromHourDvM)+":"+tostring(FromMinuteDvM)+" To "+tostring(ToHourDvM)+":"+tostring(ToMinuteDvM)
       + " * Take profit: " + tostring(wintrades-losstrades)+"/"+tostring(take_profit)
       + " * Bid Level: " + tostring(bid_level)
       + " * Linreg Length: " + tostring(linreg_len)
       + pp_sigtext

sig_col=xTech?color.new(color.red,10):yTech?color.new(color.blue,10):color.new(color.navy,10)
label_sig_text = label.new(bar_index[0], -1.5*300, text=sigtext, style=label.style_none, textcolor=sig_col, size=size.large)
label.delete(label_sig_text[1])

//Plot Color Panel of Finobacci Money Management
fib_sigtext=
       "Color Panel of Finobacci Money Management"
     
fib_sig_col=color.new(color.navy,10)
label_fib_sig_text = label.new(bar_index[5], 250, text=fib_sigtext, style=label.style_none, textcolor=fib_sig_col, size=size.large)
label.delete(label_fib_sig_text[1])
fib_put=50
fib_col=-150

fib_put_lv1=color.new(color.red,0)
plotshape(fib_put, title='Put Lv1', text="Put Lv1", style=shape.circle, location=location.absolute, color=fib_put_lv1, textcolor=color.black, offset=-9, size=size.normal, show_last=2)
fib_call_lv1=color.new(color.blue,0)
plotshape(fib_col, title='Call Lv1', text="Call Lv1", style=shape.circle, location=location.absolute, color=fib_call_lv1, textcolor=color.black, offset=-9, size=size.normal, show_last=2)

fib_put_lv2=color.new(color.red,10)
plotshape(fib_put, title='Put Lv2', text="Put Lv2", style=shape.circle, location=location.absolute, color=fib_put_lv2, textcolor=color.black, offset=-8, size=size.normal, show_last=2)
fib_call_lv2=color.new(color.blue,10)
plotshape(fib_col, title='Call Lv2', text="Call Lv2", style=shape.circle, location=location.absolute, color=fib_call_lv2, textcolor=color.black, offset=-8, size=size.normal, show_last=2)

fib_put_lv3=color.new(color.orange,0)
plotshape(fib_put, title='Put Lv3', text="Put Lv3", style=shape.circle, location=location.absolute, color=fib_put_lv3, textcolor=color.black, offset=-7, size=size.normal, show_last=2)
fib_call_lv3=color.new(color.green,0)
plotshape(fib_col, title='Call Lv3', text="Call Lv3", style=shape.circle, location=location.absolute, color=fib_call_lv3, textcolor=color.black, offset=-7, size=size.normal, show_last=2)

fib_put_lv5=color.new(color.orange,10)
plotshape(fib_put, title='Put Lv5', text="Put Lv5", style=shape.circle, location=location.absolute, color=fib_put_lv5, textcolor=color.black, offset=-6, size=size.normal, show_last=2)
fib_call_lv5=color.new(color.green,10)
plotshape(fib_col, title='Call Lv5', text="Call Lv5", style=shape.circle, location=location.absolute, color=fib_call_lv5, textcolor=color.black, offset=-6, size=size.normal, show_last=2)

fib_put_lv8=color.new(color.maroon,0)
plotshape(fib_put, title='Put Lv8', text="Put Lv8", style=shape.circle, location=location.absolute, color=fib_put_lv8, textcolor=color.black, offset=-5, size=size.normal, show_last=2)
fib_call_lv8=color.new(color.lime,0)
plotshape(fib_col, title='Call Lv8', text="Call Lv8", style=shape.circle, location=location.absolute, color=fib_call_lv8, textcolor=color.black, offset=-5, size=size.normal, show_last=2)

fib_put_lv13=color.new(color.maroon,10)
plotshape(fib_put, title='Put Lv13', text="Put Lv13", style=shape.circle, location=location.absolute, color=fib_put_lv13, textcolor=color.black, offset=-4, size=size.normal, show_last=2)
fib_call_lv13=color.new(color.lime,10)
plotshape(fib_col, title='Call Lv13', text="Call Lv13", style=shape.circle, location=location.absolute, color=fib_call_lv13, textcolor=color.black, offset=-4, size=size.normal, show_last=2)

fib_put_lv21=color.new(color.olive,0)
plotshape(fib_put, title='Put Lv21', text="Put Lv21", style=shape.circle, location=location.absolute, color=fib_put_lv21, textcolor=color.black, offset=-3, size=size.normal, show_last=2)
fib_call_lv21=color.new(color.yellow,0)
plotshape(fib_col, title='Call Lv21', text="Call Lv21", style=shape.circle, location=location.absolute, color=fib_call_lv21, textcolor=color.black, offset=-3, size=size.normal, show_last=2)

fib_put_lv34=color.new(color.olive,10)
plotshape(fib_put, title='Put Lv34', text="Put Lv34", style=shape.circle, location=location.absolute, color=fib_put_lv34, textcolor=color.black, offset=-2, size=size.normal, show_last=2)
fib_call_lv34=color.new(color.yellow,10)
plotshape(fib_col, title='Call Lv34', text="Call Lv34", style=shape.circle, location=location.absolute, color=fib_call_lv34, textcolor=color.black, offset=-2, size=size.normal, show_last=2)
//plot Signal
PutSignal= xTech and window() and t0_DvM and take_profit_val<take_profit?-1.2*300:na
CallSignal= yTech and window() and t0_DvM and take_profit_val<take_profit?-1.2*300:na
putcol =
       PutSignal ?
       bid_level==1? color.new(color.red,0):
       bid_level==2? color.new(color.red,10):
       bid_level==3? color.new(color.orange,0):
       bid_level==5? color.new(color.orange,10):
       bid_level==8? color.new(color.maroon,0):
       bid_level==13? color.new(color.maroon,10):
       bid_level==21? color.new(color.olive,0):
       bid_level==34? color.new(color.olive,10):
       color.new(color.red,0): na
callcol =
       CallSignal ?
       bid_level==1? color.new(color.blue,0):
       bid_level==2? color.new(color.blue,10):
       bid_level==3? color.new(color.green,0):
       bid_level==5? color.new(color.green,10):
       bid_level==8? color.new(color.lime,0):
       bid_level==13? color.new(color.lime,10):
       bid_level==21? color.new(color.yellow,0):
       bid_level==34? color.new(color.yellow,10):
       color.new(color.blue,0): na
plotshape(PutSignal, title='Put', text="Put", style=shape.circle, location=location.absolute, color=putcol, textcolor=color.black, offset=1, size=size.large)
plotshape(CallSignal, title='Call', text="Call", style=shape.circle, location=location.absolute, color=callcol, textcolor=color.black, offset=1, size=size.large)

//Backtesting
exp_tt=input(true,"Expiry Option By Bars")
exp_val=input(3,"Number of Bars")
strategy.entry("Call", strategy.long, when=yTech and window() and t0_DvM and take_profit_val<take_profit)
strategy.entry("Put", strategy.short, when=xTech and window() and t0_DvM and take_profit_val<take_profit)
strategy.close_all(when=barssince(xTech)==exp_val or barssince(yTech)==exp_val)
//EOF
thanks bác nha keke demo them 1 tuần rồi chiến tiếp với bác
 
 
Đồng bộ tín hiệu của con backtest và con alert :D
Mã:
// BO - Woodies Price's Power - Intraday Backtesting
//v11
// © inno14
//@version=4
strategy("BO - Woodies Price's Power - Intraday Backtesting")

// === INPUT PERIOD OF TIME ===
Date   = input(true, title = "=== Date Option ===")
FromDay   = input(defval = 24, title = "From Day", minval = 1, maxval = 31)
FromMonth = input(defval = 4, title = "From Month", minval = 1, maxval = 12)
FromYear  = input(defval = 2020, title = "From Year", minval = 2017)

ToDay     = input(defval = 24, title = "To Day", minval = 1, maxval = 31)
ToMonth   = input(defval = 4, title = "To Month", minval = 1, maxval = 12)
ToYear    = input(defval = 2020, title = "To Year", minval = 2017)

// === DATE RANGE ===
start     = timestamp(FromYear, FromMonth, FromDay, 00, 00)  // backtest start window
finish    = timestamp(ToYear, ToMonth, ToDay, 23, 59)        // backtest finish window
window()  => time >= start and time <= finish ? true : false // create function "within window of time"

// === Trading Time ===
CTimeDvM   = input(true, title = "=== Trading Time ===")
Time_zone = input(7,title="Time Zone")
FromHourDvM   = input(defval = 07, title = "From Hour", minval = 00, maxval = 23)
FromMinuteDvM = input(defval = 00, title = "From Minute", minval = 00, maxval = 59)
ToHourDvM   = input(defval = 16, title = "To Hour", minval = 00, maxval = 23)
ToMinuteDvM = input(defval = 00, title = "To Minute", minval = 00, maxval = 59)

GMT_FHDvM=FromHourDvM<Time_zone?FromHourDvM-Time_zone+24:FromHourDvM-Time_zone
GMT_THDvM=ToHourDvM<Time_zone?ToHourDvM-Time_zone+24:ToHourDvM-Time_zone
fhDvM= (GMT_FHDvM<10?"0"+tostring(GMT_FHDvM):tostring(GMT_FHDvM))
fmDvM= (FromMinuteDvM<10?"0"+tostring(FromMinuteDvM):tostring(FromMinuteDvM))
thDvM= (GMT_THDvM<10?"0"+tostring(GMT_THDvM):tostring(GMT_THDvM))
tmDvM= (ToMinuteDvM<10?"0"+tostring(ToMinuteDvM):tostring(ToMinuteDvM))
WorkingHourDvM = fhDvM+fmDvM+"-"+thDvM+tmDvM
t0_DvM = time(timeframe.period, WorkingHourDvM)
htrtime = input(true,title="Highlight Trading Time")
bgcolor(htrtime? t0_DvM? color.white : na:na, title="Trading Time", transp=0)

//Price's Power
pptt = input(true,title="=== Price's Power ===")
cyclePeriod = input(title="Cycle Period", type=input.integer, minval=1, defval=20)
//hline0=hline(0,linewidth=3,linestyle=hline.style_solid,color=color.new(color.olive,0))
//0.truncate() truncates a given number to a certain number of decimals
truncate(number, decimals) =>
    factor = pow(10, decimals)
    int(number * factor) / factor
//1. EMA
midband=ema(close, cyclePeriod)

//2.Standard Deviation
mlt_std = 1
upper_en_std = midband + stdev(close, cyclePeriod)*mlt_std
lower_en_std = midband - stdev(close, cyclePeriod)*mlt_std

//3.Power
pu=close-upper_en_std
pl=close-lower_en_std
upb=upper_en_std-midband
lob=lower_en_std-midband
bull=pu>=0 and pu[1]>=0?(pu+upb)/upb:0
bear=pl<=0 and pl[1]<=0?-((pl+lob)/lob):0

//5.Label value
pp_sigtext=
       bull>0?" * Bull's Power = "+tostring(truncate(bull,2)):na
       or
       bear<0?" * Bear's Power = "+tostring(truncate(bear,2)):na

//MA
trend_tt=input(true,title="=== Trend Filter ===")
ma_inpt=input(title="WMA", type=input.integer, defval=100)
trend_line=wma(close,ma_inpt)
//Woodies CCI
cci_ft=input(true,title="=== CCI Signal ===")
cciTurboLength = 6
cci14Length = input(title="CCI Length", type=input.integer, defval=14)

source = close
cciTurbo = cci(source, cciTurboLength)
cci14 = cci(source, cci14Length)

last5IsDown = cci14[5] < 0 and cci14[4] < 0 and cci14[3] < 0 and cci14[2] < 0 and cci14[1] < 0
last5IsUp = cci14[5] > 0 and cci14[4] > 0 and cci14[3] > 0 and cci14[2] > 0 and cci14[1] > 0
histogramColor = last5IsUp ? color.green : last5IsDown ? color.red : cci14 < 0 ? color.gray : color.gray

//Plot Woodies CCI
//plot(cci14, title="CCI Histogram", color=histogramColor, style=plot.style_histogram, linewidth=2, transp=40)
//plot(0, title="Zero Line", color=cciTurbo>100?color.blue:cciTurbo<-100?color.red:color.navy, style=plot.style_line, linewidth=6, transp=20)
hline(200, title="Hundred Line", color=color.black, linestyle=hline.style_dotted)
hline(-200, title="Minus Line", color=color.black, linestyle=hline.style_dotted)

//Plot lingreg CCI14
linreg_len=input(4,title="Linear Regression Length")
linreg_cci14=linreg(cci14, linreg_len, 0)
//plot(linreg_cci14, color=color.aqua, linewidth=4)

//
ext_linreg=input(100,title="Extreme Level")

//peak & top
peak_cci=
       linreg_cci14[2]>linreg_cci14[3] and linreg_cci14[1]>linreg_cci14[2] and linreg_cci14[0]<linreg_cci14[1] and linreg_cci14[1]>ext_linreg
bott_cci=
       linreg_cci14[2]<linreg_cci14[3] and linreg_cci14[1]<linreg_cci14[2] and linreg_cci14[0]>linreg_cci14[1] and linreg_cci14[1]<-ext_linreg
peak_cci_1=
       linreg_cci14[2]>linreg_cci14[3] and linreg_cci14[1]>linreg_cci14[2] and linreg_cci14[0]<linreg_cci14[1]
bott_cci_1=
       linreg_cci14[2]<linreg_cci14[3] and linreg_cci14[1]<linreg_cci14[2] and linreg_cci14[0]>linreg_cci14[1]
//
fil_len=input(6,title="Filter Length")
top_ext=highest(linreg_cci14,fil_len)
bot_ext=lowest(linreg_cci14,fil_len)

//Put signal
x1=
       peak_cci
       and linreg_cci14[1]==top_ext
       and linreg_cci14[1]>valuewhen(peak_cci_1,linreg_cci14[1],1)
       and close>low[1]
       and close<trend_line
       and bull==0 and bear==0
     
     

//Call signal
y1=
       bott_cci
       and linreg_cci14[1]==bot_ext
       and linreg_cci14[1]<valuewhen(bott_cci_1,linreg_cci14[1],1)
       and close<high[1]
       and close>trend_line
       and bull==0 and bear==0
     
     

no_orders =
       not strategy.opentrades

//Function
xTech=
       (x1
       and no_orders)
     

yTech=
       (y1
       and no_orders)
     

sumtrades=strategy.losstrades[0]+strategy.wintrades[0]
losstrades=strategy.losstrades[0]
wintrades=strategy.wintrades[0]
//Fibonacci Money Management
fibo_tt=input(true,title="=== Fibonacci Money Management ===")
take_profit=input(300,title="Take profit = wintrades - losstrades =")
//Bid level
current_bid_lv=
       losstrades == 0 and wintrades == 0?1:
       losstrades-wintrades == -1?1:
       losstrades>0 and (losstrades-wintrades == 0)?2:
       losstrades-wintrades == 1?3:
       losstrades-wintrades == 2?5:
       losstrades-wintrades == 3?8:
       losstrades-wintrades == 4?13:
       losstrades-wintrades == 5?21:
       losstrades-wintrades == 6?34:
       1
bid_level=current_bid_lv
take_profit_val = wintrades - losstrades
//Plot Analyzing Signals
//hline1=hline(-1.2*300)
hline2=hline(-1.6*300)
hline0=hline(0)
sigtext=
       xTech?"Put signal"+ " * Current Bid Level: " + tostring(bid_level):yTech?"Call signal"+ " * Current Bid Level: " + tostring(bid_level):
       "Backtesting date: "+tostring(FromDay)+"/"+tostring(FromMonth)+"/"+tostring(FromYear)
       + " * From: "+tostring(FromHourDvM)+":"+tostring(FromMinuteDvM)+" To "+tostring(ToHourDvM)+":"+tostring(ToMinuteDvM)
       + " * Take profit: " + tostring(wintrades-losstrades)+"/"+tostring(take_profit)
       + " * Bid Level: " + tostring(bid_level)
       + " * Linreg Length: " + tostring(linreg_len)
       + pp_sigtext

sig_col=xTech?color.new(color.red,10):yTech?color.new(color.blue,10):color.new(color.navy,10)
label_sig_text = label.new(bar_index[0], -1.5*300, text=sigtext, style=label.style_none, textcolor=sig_col, size=size.large)
label.delete(label_sig_text[1])

//Plot Color Panel of Finobacci Money Management
fib_sigtext=
       "Color Panel of Finobacci Money Management"
     
fib_sig_col=color.new(color.navy,10)
label_fib_sig_text = label.new(bar_index[5], 250, text=fib_sigtext, style=label.style_none, textcolor=fib_sig_col, size=size.large)
label.delete(label_fib_sig_text[1])
fib_put=50
fib_col=-150

fib_put_lv1=color.new(color.red,0)
plotshape(fib_put, title='Put Lv1', text="Put Lv1", style=shape.circle, location=location.absolute, color=fib_put_lv1, textcolor=color.black, offset=-9, size=size.normal, show_last=2)
fib_call_lv1=color.new(color.blue,0)
plotshape(fib_col, title='Call Lv1', text="Call Lv1", style=shape.circle, location=location.absolute, color=fib_call_lv1, textcolor=color.black, offset=-9, size=size.normal, show_last=2)

fib_put_lv2=color.new(color.red,10)
plotshape(fib_put, title='Put Lv2', text="Put Lv2", style=shape.circle, location=location.absolute, color=fib_put_lv2, textcolor=color.black, offset=-8, size=size.normal, show_last=2)
fib_call_lv2=color.new(color.blue,10)
plotshape(fib_col, title='Call Lv2', text="Call Lv2", style=shape.circle, location=location.absolute, color=fib_call_lv2, textcolor=color.black, offset=-8, size=size.normal, show_last=2)

fib_put_lv3=color.new(color.orange,0)
plotshape(fib_put, title='Put Lv3', text="Put Lv3", style=shape.circle, location=location.absolute, color=fib_put_lv3, textcolor=color.black, offset=-7, size=size.normal, show_last=2)
fib_call_lv3=color.new(color.green,0)
plotshape(fib_col, title='Call Lv3', text="Call Lv3", style=shape.circle, location=location.absolute, color=fib_call_lv3, textcolor=color.black, offset=-7, size=size.normal, show_last=2)

fib_put_lv5=color.new(color.orange,10)
plotshape(fib_put, title='Put Lv5', text="Put Lv5", style=shape.circle, location=location.absolute, color=fib_put_lv5, textcolor=color.black, offset=-6, size=size.normal, show_last=2)
fib_call_lv5=color.new(color.green,10)
plotshape(fib_col, title='Call Lv5', text="Call Lv5", style=shape.circle, location=location.absolute, color=fib_call_lv5, textcolor=color.black, offset=-6, size=size.normal, show_last=2)

fib_put_lv8=color.new(color.maroon,0)
plotshape(fib_put, title='Put Lv8', text="Put Lv8", style=shape.circle, location=location.absolute, color=fib_put_lv8, textcolor=color.black, offset=-5, size=size.normal, show_last=2)
fib_call_lv8=color.new(color.lime,0)
plotshape(fib_col, title='Call Lv8', text="Call Lv8", style=shape.circle, location=location.absolute, color=fib_call_lv8, textcolor=color.black, offset=-5, size=size.normal, show_last=2)

fib_put_lv13=color.new(color.maroon,10)
plotshape(fib_put, title='Put Lv13', text="Put Lv13", style=shape.circle, location=location.absolute, color=fib_put_lv13, textcolor=color.black, offset=-4, size=size.normal, show_last=2)
fib_call_lv13=color.new(color.lime,10)
plotshape(fib_col, title='Call Lv13', text="Call Lv13", style=shape.circle, location=location.absolute, color=fib_call_lv13, textcolor=color.black, offset=-4, size=size.normal, show_last=2)

fib_put_lv21=color.new(color.olive,0)
plotshape(fib_put, title='Put Lv21', text="Put Lv21", style=shape.circle, location=location.absolute, color=fib_put_lv21, textcolor=color.black, offset=-3, size=size.normal, show_last=2)
fib_call_lv21=color.new(color.yellow,0)
plotshape(fib_col, title='Call Lv21', text="Call Lv21", style=shape.circle, location=location.absolute, color=fib_call_lv21, textcolor=color.black, offset=-3, size=size.normal, show_last=2)

fib_put_lv34=color.new(color.olive,10)
plotshape(fib_put, title='Put Lv34', text="Put Lv34", style=shape.circle, location=location.absolute, color=fib_put_lv34, textcolor=color.black, offset=-2, size=size.normal, show_last=2)
fib_call_lv34=color.new(color.yellow,10)
plotshape(fib_col, title='Call Lv34', text="Call Lv34", style=shape.circle, location=location.absolute, color=fib_call_lv34, textcolor=color.black, offset=-2, size=size.normal, show_last=2)
//plot Signal
PutSignal= xTech and window() and t0_DvM and take_profit_val<take_profit?-1.2*300:na
CallSignal= yTech and window() and t0_DvM and take_profit_val<take_profit?-1.2*300:na
putcol =
       PutSignal ?
       bid_level==1? color.new(color.red,0):
       bid_level==2? color.new(color.red,10):
       bid_level==3? color.new(color.orange,0):
       bid_level==5? color.new(color.orange,10):
       bid_level==8? color.new(color.maroon,0):
       bid_level==13? color.new(color.maroon,10):
       bid_level==21? color.new(color.olive,0):
       bid_level==34? color.new(color.olive,10):
       color.new(color.red,0): na
callcol =
       CallSignal ?
       bid_level==1? color.new(color.blue,0):
       bid_level==2? color.new(color.blue,10):
       bid_level==3? color.new(color.green,0):
       bid_level==5? color.new(color.green,10):
       bid_level==8? color.new(color.lime,0):
       bid_level==13? color.new(color.lime,10):
       bid_level==21? color.new(color.yellow,0):
       bid_level==34? color.new(color.yellow,10):
       color.new(color.blue,0): na
plotshape(PutSignal, title='Put', text="Put", style=shape.circle, location=location.absolute, color=putcol, textcolor=color.black, offset=1, size=size.large)
plotshape(CallSignal, title='Call', text="Call", style=shape.circle, location=location.absolute, color=callcol, textcolor=color.black, offset=1, size=size.large)

//Backtesting
exp_tt=input(true,"Expiry Option By Bars")
exp_val=input(3,"Number of Bars")
strategy.entry("Call", strategy.long, when=yTech and window() and t0_DvM and take_profit_val<take_profit)
strategy.entry("Put", strategy.short, when=xTech and window() and t0_DvM and take_profit_val<take_profit)
strategy.close_all(when=barssince(xTech)==exp_val or barssince(yTech)==exp_val)
//EOF
ơ sao it hẳn lệnh đi z bác mà cung k cài alert cho con này dk
 
 
Để mình gom lại chung 1 post cho dễ nha, cái này là con nhiều lệnh :D
1. Code Alert
Mã:
//BO - CCI Combo with  alert
//© inno14
//@version=4

study("BO - CCI Combo with  alert", overlay=true)

pp_tt=input(true,title="=== Price's Power ===")
pp_cyclePeriod = input(title="Cycle Period", type=input.integer, minval=1, defval=20)
//1. EMA
pp_midband=ema(close, pp_cyclePeriod)

//2.Standard Deviation
pp_mlt_std = 1
pp_upper_en_std = pp_midband + stdev(close, pp_cyclePeriod)*pp_mlt_std
pp_lower_en_std = pp_midband - stdev(close, pp_cyclePeriod)*pp_mlt_std

//3.Power
pu=close-pp_upper_en_std
pl=close-pp_lower_en_std
upb=pp_upper_en_std-pp_midband
lob=pp_lower_en_std-pp_midband
bull=pu>=0 and pu[1]>=0?(pu+upb)/upb:0
bear=pl<=0 and pl[1]<=0?-((pl+lob)/lob):0

//CCI
cci_tt=input(true,title="=== CCI Signal ===")
cciLength = input(title="CCI  Length", type=input.integer, defval=14, minval=1, maxval=2000)
cci = cci(close, cciLength)

//Linear Regression of CCI
linreg_len=input(4,title="Linear Regression Length")
linreg_cci=linreg(cci, linreg_len, 0)

//Extreme Level
ext_linreg=input(100,title="Extreme Level")

//peak & top
peak_cci=
       linreg_cci[2]>linreg_cci[3] and linreg_cci[1]>linreg_cci[2] and linreg_cci[0]<linreg_cci[1] and linreg_cci[1]>ext_linreg
bott_cci=
       linreg_cci[2]<linreg_cci[3] and linreg_cci[1]<linreg_cci[2] and linreg_cci[0]>linreg_cci[1] and linreg_cci[1]<-ext_linreg
peak_cci_1=
       linreg_cci[2]>linreg_cci[3] and linreg_cci[1]>linreg_cci[2] and linreg_cci[0]<linreg_cci[1]
bott_cci_1=
       linreg_cci[2]<linreg_cci[3] and linreg_cci[1]<linreg_cci[2] and linreg_cci[0]>linreg_cci[1]

//
fil_len=input(6,title="Filter Length")
top_ext=highest(linreg_cci,fil_len)
bot_ext=lowest(linreg_cci,fil_len)
choppy_zone = bull==0 and bear==0
//Put signal
x1=
       peak_cci
       and linreg_cci[1]==top_ext
       //and linreg_cci[1]>valuewhen(peak_cci_1,linreg_cci[1],1)
       //and close>low[1]
       and choppy_zone
      
      
      

//Call signal
y1=
       bott_cci
       and linreg_cci[1]==bot_ext
       //and linreg_cci[1]<valuewhen(bott_cci_1,linreg_cci[1],1)
       //and close<high[1]
       and choppy_zone
      
      

//Apply Trend Line Filter
basis_opt=input(true,title="=== Apply Trend Line Filter ===")
cyclePeriod = input(title="Trend Line Period", type=input.integer, minval=1, defval=100)
src = input(title="Source", type=input.source, defval=close)
type_inpt = input(title="Trend Line's Type", options=["Gaussian Filter","SMA","EMA","TEMA","WMA","VWMA","DONCHIAN","HULL MA","ALMA"],defval="WMA")

//Trend Line's Type
//1. Gaussian Filter script by Alex Orekhov (everget)
PI = 2 * asin(1)
beta = (1 - cos(2 * PI / cyclePeriod)) / (pow(2, 1 / 4.0) - 1)
alpha = -beta + sqrt(pow(beta, 2) + 2 * beta)
getGF() =>
    filter = 0.0
    filter := pow(alpha, 4) * src + 4 * (1 - alpha) * nz(filter[1]) -
       6 * pow(1 - alpha, 2) * nz(filter[2]) + 4 * pow(1 - alpha, 3) * nz(filter[3]) -
       pow(1 - alpha, 4) * nz(filter[4])
    filter
    filter
gf = getGF()
mid_gf=gf

//2. SMA
mid_SMA=sma(src, cyclePeriod)

//3. EMA
mid_EMA=ema(src, cyclePeriod)

//4. TEMA
tema(src,cyclePeriod) => (3*ema(src,cyclePeriod))-(3*ema(ema(src,cyclePeriod),cyclePeriod))+ema(ema(ema(src,cyclePeriod),cyclePeriod),cyclePeriod)
mid_tema=tema(src,cyclePeriod)

//5. WMA
mid_wma=wma(close, cyclePeriod)

//6. VWMA
mid_vwma=vwma(close, cyclePeriod)

//7. DONCHIAN
donchian(cyclePeriod) => avg(lowest(cyclePeriod), highest(cyclePeriod))
mid_donchian = donchian(cyclePeriod)

//8. Hull
mid_hull=hma(src,cyclePeriod)

//9. ALMA
mid_alma=alma(src,cyclePeriod,0.15,6)

//Bands_col
mid_col=color.new(color.aqua,20)
up_col=color.new(color.aqua,20)
low_col=color.new(color.aqua,20)
fill_col=color.new(color.aqua,90)
//Plot Trend Line
midband=
       type_inpt=="Gaussian Filter"?mid_gf:
       type_inpt=="SMA"?mid_SMA:
       type_inpt=="EMA"?mid_EMA:
       type_inpt=="TEMA"?mid_tema:
       type_inpt=="WMA"?mid_wma:
       type_inpt=="VWMA"?mid_vwma:
       type_inpt=="DONCHIAN"?mid_donchian:
       type_inpt=="HULL MA"?mid_hull:
       type_inpt=="ALMA"?mid_alma:
       mid_gf
plot(basis_opt?midband:na, title="Mid Line", linewidth=2, color=mid_col, transp=0)

no_orders =
       not x1[1]
       and not x1[2]
       and not x1[3]
       and not y1[1]
       and not y1[2]
       and not y1[3]

//Function
xTech=
       basis_opt?
       x1
       and close<midband
       and no_orders:
       x1
       and no_orders
      
    

yTech=
       basis_opt?
       y1
       and close>midband
       and no_orders:
       y1
       and no_orders
      

//plot Signal
putcol = xTech? color.red : na
callcol = yTech? color.blue : na
PutSignal= xTech?high:na
CallSignal= yTech?low:na
plotshape(PutSignal, title='Put Alert', text="Put Alert", style=shape.labeldown, location=location.absolute, color=color.yellow, textcolor=color.new(color.black,0), offset=0, transp=5, size=size.tiny)
plotshape(CallSignal, title='Call Alert', text="Call Alert", style=shape.labelup, location=location.absolute, color=color.yellow, textcolor=color.new(color.black,0), offset=0, transp=5, size=size.tiny)
plotshape(PutSignal, title='Put Entry', text="Put 3 bars", style=shape.arrowdown, location=location.abovebar, color=color.yellow, textcolor=color.aqua, offset=1, transp=5, size=size.large)
plotshape(CallSignal, title='Call Entry', text="Call 3 bars", style=shape.arrowup, location=location.belowbar, color=color.yellow, textcolor=color.aqua, offset=1, transp=5, size=size.large)

//plot Result
result_put =
       xTech[3] and close<open[2]?1:
       xTech[3] and close>open[2]?-1:
       xTech[3] and close>open[2]?0:
       na
result_call =
       yTech[3] and close>open[2]?1:
       yTech[3] and close<open[2]?-1:
       yTech[3] and close<open[2]?0:
       na

win_trade =
       result_put == 1
       or
       result_call == 1
       ?close:na
loss_trade =
       result_put == -1
       or
       result_call == -1
       ?close:na
draw_trade =
       result_put == 0
       or
       result_call == 0
       ?close:na
plotshape(win_trade, title='Win trade', text="Win trade", style=shape.labeldown, location=location.abovebar, color=color.yellow, textcolor=color.new(color.black,0), offset=0, transp=5, size=size.tiny)
plotshape(loss_trade, title='Loss trade', text="Loss trade", style=shape.labeldown, location=location.abovebar, color=color.yellow, textcolor=color.new(color.black,0), offset=0, transp=5, size=size.tiny)
plotshape(draw_trade, title='Draw trade', text="Draw trade", style=shape.labeldown, location=location.abovebar, color=color.yellow, textcolor=color.new(color.black,0), offset=0, transp=5, size=size.tiny)
//Alert
mms1="Signal alert"
mms2="Put alert"
mms3="Call alert"
PutAlert=
       (xTech)
      
CallAlert=
       (yTech)
      

alertcondition(PutAlert or CallAlert, title="Signal alert", message=mms1)
alertcondition(PutAlert, title="Put alert", message=mms2)
alertcondition(CallAlert, title="Call alert", message=mms3)
//EOF

2. Code Backtest - có mã Fibonacci
Mã:
// BO - Woodies Price's Power - Intraday Backtesting
//v11
// © inno14
//@version=4
strategy("BO - Woodies Price's Power - Intraday Backtesting")

// === INPUT PERIOD OF TIME ===
Date   = input(true, title = "=== Date Option ===")
FromDay   = input(defval = 1, title = "From Day", minval = 1, maxval = 31)
FromMonth = input(defval = 4, title = "From Month", minval = 1, maxval = 12)
FromYear  = input(defval = 2020, title = "From Year", minval = 2017)

ToDay     = input(defval = 22, title = "To Day", minval = 1, maxval = 31)
ToMonth   = input(defval = 4, title = "To Month", minval = 1, maxval = 12)
ToYear    = input(defval = 2020, title = "To Year", minval = 2017)

// === DATE RANGE ===
start     = timestamp(FromYear, FromMonth, FromDay, 00, 00)  // backtest start window
finish    = timestamp(ToYear, ToMonth, ToDay, 23, 59)        // backtest finish window
window()  => time >= start and time <= finish ? true : false // create function "within window of time"

// === Trading Time ===
CTimeDvM   = input(true, title = "=== Trading Time ===")
Time_zone = input(7,title="Time Zone")
FromHourDvM   = input(defval = 07, title = "From Hour", minval = 00, maxval = 23)
FromMinuteDvM = input(defval = 00, title = "From Minute", minval = 00, maxval = 59)
ToHourDvM   = input(defval = 16, title = "To Hour", minval = 00, maxval = 23)
ToMinuteDvM = input(defval = 00, title = "To Minute", minval = 00, maxval = 59)

GMT_FHDvM=FromHourDvM<Time_zone?FromHourDvM-Time_zone+24:FromHourDvM-Time_zone
GMT_THDvM=ToHourDvM<Time_zone?ToHourDvM-Time_zone+24:ToHourDvM-Time_zone
fhDvM= (GMT_FHDvM<10?"0"+tostring(GMT_FHDvM):tostring(GMT_FHDvM))
fmDvM= (FromMinuteDvM<10?"0"+tostring(FromMinuteDvM):tostring(FromMinuteDvM))
thDvM= (GMT_THDvM<10?"0"+tostring(GMT_THDvM):tostring(GMT_THDvM))
tmDvM= (ToMinuteDvM<10?"0"+tostring(ToMinuteDvM):tostring(ToMinuteDvM))
WorkingHourDvM = fhDvM+fmDvM+"-"+thDvM+tmDvM
t0_DvM = time(timeframe.period, WorkingHourDvM)
htrtime = input(true,title="Highlight Trading Time")
bgcolor(htrtime? t0_DvM? color.white : na:na, title="Trading Time", transp=0)

//Price's Power
pptt = input(true,title="=== Price's Power ===")
cyclePeriod = input(title="Cycle Period", type=input.integer, minval=1, defval=20)
//hline0=hline(0,linewidth=3,linestyle=hline.style_solid,color=color.new(color.olive,0))
//0.truncate() truncates a given number to a certain number of decimals
truncate(number, decimals) =>
    factor = pow(10, decimals)
    int(number * factor) / factor
//1. EMA
midband=EMA(close, cyclePeriod)

//2.Standard Deviation
mlt_std = 1
upper_en_std = midband + stdev(close, cyclePeriod)*mlt_std
lower_en_std = midband - stdev(close, cyclePeriod)*mlt_std

//3.Power
pu=close-upper_en_std
pl=close-lower_en_std
upb=upper_en_std-midband
lob=lower_en_std-midband
bull=pu>=0 and pu[1]>=0?(pu+upb)/upb:0
bear=pl<=0 and pl[1]<=0?-((pl+lob)/lob):0

//5.Label value
pp_sigtext=
       bull>0?" * Bull's Power = "+tostring(truncate(bull,2)):na
       or
       bear<0?" * Bear's Power = "+tostring(truncate(bear,2)):na

//MA
trend_tt=input(true,title="=== Trend Filter ===")
ma_inpt=input(title="WMA", type=input.integer, defval=100)
trend_line=wma(close,ma_inpt)
//Woodies CCI
cci_ft=input(true,title="=== CCI Signal ===")
cciTurboLength = 6
cci14Length = input(title="CCI Length", type=input.integer, defval=14)

source = close
cciTurbo = cci(source, cciTurboLength)
cci14 = cci(source, cci14Length)

last5IsDown = cci14[5] < 0 and cci14[4] < 0 and cci14[3] < 0 and cci14[2] < 0 and cci14[1] < 0
last5IsUp = cci14[5] > 0 and cci14[4] > 0 and cci14[3] > 0 and cci14[2] > 0 and cci14[1] > 0
histogramColor = last5IsUp ? color.green : last5IsDown ? color.red : cci14 < 0 ? color.gray : color.gray

//Plot Woodies CCI
//plot(cci14, title="CCI Histogram", color=histogramColor, style=plot.style_histogram, linewidth=2, transp=40)
//plot(0, title="Zero Line", color=cciTurbo>100?color.blue:cciTurbo<-100?color.red:color.navy, style=plot.style_line, linewidth=6, transp=20)
hline(200, title="Hundred Line", color=color.black, linestyle=hline.style_dotted)
hline(-200, title="Minus Line", color=color.black, linestyle=hline.style_dotted)

//Plot lingreg CCI14
linreg_len=input(4,title="Linear Regression Length")
linreg_cci14=linreg(cci14, linreg_len, 0)
//plot(linreg_cci14, color=color.aqua, linewidth=4)

//
ext_linreg=input(100,title="Extreme Level")

//peak & top
peak_cci=
       linreg_cci14[2]>linreg_cci14[3] and linreg_cci14[1]>linreg_cci14[2] and linreg_cci14[0]<linreg_cci14[1] and linreg_cci14[1]>ext_linreg
bott_cci=
       linreg_cci14[2]<linreg_cci14[3] and linreg_cci14[1]<linreg_cci14[2] and linreg_cci14[0]>linreg_cci14[1] and linreg_cci14[1]<-ext_linreg
peak_cci_1=
       linreg_cci14[2]>linreg_cci14[3] and linreg_cci14[1]>linreg_cci14[2] and linreg_cci14[0]<linreg_cci14[1]
bott_cci_1=
       linreg_cci14[2]<linreg_cci14[3] and linreg_cci14[1]<linreg_cci14[2] and linreg_cci14[0]>linreg_cci14[1]
//
fil_len=input(6,title="Filter Length")
top_ext=highest(linreg_cci14,fil_len)
bot_ext=lowest(linreg_cci14,fil_len)

//Put signal
x1=
       peak_cci
       and linreg_cci14[1]==top_ext
       and close<trend_line
       and bull==0 and bear==0
    
    

//Call signal
y1=
       bott_cci
       and linreg_cci14[1]==bot_ext
       and close>trend_line
       and bull==0 and bear==0
    
    

no_orders =
       not strategy.opentrades

//Function
xTech=
       (x1
       and no_orders)
    

yTech=
       (y1
       and no_orders)
    

sumtrades=strategy.losstrades[0]+strategy.wintrades[0]
losstrades=strategy.losstrades[0]
wintrades=strategy.wintrades[0]
//Fibonacci Money Management
fibo_tt=input(true,title="=== Fibonacci Money Management ===")
take_profit=input(300,title="Take profit = wintrades - losstrades =")
//Bid level
current_bid_lv=
       losstrades == 0 and wintrades == 0?1:
       losstrades-wintrades == -1?1:
       losstrades>0 and (losstrades-wintrades == 0)?2:
       losstrades-wintrades == 1?3:
       losstrades-wintrades == 2?5:
       losstrades-wintrades == 3?8:
       losstrades-wintrades == 4?13:
       losstrades-wintrades == 5?21:
       losstrades-wintrades == 6?34:
       1
bid_level=current_bid_lv
take_profit_val = wintrades - losstrades
//Plot Analyzing Signals
//hline1=hline(-1.2*300)
hline2=hline(-1.6*300)
hline0=hline(0)
sigtext=
       xTech?"Put signal"+ " * Current Bid Level: " + tostring(bid_level):yTech?"Call signal"+ " * Current Bid Level: " + tostring(bid_level):
       "Backtesting date: "+tostring(FromDay)+"/"+tostring(FromMonth)+"/"+tostring(FromYear)
       + " * From: "+tostring(FromHourDvM)+":"+tostring(FromMinuteDvM)+" To "+tostring(ToHourDvM)+":"+tostring(ToMinuteDvM)
       + " * Take profit: " + tostring(wintrades-losstrades)+"/"+tostring(take_profit)
       + " * Bid Level: " + tostring(bid_level)
       + " * Linreg Length: " + tostring(linreg_len)
       + pp_sigtext

sig_col=xTech?color.new(color.red,10):yTech?color.new(color.blue,10):color.new(color.navy,10)
label_sig_text = label.new(bar_index[0], -1.5*300, text=sigtext, style=label.style_none, textcolor=sig_col, size=size.large)
label.delete(label_sig_text[1])

//Plot Color Panel of Finobacci Money Management
fib_sigtext=
       "Color Panel of Finobacci Money Management"
    
fib_sig_col=color.new(color.navy,10)
label_fib_sig_text = label.new(bar_index[5], 250, text=fib_sigtext, style=label.style_none, textcolor=fib_sig_col, size=size.large)
label.delete(label_fib_sig_text[1])
fib_put=50
fib_col=-150

fib_put_lv1=color.new(color.red,0)
plotshape(fib_put, title='Put Lv1', text="Put Lv1", style=shape.circle, location=location.absolute, color=fib_put_lv1, textcolor=color.black, offset=-9, size=size.normal, show_last=2)
fib_call_lv1=color.new(color.blue,0)
plotshape(fib_col, title='Call Lv1', text="Call Lv1", style=shape.circle, location=location.absolute, color=fib_call_lv1, textcolor=color.black, offset=-9, size=size.normal, show_last=2)

fib_put_lv2=color.new(color.red,10)
plotshape(fib_put, title='Put Lv2', text="Put Lv2", style=shape.circle, location=location.absolute, color=fib_put_lv2, textcolor=color.black, offset=-8, size=size.normal, show_last=2)
fib_call_lv2=color.new(color.blue,10)
plotshape(fib_col, title='Call Lv2', text="Call Lv2", style=shape.circle, location=location.absolute, color=fib_call_lv2, textcolor=color.black, offset=-8, size=size.normal, show_last=2)

fib_put_lv3=color.new(color.orange,0)
plotshape(fib_put, title='Put Lv3', text="Put Lv3", style=shape.circle, location=location.absolute, color=fib_put_lv3, textcolor=color.black, offset=-7, size=size.normal, show_last=2)
fib_call_lv3=color.new(color.green,0)
plotshape(fib_col, title='Call Lv3', text="Call Lv3", style=shape.circle, location=location.absolute, color=fib_call_lv3, textcolor=color.black, offset=-7, size=size.normal, show_last=2)

fib_put_lv5=color.new(color.orange,10)
plotshape(fib_put, title='Put Lv5', text="Put Lv5", style=shape.circle, location=location.absolute, color=fib_put_lv5, textcolor=color.black, offset=-6, size=size.normal, show_last=2)
fib_call_lv5=color.new(color.green,10)
plotshape(fib_col, title='Call Lv5', text="Call Lv5", style=shape.circle, location=location.absolute, color=fib_call_lv5, textcolor=color.black, offset=-6, size=size.normal, show_last=2)

fib_put_lv8=color.new(color.maroon,0)
plotshape(fib_put, title='Put Lv8', text="Put Lv8", style=shape.circle, location=location.absolute, color=fib_put_lv8, textcolor=color.black, offset=-5, size=size.normal, show_last=2)
fib_call_lv8=color.new(color.lime,0)
plotshape(fib_col, title='Call Lv8', text="Call Lv8", style=shape.circle, location=location.absolute, color=fib_call_lv8, textcolor=color.black, offset=-5, size=size.normal, show_last=2)

fib_put_lv13=color.new(color.maroon,10)
plotshape(fib_put, title='Put Lv13', text="Put Lv13", style=shape.circle, location=location.absolute, color=fib_put_lv13, textcolor=color.black, offset=-4, size=size.normal, show_last=2)
fib_call_lv13=color.new(color.lime,10)
plotshape(fib_col, title='Call Lv13', text="Call Lv13", style=shape.circle, location=location.absolute, color=fib_call_lv13, textcolor=color.black, offset=-4, size=size.normal, show_last=2)

fib_put_lv21=color.new(color.olive,0)
plotshape(fib_put, title='Put Lv21', text="Put Lv21", style=shape.circle, location=location.absolute, color=fib_put_lv21, textcolor=color.black, offset=-3, size=size.normal, show_last=2)
fib_call_lv21=color.new(color.yellow,0)
plotshape(fib_col, title='Call Lv21', text="Call Lv21", style=shape.circle, location=location.absolute, color=fib_call_lv21, textcolor=color.black, offset=-3, size=size.normal, show_last=2)

fib_put_lv34=color.new(color.olive,10)
plotshape(fib_put, title='Put Lv34', text="Put Lv34", style=shape.circle, location=location.absolute, color=fib_put_lv34, textcolor=color.black, offset=-2, size=size.normal, show_last=2)
fib_call_lv34=color.new(color.yellow,10)
plotshape(fib_col, title='Call Lv34', text="Call Lv34", style=shape.circle, location=location.absolute, color=fib_call_lv34, textcolor=color.black, offset=-2, size=size.normal, show_last=2)
//plot Signal
PutSignal= xTech and window() and t0_DvM and take_profit_val<take_profit?-1.2*300:na
CallSignal= yTech and window() and t0_DvM and take_profit_val<take_profit?-1.2*300:na
putcol =
       PutSignal ?
       bid_level==1? color.new(color.red,0):
       bid_level==2? color.new(color.red,10):
       bid_level==3? color.new(color.orange,0):
       bid_level==5? color.new(color.orange,10):
       bid_level==8? color.new(color.maroon,0):
       bid_level==13? color.new(color.maroon,10):
       bid_level==21? color.new(color.olive,0):
       bid_level==34? color.new(color.olive,10):
       color.new(color.red,0): na
callcol =
       CallSignal ?
       bid_level==1? color.new(color.blue,0):
       bid_level==2? color.new(color.blue,10):
       bid_level==3? color.new(color.green,0):
       bid_level==5? color.new(color.green,10):
       bid_level==8? color.new(color.lime,0):
       bid_level==13? color.new(color.lime,10):
       bid_level==21? color.new(color.yellow,0):
       bid_level==34? color.new(color.yellow,10):
       color.new(color.blue,0): na
plotshape(PutSignal, title='Put', text="Put", style=shape.circle, location=location.absolute, color=putcol, textcolor=color.black, offset=1, size=size.large)
plotshape(CallSignal, title='Call', text="Call", style=shape.circle, location=location.absolute, color=callcol, textcolor=color.black, offset=1, size=size.large)

//Backtesting
exp_tt=input(true,"Expiry Option By Bars")
exp_val=input(3,"Number of Bars")
strategy.entry("Call", strategy.long, when=yTech and window() and t0_DvM and take_profit_val<take_profit)
strategy.entry("Put", strategy.short, when=xTech and window() and t0_DvM and take_profit_val<take_profit)
strategy.close_all(when=barssince(xTech)==exp_val or barssince(yTech)==exp_val)
//EOF
 
 
@vĩnh0902 @Trương Nhật cách vẽ trend line cho đúng. Hôm nay trend line wma100 không được tôn trọng, đường trend xuyên qua sóng giá, chúng ta cần phải vẽ lại trend line, theo đúng nguyên tắc đường trend line phải nối các đỉnh hoặc các đáy :D
1. Trend line wma 100 không còn được tôn trọng
chrome_2020-04-24_10-16-51.png


2. Vẽ lại trend line cho đúng :D
chrome_2020-04-24_10-17-09.png
 
 
Con hàng cũ đúng tiêu đề topic, tích hợp thêm nhiều loại trend line, có alert, có thống kê, có set time, có quản lý vốn :D Để anh em khỏi sửa lỗi viết hoa viết thường, mình cho lên drive luôn cho tiện :D @vĩnh0902 @Trương Nhật mời test :D
1. Trend Line Multi Type + Alert
https://drive.google.com/open?id=1U0ZLH2IPNlboHBel8jHxBnnJAJaam1nJ

2. Trend Line backtest + Fibonacci Money Management
https://drive.google.com/open?id=157DLhC0dRLnBWKF68dK7MsP3Wou2qbN1
 
 
Con hàng cũ đúng tiêu đề topic, tích hợp thêm nhiều loại trend line, có alert, có thống kê, có set time, có quản lý vốn :D Để anh em khỏi sửa lỗi viết hoa viết thường, mình cho lên drive luôn cho tiện :D @vĩnh0902 @Trương Nhật mời test :D
1. Trend Line Multi Type + Alert
https://drive.google.com/open?id=1U0ZLH2IPNlboHBel8jHxBnnJAJaam1nJ

2. Trend Line backtest + Fibonacci Money Management
https://drive.google.com/open?id=157DLhC0dRLnBWKF68dK7MsP3Wou2qbN1
hjhj e chỉ test dk 1 tháng mà thấy chuỗi loss dài quá bác ạ toàn chuỗi 4 5 loss :D hiệu suất thi ổn với số lệnh nhiều như z:eek::D
 
 
hjhj e chỉ test dk 1 tháng mà thấy chuỗi loss dài quá bác ạ toàn chuỗi 4 5 loss :D hiệu suất thi ổn với số lệnh nhiều như z:eek::D
hihih, set time, chọn loại đường trung bình đang được tôn trọng để làm trend line và chọn chu kỳ thích hợp nha vĩnh. À, update cái code alert nha, nãy báo alert chưa đúng, giờ oke rồi :D
 
 
hihih, set time, chọn loại đường trung bình đang được tôn trọng để làm trend line và chọn chu kỳ thích hợp nha vĩnh. À, update cái code alert nha, nãy báo alert chưa đúng, giờ oke rồi :D
sáng h e cập nhập nhiều code quá h loạn script tradingview lên bác ạ :Dkeke
 
 
Con hàng cũ đúng tiêu đề topic, tích hợp thêm nhiều loại trend line, có alert, có thống kê, có set time, có quản lý vốn :D Để anh em khỏi sửa lỗi viết hoa viết thường, mình cho lên drive luôn cho tiện :D @vĩnh0902 @Trương Nhật mời test :D
1. Trend Line Multi Type + Alert
https://drive.google.com/open?id=1U0ZLH2IPNlboHBel8jHxBnnJAJaam1nJ

2. Trend Line backtest + Fibonacci Money Management
https://drive.google.com/open?id=157DLhC0dRLnBWKF68dK7MsP3Wou2qbN1
con này với CCI combo khác nhau hả bác
 
 
con này với CCI combo khác nhau hả bác
Khác, con này là dùng các loại đường trung bình làm trend line, cách vẽ trend line của mỗi người sẽ khác nhau (loại, chu kỳ), sẽ có kết quả khác nhau, mình tích hợp nhiều loại, và có backtest để anh em có thể tùy chọn theo điều kiện thị trường hàng ngày :D Còn kỹ thuật chọn thì mỗi người mỗi khác, nên kết quả cũng khác :D
 
 

BÌNH LUẬN MỚI NHẤT

AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

Back
Bên trên

Miễn trừ trách nhiệm

Tất cả nội dung trên website này đều vì mục đích cung cấp thông tin và không phải lời khuyên đầu tư.

Tại Việt Nam, giao dịch CFD forex có các rủi ro nhất định, trong đó bao gồm rủi ro về pháp lý. Độc giả nên tìm hiểu kỹ trước khi đưa ra quyết định tham gia.