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
upload_2020-2-11_9-58-11.png

e tưởng lệnh này phát bắt bóng thì phải call chứ bác @anhnguyen14
upload_2020-2-11_9-59-25.png

signal cũ thì win đẹp hjhj
 
 
upload_2020-2-11_9-58-11.png

e tưởng lệnh này phát bắt bóng thì phải call chứ bác @anhnguyen14
upload_2020-2-11_9-59-25.png

signal cũ thì win đẹp hjhj
hjhj h e mới đọc kĩ hướng dẫn sử dụng kkeke "mặc định là mình đang set xác mốc là 50, tức là 2 cây đỏ mà chưa cắn band thì nếu xác suất chuỗi >50 ta theo đỏ, xác suất chuỗi <50 ta bẻ kèo đỏ theo xanh"
 
 
Code Bar M15 2/3 Signal tiến hóa, chỉ vào lệnh với chuỗi 2 thuần khiết với theo bệt (xác suất chuỗi >50), chuỗi 2 ko thuần khiết khi bẻ bệt (xác suất chuỗi <50) :D
Mã:
//@version=4
//BO - Bar M15 2/3 Signal
//author: inno14
study(title="BO - Bar M15 2/3 Signal", overlay=false)
// === INPUT PERIOD OF TIME ===
Date   = input(true, title = "=== PERIOD OF TIME ===")
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"

hline1=hline(25)
hline0=hline(0)
// Calculate hours, minutes, and seconds till close
timeLeft = barstate.isrealtime ?
     (time_close - timenow) / 1000 :
     na

minutesLeft = security(syminfo.tickerid,"15",floor((timeLeft % 3600) / 60))
secondsLeft = timeLeft % 60
//count 2
redv2=window()?1:0
bluev2=window()?1:0
mchange2 = close[1]<open[1] and close[2]<open[2]?-1:0
pchange2 = close[1]>open[1] and close[2]>open[2]?1:0
blue2 = cum(pchange2 > 0 ? bluev2 : 0 * bluev2)
red2 = cum(mchange2 < 0 ? redv2 : 0 * redv2)

//count 3
redv3=window()?1:0
bluev3=window()?1:0
mchange3 = close[1]<open[1] and close[2]<open[2] and close[3]<open[3]?-1:0
pchange3 = close[1]>open[1] and close[2]>open[2] and close[3]>open[3]?1:0
blue3 = cum(pchange3 > 0 ? bluev3 : 0 * bluev3)
red3 = cum(mchange3 < 0 ? redv3 : 0 * redv3)

//Percent 3rd bar has same direction
pred3=(red3/red2)*100
pblue3=(blue3/blue2)*100

//Bollinger Bands - 20,2.0
len20 = 20
mult20 = 2
sma_20 = sma(close, len20)
basis20 = sma_20
dev20 = mult20 * stdev(close, len20)
upper20 = basis20 + dev20
lower20 = basis20 - dev20

//============================================\\
//Delay 10': wait for price's pattern
sig_time=minutesLeft<5? true:false


//Signal
x1 =
       sig_time==true
       and close[3]>open[3]
       and close[2]>open[2] and close[1]>open[1]
       and close[1]<upper20[1]
       and pblue3<50

x2 =
       sig_time==true
       and close[3]>open[3]
       and close[2]<open[2] and close[1]<open[1]
       and close[1]>lower20[1]
       and pred3>50

y1 =
       sig_time==true
       and close[3]<open[3]
       and close[2]<open[2] and close[1]<open[1]
       and close[1]>lower20[1]
       and pred3<50

y2 =
       sig_time==true
       and close[3]<open[3]
       and close[2]>open[2] and close[1]>open[1]
       and close[1]<upper20[1]
       and pblue3>50

//Signal
xTech=
       x1 or x2
     
     

yTech=
       y1 or y2
     
     
//--------------------------------------\\
// - /FUNCTIONS

//--------------------------------------\\
//Plot Analyzing Signals
sigtext=x1?"Put signal":y1?"Call signal":"Analyzing Signals - Bar M15 Time left:"+tostring(minutesLeft)+":"+tostring(secondsLeft)
sig_col=xTech?color.new(color.red,0):yTech?color.new(color.blue,0):color.new(color.navy,0)
label_sig_text = label.new(bar_index[0], 8, text=sigtext, style=label.style_none, textcolor=sig_col, size=size.large)
label.delete(label_sig_text[1])

//plot Signal
putcol = xTech? color.red : na
callcol = yTech? color.blue : na
PutSignal= xTech?-100:na
CallSignal= yTech?-100:na
hsignalm1=hline(-100)
plot(PutSignal, title='Put Signal', style=plot.style_columns, color=color.red, offset=0, transp=0, show_last=1)
plot(CallSignal, title='Call Signal', style=plot.style_columns, color=color.blue, offset=0, transp=0, show_last=1)
plotshape(PutSignal, title='Put', text="Put", style=shape.labeldown, location=location.bottom, color=color.orange, textcolor=color.black, offset=0, transp=0, show_last=1)
plotshape(CallSignal, title='Call', text="Call", style=shape.labelup, location=location.bottom, color=color.orange, textcolor=color.black, offset=0, transp=0, show_last=1)

// 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
 
 
Chỉnh sửa lần cuối:

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.