The resource loading... loading...

Please guys, tradeview's alert_message changes how to pair FMZ.

Author: q631207207, Created: 2022-05-16 21:10:12, Updated: 2022-05-16 21:11:40

if (tp1Open) strategy.exit(long 1 tone, when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp1), qty_percent=tp1Amount, comment=long more than flat 1 tone, alert_message = flat more than 30% tone)strategy.exit(short1, when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp1), qty_percent=tp1Amount, comment=plain 1, alert_message=plain 30%)

if (tp2Open) strategy.exit(long2points, when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp2), qty_percent=tp2Amount, comment=points more than 2points, alert_message=points more than 50%)strategy.exit(short2, when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp2), qty_percent=tp2Amount, comment=short2, alert_message=short2, 50% of the time)

if (tp3Open)
strategy.exit(long 3 bits, when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp3), qty_percent=tp3Amount, comment=long more than flat 3 bits, alert_message=long more than flat 100% bits)strategy.exit(short3, when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp3), qty_percent=tp3Amount, comment=short3, alert_message=short 100%)

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

More

Inventors quantifiedIn addition, the inventor can directly create a pin to create a policy to see if it can be run.

q631207207The problem now is, how should my strategy be to pick up the FMZ robot, the community robot code that doesn't seem to be sorted?

Inventors quantifiedWhat's up? 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)) (Laughter) (Laughter) longCondition = alertfg and close>close[1] if (longCondition) This is a list of all the different ways Strategy.entry is credited in the database. longsl=alertfg and closeclose[1] strategy.close ("short", when=high > strategy.position_avg_price * (1 + st5) or shortsl,comment='blank loss', alert_message="blank stop loss") // The equation logic if tp1Open strategy.exit ("long1", when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp1), qty_percent=tp1Amount, comment='more than flat 1', alert_message="more than flat 30%") strategy.exit ("short1", when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp1), qty_percent=tp1Amount, comment='blank1', alert_message="blank 30%") if tp2Open strategy.exit ("long2", when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp2), qty_percent=tp2Amount, comment='more than flat2', alert_message="more than flat 50%") strategy.exit ("short2", when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp2), qty_percent=tp2Amount, comment='blank2', alert_message="blank 50%") if tp3Open strategy.exit ("long3", when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp3), qty_percent=tp3Amount, comment='more than flat 3', alert_message="more than flat 100%") strategy.exit ("short3", when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp3), qty_percent=tp3Amount, comment='blank3', alert_message="blank100%") What's up? You can copy this directly, and it should be fine.

Inventors quantifiedalertfg is undefined. It's missing this variable.

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 (Laughter) (Laughter) (Laughter) (Laughter) (Laughter) (Laughter) longCondition = alertfg and close>close[1] if (longCondition) This is a list of all the different ways Strategy.entry is credited in the database. What do you mean? longsl=alertfg and closeclose[1] strategy.close ("short", when=high > strategy.position_avg_price * (1 + st5) or shortsl,comment='head loss', alert_message="head stop") What do you mean? // The equation logic If (tp1Open) is used. strategy.exit ("long1", when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp1), qty_percent=tp1Amount, comment='more than flat 1', alert_message="more than flat 30%") strategy.exit ("short1", when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp1), qty_percent=tp1Amount, comment='blank1', alert_message="blank 30%") If (tp2Open) is used. strategy.exit ("long2", when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp2), qty_percent=tp2Amount, comment='more than flat2', alert_message="more than flat 50%") strategy.exit ("short2", when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp2), qty_percent=tp2Amount, comment='blank2', alert_message="blank 50%") What do you mean? If (tp3Open) is a function. strategy.exit ("long3", when=strategy.position_size > 0, limit=strategy.position_avg_price * (1 + tp3), qty_percent=tp3Amount, comment='more than flat 3', alert_message="more than flat 100%") strategy.exit ("short3", when=strategy.position_size < 0, limit=strategy.position_avg_price * (1 - tp3), qty_percent=tp3Amount, comment='plain3', alert_message="plain100%") This is my stopgap, I can't just move around and run around.