Por favor, senhoras e senhores, o alert_message do tradingview mudou o modo de ligar o FMZ.

Autora:Q631207207, Criado: 2022-05-16 21:10:12, Atualizado: 2022-05-16 21:11:40

se (tp1Open)strategy.exit(long1, when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp1), qty_percent=tp1Amount, comment= mais plano 1, alert_message= 30% mais plano)strategy.exit(short1, when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp1), qty_percent=tp1Amount, comment=alert_message=alert_price 30%)

se (tp2Open)strategy.exit(long2, when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp2), qty_percent=tp2Amount, comment= mais plano 2, alert_message= mais plano 50%)strategy.exit(short2, when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp2), qty_percent=tp2Amount, comment=alert2, alert_message=alert50%)

se (tp3Open)
strategy.exit(long3, when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp3), qty_percent=tp3Amount, comment= mais plano 3, alert_message= mais plano 100%)strategy.exit(short3, when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp3), qty_percent=tp3Amount, comment=empenho plano 3, alert_message=empenho plano 100%)

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

Mais.

Inventor de quantificaçãoA única coisa que você pode fazer é criar uma política que não tenha entrada, mas apenas saída. Além disso, você pode criar uma política que você pode usar para ver se ela funciona.

Q631207207O problema que eu tenho agora é a minha estratégia de como eu deveria receber os robôs da FMZ, o código do robô da comunidade parece não ter sido dividido.

Inventor de quantificaçãoNão sei. 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, "stop loss", step = 0.1, group = "Take Profits") / 100 alertfg = input (true) Sim. Sim. Sim. Sim. Sim. Sim. Sim. longCondition = alertfg and close>close[1] se (longCondition) strategy.entry (("long", strategy.long, comment='fazer mais', alert_message="fazer mais") longsl=alertfg e closeclose[1] strategy.close ("short", when=high > strategy.position_avg_price * (1 + st5) or shortsl,comment='vazio', alert_message="vazio") // lógica de equilíbrio se tp1Open strategy.exit ("long1", when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp1), qty_percent=tp1Amount, comment='mais de 30%') strategy.exit ("short1", when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp1), qty_percent=tp1Amount, comment='espaço plano 1', alert_message="espaço plano 30%") se tp2Open strategy.exit ("long2", when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp2), qty_percent=tp2Amount, comment='mais de 50%') strategy.exit ("short2", when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp2), qty_percent=tp2Amount, comment='volatile2', alert_message="volatile 50%") se tp3Open strategy.exit ("long3", when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp3), qty_percent=tp3Amount, comment='plano 3', alert_message="plano 100%") strategy.exit ("short3", when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp3), qty_percent=tp3Amount,comment='espaço 3', alert_message="espaço 100%") Não sei. E isso não deve ser um problema. As últimas linhas estão encolhidas e não estão corretas para você.

Inventor de quantificaçãoalertfg não é definido.

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 Sim. Sim. Sim. Sim. Sim. longCondition = alertfg and close>close[1] se (longCondition) strategy.entry (("long", strategy.long, comment='fazer mais', alert_message="fazer mais") O que é isso? longsl=alertfg e closeclose[1] strategy.close ("short", when=high > strategy.position_avg_price * (1 + st5) or shortsl,comment='vazio', alert_message="vazio parar") O que é isso? // lógica de equilíbrio Se (tp1Open) strategy.exit ("long1", when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp1), qty_percent=tp1Amount, comment='mais de 1', alert_message="mais de 30%") strategy.exit ("short1", when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp1), qty_percent=tp1Amount,comment='vocal1', alert_message="vocal 30%") Se (tp2Open) strategy.exit ("long2", when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp2), qty_percent=tp2Amount, comment='mais de 50%') strategy.exit ("short2", when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp2), qty_percent=tp2Amount,comment='vocal2',alert_message="vocal50%") O que é isso? Se (tp3Open) strategy.exit ("long3", when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp3), qty_percent=tp3Amount, comment='mais de 3', alert_message="mais de 100%") strategy.exit ("short3", when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp3), qty_percent=tp3Amount,comment='vocal 3',alert_message="vocal 100%") O que eu faço é parar de chorar, não posso ir e vir, não posso ir e vir.