Sumber dimuat naik... memuat...

Sila tanya, tuan-tuan, bagaimana untuk menukar alert_message tradingview untuk menghubungkan FMZ?

Penulis:q631207207, Dicipta: 2022-05-16 21:10:12, Dikemas kini: 2022-05-16 21:11:40

jika (tp1Buka)strategy.exit(long1, when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp1), qty_percent=tp1Amount, comment= lebih rata 1, alert_message= lebih rata 30%)strategy.exit(short1, when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp1), qty_percent=tp1Amount, comment=serpihan kosong 1, alert_message=serpihan kosong 30%)

jika (tp2Open)strategy.exit(long2, when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp2), qty_percent=tp2Amount, comment= lebih rata 2, alert_message= lebih rata 50%)strategy.exit(short2, when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp2), qty_percent=tp2Amount, comment=serpihan kosong2, alert_message=serpihan kosong50%)

jika (tp3Open)
strategy.exit(long3, when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp3), qty_percent=tp3Amount, comment= lebih rata 3, alert_message= 100% lebih rata)strategy.exit(short3, when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp3), qty_percent=tp3Amount, comment=serpihan kosong 3, alert_message=serpihan kosong 100%)

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

Lebih lanjut

Pencipta KuantitiPencipta boleh membuat pin secara langsung dan membuat strategi secara langsung untuk melihat sama ada ia boleh berjalan.

q631207207Sekarang, masalah saya adalah bagaimana strategi saya harus mengambil bot FMZ, kod robot di komuniti itu seolah-olah tidak disusun.

Pencipta Kuantiti`` 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 ((betul, "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, "stop loss", step = 0.1, group = "Take Profits") / 100 alertfg = input ((true)) JH: Ya. Ya. Ya. Ya. Ya. Ya. Logik pembukaan. longCondition = alertfg and close>close[1] if (longCondition) strategy.entry (("long", strategy.long, comment='buat lebih', alert_message="buat lebih") longsl=alertfg and closeclose[1] strategy.close ("short", when=high > strategy.position_avg_price * (1 + st5) or shortsl,comment='kerugian kosong',alert_message="kerugian kosong") // Logika perpecahan if tp1Open strategy.exit ("long1", when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp1), qty_percent=tp1Amount, comment='lebih rata1', alert_message="lebih rata 30%") strategy.exit ("short1", when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp1), qty_percent=tp1Amount, comment='bersih1', alert_message="bersih30%") if tp2Open strategy.exit ("long2", when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp2), qty_percent=tp2Amount, comment='lebih rata2', alert_message="lebih rata 50%") strategy.exit ("short2", when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp2), qty_percent=tp2Amount, comment='bersih2', alert_message="bersih50%") if tp3Open strategy.exit ("long3", when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp3), qty_percent=tp3Amount, comment='berjumlah 3', alert_message="berjumlah 100%") strategy.exit ("short3", when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp3), qty_percent=tp3Amount, comment='berata3', alert_message="berata100%") `` Jadi, jika anda ingin membuat salinan secara langsung, ini tidak akan menjadi masalah.

Pencipta Kuantitialertfg tidak ditakrifkan.

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, "stop loss", step = 0.1, group = "Take Profits") / 100 JH: Ya. Ya. Ya. Ya. Ya. Logik pembukaan. longCondition = alertfg and close>close[1] if (longCondition) strategy.entry (("long", strategy.long, comment='buat lebih', alert_message="buat lebih") Pergi ke sini. longsl=alertfg and closeclose[1] strategi.close ("short", when=high > strategy.position_avg_price * (1 + st5) or shortsl,comment='air loss', alert_message="halangan kepala kosong") Pergi ke sini. // Logik perpecahan if (tp1Open) strategy.exit ("long1", when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp1), qty_percent=tp1Amount, comment='berganda1', alert_message="berganda 30%") strategy.exit ("short1", when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp1), qty_percent=tp1Amount, comment='berata1', alert_message="berata30%") if (tp2Open) strategy.exit ("long2", when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp2), qty_percent=tp2Amount, comment='berjumlah 2', alert_message="berjumlah 50%") strategy.exit ("short2", when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp2), qty_percent=tp2Amount, comment='berata2', alert_message="berata50%") Pergi ke sini. if (tp3Open) strategy.exit ("long3", when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp3), qty_percent=tp3Amount, comment='berbilang 3', alert_message="berbilang 100%") strategy.exit ("short3", when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp3), qty_percent=tp3Amount, comment='berhampiran 3', alert_message="berhampiran 100%") Ini adalah penghalang saya untuk berhenti, terus bergerak dan tidak boleh lari.