Xin các bạn, hãy thay đổi cách liên kết FMZ trên tradingview.

Tác giả:Q631207207, Tạo: 2022-05-16 21:10:12, Cập nhật: 2022-05-16 21:11:40

if (tp1Open)strategy.exit(long1, when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp1), qty_percent=tp1Amount, comment= nhiều hơn bình quân 1, alert_message= nhiều hơn bình quân 30%)strategy.exit(short1, when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp1), qty_percent=tp1Amount, comment=trước 1, alert_message=trước 30%)

if (tp2Open)strategy.exit(long2, when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp2), qty_percent=tp2Amount, comment= nhiều hơn bình quân 2, alert_message= nhiều hơn bình quân 50%)strategy.exit(short2, when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp2), qty_percent=tp2Amount, comment=trước 2, alert_message=trước 50%)

if (tp3Open)
strategy.exit(long3, when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp3), qty_percent=tp3Amount, comment= nhiều hơn bình quân 3, alert_message= nhiều hơn bình quân 100%)strategy.exit(short3, when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp3), qty_percent=tp3Amount, comment=trước trần 3, alert_message=trước trần 100%)

这是我TV的分批止盈策略,请问该怎么搭建机器人对接?社区的那个直连教程 好像并没有针对这个警报的设置和分批止盈

Thêm nữa

Nhà phát minh định lượngNgoài ra, các nhà phát minh có thể trực tiếp tạo ra pin để tạo ra chính sách trực tiếp và xem nó có chạy hay không.

Q631207207Và vấn đề của tôi bây giờ là, chiến lược của tôi là làm thế nào để nhận được một robot FMZ, một robot trong cộng đồng có vẻ như không có mã phân phối.

Nhà phát minh định lượng`` tp1Open = input.bool ((true, "TP1", group = "Take Profits") tp1 = input.float ((2.0, "TP Level (%) ", step = 0.1, group = "Take Profits") / 100 tp1Amount = input.int ((30, "Amount (%) ", step = 1, group = "Take Profits") tp2Open = input.bool ((true, "TP2", group = "Take Profits") tp2 = input.float ((2.5, "TP Level (%) ", step = 0.1, group = "Take Profits") / 100 tp2Amount = input.int ((71, "Amount (%) ", step = 1, group = "Take Profits") tp3Open = input.bool ((true, "TP3", group = "Take Profits") tp3 = input.float ((3.0, "TP Level (%) ", step = 0.1, group = "Take Profits") / 100 tp3Amount = input.int ((100, "Amount (%) ", step = 1, group = "Take Profits") st5=input.float ((1.3, "dừng lỗ", step = 0.1, group = "Take Profits") / 100 alertfg = input ((true)) GS: Vâng. GS: Vâng. longCondition = alertfg and close>close[1] if (longCondition) strategy.entry (("long", strategy.long, comment='làm thêm', alert_message="làm thêm") longsl=alertfg and closeclose[1] strategy.close ("short", when=high > strategy.position_avg_price * (1 + st5) or shortsl,comment='không mất',alert_message="không mất") // Logic ngang hàng if tp1Open strategy.exit ("long1", when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp1), qty_percent=tp1Amount, comment='thêm phẳng1', alert_message="thêm phẳng30%") strategy.exit ("short1", when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp1), qty_percent=tp1Amount, comment='space1', alert_message="space30%") if tp2Open strategy.exit ("long2", when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp2), qty_percent=tp2Amount, comment='thêm phẳng2', alert_message="thêm phẳng50%") strategy.exit ("short2", when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp2), qty_percent=tp2Amount, comment='space2', alert_message="space50%") if tp3Open strategy.exit ("long3", when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp3), qty_percent=tp3Amount, comment='thường ngang 3', alert_message="thường ngang 100%") strategy.exit ("short3", when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp3), qty_percent=tp3Amount,comment='space3',alert_message="space100%") `` Bạn có thể sao chép trực tiếp, điều này sẽ không có vấn đề gì, bạn có thể thu hẹp những dòng cuối cùng và thay đổi nó cho bạn.

Nhà phát minh định lượngalertfg không được định nghĩa.

Q631207207tp1Open = input.bool ((true, "TP1", group = "Take Profits") tp1 = input.float ((2.0, "TP Level (%) ", step = 0.1, group = "Take Profits") / 100 tp1Amount = input.int ((30, "Amount (%) ", step = 1, group = "Take Profits") tp2Open = input.bool ((true, "TP2", group = "Take Profits") tp2 = input.float ((2.5, "TP Level (%) ", step = 0.1, group = "Take Profits") / 100 tp2Amount = input.int ((71, "Amount (%) ", step = 1, group = "Take Profits") tp3Open = input.bool ((true, "TP3", group = "Take Profits") tp3 = input.float ((3.0, "TP Level (%) ", step = 0.1, group = "Take Profits") / 100 tp3Amount = input.int ((100, "Amount (%) ", step = 1, group = "Take Profits") st5=input.float ((1.3, "dừng lỗ", step = 0.1, group = "Take Profits") / 100 G.J.: Vâng. Vâng. longCondition = alertfg and close>close[1] if (longCondition) strategy.entry (("long", strategy.long, comment='làm thêm', alert_message="làm thêm") Không có gì đâu. longsl=alertfg and closeclose[1] strategy.close ("short", when=high > strategy.position_avg_price * (1 + st5) or shortsl,comment='không mất',alert_message="không mất") Không có gì đâu. // Logic ngang hàng if (tp1Open) strategy.exit ("long1", when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp1), qty_percent=tp1Amount, comment='thêm bình 1', alert_message="thêm bình 30%") strategy.exit ("short1", when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp1), qty_percent=tp1Amount, comment='space1', alert_message="space30%") if (tp2Open) strategy.exit ("long2", when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp2), qty_percent=tp2Amount, comment='đơn vị ngang 2', alert_message="đơn vị ngang 50%") strategy.exit ("short2", when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp2), qty_percent=tp2Amount, comment='space2', alert_message="space50%") Không có gì đâu. if (tp3Open) strategy.exit ("long3", when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp3), qty_percent=tp3Amount, comment='thường ngang 3', alert_message="thường ngang 100%") strategy.exit ("short3", when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp3), qty_percent=tp3Amount, comment='space3', alert_message="space100%") Đây là cách tôi dừng lại, tôi không thể di chuyển, tôi không thể chạy.