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
à bác để ý chỗ cài đặt stop loss ý bác để 1 là 1 loss nó k nhả lệnh nữa
để lên 2 thì nó hiện lệnh. Như kéo lịch sử thì thấy cái này
upload_2020-3-12_11-16-58.png

hơi ghê đó
 
 
có bác ạ hjhj vẫn ngon như trước :D
Cập nhật tín hiệu alert nhấp nháy trên chart, lâu quá ko code alert nên quên mất tiêu :D
Mã:
// BO - Woodies CCI - Alert
// © inno14
//@version=4
study("BO - Woodies CCI - Alert", overlay=true)
// === INPUT PERIOD OF TIME ===
Date   = input(true, title = "=== Date Option ===")
FromDay   = input(defval = 1, title = "From Day", minval = 1, maxval = 31)
FromMonth = input(defval = 1, title = "From Month", minval = 1, maxval = 12)
FromYear  = input(defval = 2020, title = "From Year", minval = 2017)

ToDay     = input(defval = 1, title = "To Day", minval = 1, maxval = 31)
ToMonth   = input(defval = 1, title = "To Month", minval = 1, maxval = 12)
ToYear    = input(defval = 9999, 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 = 30, title = "From Minute", minval = 00, maxval = 59)
ToHourDvM   = input(defval = 18, 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.gray : na:na, title="Trading Time", transp=90)

//

//Woodies CCI
cciTurboLength = input(title="CCI Turbo Length", type=input.integer, defval=6, minval=3, maxval=1400)
cci14Length = input(title="CCI 14 Length", type=input.integer, defval=14, minval=7, maxval=2000)

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_cci14=linreg(cci14, 5, 0)
//plot(linreg_cci14, color=color.aqua, linewidth=4)

//
ext_linreg=input(150,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 cciTurbo<100
       and cci14<linreg_cci14
      
      
      

//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 cciTurbo>-100
       and cci14>linreg_cci14
      
      

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

//Function
xTech=
       x1
       and no_orders
      
    

yTech=
       y1
       and no_orders
      

//plot Signal
putcol = xTech? color.red : na
callcol = yTech? color.blue : na
PutSignal= xTech and window() and t0_DvM?high:na
CallSignal= yTech and window() and t0_DvM?low:na

plotshape(PutSignal, title='Put', text="Put Alert", style=shape.labeldown, location=location.abovebar, color=color.red, textcolor=color.black, offset=0, transp=20, size=size.large, show_last=1)
plotshape(CallSignal, title='Call', text="Call Alert", style=shape.labelup, location=location.belowbar, color=color.blue, textcolor=color.black, offset=0, transp=20, size=size.large, show_last=1)
plotshape(PutSignal, title='Put', text="Put", style=shape.arrowdown, location=location.abovebar, color=color.red, textcolor=color.black, offset=1, transp=20, size=size.large)
plotshape(CallSignal, title='Call', text="Call", style=shape.arrowup, location=location.belowbar, color=color.blue, textcolor=color.black, offset=1, transp=20, size=size.large)

//Alert
mms1="Signal alert"
mms2="Put alert"
mms3="Call alert"
PutAlert=
       (xTech and window() and t0_DvM)
      
CallAlert=
       (yTech and window() and t0_DvM)
      

alertcondition(PutAlert or CallAlert, title="Signal alert", message=mms1)
alertcondition(PutAlert, title="Put alert", message=mms2)
alertcondition(CallAlert, title="Call alert", message=mms3)
//EOF
 
 
e sợ nó lặp lại trong tương lai thì khổ hihi vừa báo 1 lệnh nè bác keke:D mà giá đang lên cao quá
Vậy nên mình mới hy vọng nó đi ngang cả ngày, keke, cây nến kiệt sức 10h40 hy vọng chỉ là tạm nghỉ của trend giảm, khi giá hồi lên cao gấu lại nhào vào vả, bò khó húc lên lắm, chiều nay có tin con E nữa, hành động đợi tin thì vùng tích lũy sẽ duy trì tương đối lâu đấy, ý kiến chủ quan của mình là vậy :D
 
 
@vĩnh0902 cây kiệt sức 10h40 tạo sóng hồi, mục tiêu đợt sóng hồi này là vùng 118.00-117.80 nếu trade tay thì phải đợi tín hiệu xuất hiện tại vùng giá này chúng ta mới vào lệnh :D
 
 
yes hjhj thôi bỏ chart ngứa tay zô lệnh thì chết:D
Macro không biết phân tích, nhưng bù lại nó kỷ luật, muốn tận dụng lợi thế xác suất thì buộc phải kỷ luật, tín hiệu có là phải vào, vào bất chấp. Còn nếu muốn tận dụng lợi thế vị thế thì phải phân tích thật nhanh và không hối tiếc, tâm lý tiếc rẻ (pt đúng mà bỏ lệnh, pt còn do dự lại vào lệnh) chính là điểm yếu chí mạng cho kiểu trade phân tích vị thế.
 
 

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.