
Chiến lược điều khiển mở cửa bằng cách quan sát hành động của giá trong 30 phút đầu tiên sau khi mở cửa ngày giao dịch, xác định hướng phá vỡ mạnh mẽ của giá và sau đó giao dịch theo xu hướng theo hướng đó. Chiến lược này chủ yếu sử dụng thanh khoản và khối lượng giao dịch tăng sau khi mở cửa, có thể tạo ra biến động giá lớn và lực định hướng.
Chiến lược này sử dụng đường K 30 phút vì cần có đủ khoảng thời gian để đánh giá hành vi của giá sau khi mở.
Xác định các đường K trong các giờ mở sau: 0700-0715, 0800-0815, 1300-1315 và 1430-1445
Xác định liệu đường K của đĩa mở có đáp ứng các điều kiện sau:
Giá mở gần giá thấp nhất của đường K, giá đóng gần giá cao nhất (đường K dài)
Hoặc giá mở gần giá cao nhất, giá đóng gần giá thấp nhất (đường K ngắn)
Và giá cao nhất của dòng K này vượt quá 1 lần mức giá cao nhất của 5 dòng K trước đó, hoặc giá thấp nhất thấp hơn 1 lần mức giá thấp nhất của 5 dòng K trước đó ((dẫn đến sự phá vỡ)
Nếu các điều kiện trên được thực hiện, sau khi đường K xảy ra, đường K thứ 3 được giao dịch theo hướng đi vào hướng đó.
Và đặt đường dừng là giá cao nhất hoặc giá thấp nhất của đường K.
Trận đấu kết thúc sau 90 phút.
Bạn có thể xem xét:
Chiến lược điều khiển mở cửa thực hiện theo dõi xu hướng bằng cách nắm bắt hướng đột phá mạnh mẽ của giá sau khi mở cửa. Nó có đặc điểm lợi nhuận rủi ro tốt hơn so với nhập cảnh ngẫu nhiên.
/*backtest
start: 2023-10-15 00:00:00
end: 2023-10-22 00:00:00
period: 10m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Marcns_
//@version=5
// a script that highlights open drives around cash market opens throughout the day
// this indicator identifies the following cash open, open drives 0700 - 0715 / 0800 - 0815 / 1300 - 1315 / 1430 - 1445
// an open drive is when a cash market opens and price runs either up or down away from the opening price, often this will be the high or the low the remainer of the session or day
// and often identify a trend session
strategy("Open Drive", commission_type = strategy.commission.cash_per_contract, commission_value = 3.8 )
// open drive filter times - all times GMT
eu_sev = time(timeframe.period, "0700-0715", "GB")
eu_eig = time(timeframe.period, "0800-0815", "GB")
us_one = time(timeframe.period, "1300-1315", "GB")
us_two = time(timeframe.period, "1430-1445", "GB")
// identify bar that opens at low and closes at high + vice versa
// bar needs to open at one extreme and close at another
TrndExThreshold_Open = 0.15
TrndExThreshold_Close = 0.15
// add a bar range expansion filter - range of bar correlates to volume, high volume = wider range. This script will be able to filter for a break of a 5 bar range +100% or -100%
fbhi = ta.highest(5)
fblo = ta.lowest(5)
fbr = (fbhi - fblo)
RangeEx_up = 0.0
if high >= (fbhi[1] + fbr[1])
RangeEx_up := 1.0
else
na
// range ex down
RangeEx_do = 0.0
if low <= (fblo[1] - fbr[1])
RangeEx_do := 1.0
else
na
//#1 open within 5% of low
OpenAtLow = 0.0
if (close > open) and (open-low) / (high-low) < TrndExThreshold_Open
OpenAtLow := 1.0
else
na
//#2 close within 5% of high
CloseAtHigh = 0.0
if (close > open) and (high-close) / (high-low) < TrndExThreshold_Close
CloseAtHigh := 1.0
else
na
OD_Up = 0.0
if (OpenAtLow + CloseAtHigh + RangeEx_up == 3.0) and ( eu_sev or eu_eig or us_one or us_two)
OD_Up := 1
else
na
plot(OD_Up, title = "OD_up")
OpenAtHigh = 0.0
if (close < open) and (high-open) / (high-low) < TrndExThreshold_Open
OpenAtHigh := 1.0
else
na
//#2 close within 5% of high
CloseAtLow = 0.0
if (close < open) and (close-low) / (high-low) < TrndExThreshold_Close
CloseAtLow := 1.0
else
na
OD_Down = 0.0
if (OpenAtHigh + CloseAtLow + RangeEx_do == 3.0) and ( eu_sev or eu_eig or us_one or us_two)
OD_Down := -1
else
na
plot(OD_Down, title = "OD_down", color = color.red)
//3sma
ma = ta.sma(close,3)
// one time framing - highlight bars the make a series of lower highs or higher lows to identify trend
// one time frame up
otf_u = 0.0
if close > ma and close[1] > ma[1]
otf_u := 1
else
na
// one time frame down
otf_d = 0.0
if close < ma and close[1] < ma[1]
otf_d := 1
else
na
//bgcolor(otf_u ? color.rgb(76, 175, 79, 70) : na)
//bgcolor(otf_d ? color.rgb(255, 82, 82, 66) : na)
// record high and low of entry bar into variable for absolute stop
// buy stop
bs = 0.0
if OD_Up
bs := low[1]
else
na
// sell stop
ss = 0.0
if OD_Down
ss := high[1]
else
na
// strategy entry and exits
// long
if OD_Up
strategy.entry("el", strategy.long, 2)
if ta.barssince(OD_Up)> 3
strategy.exit(id = "ex" , from_entry = "el", limit = close)
// short
if OD_Down
strategy.entry("es", strategy.short, 2)
if ta.barssince(OD_Down)> 3
strategy.exit(id = "ex" , from_entry = "es", limit = close)