Example: Remote signals combined with managed spot trading
stableDescription
This is an example script to show how remote signals can be read inside HaasScript and how to handle it for managed spot trading.
HaasScript
-- This is an example script to show how remote signals can be
-- read inside HaasScript and how to handle it for managed
-- spot trading.
-- High speed update are recommended for a quick response, but its not essential
EnableHighSpeedUpdates();
-- Use your own signal identifier for this field
signal = GetRemoteSignal('d8f3e51a01454d07a31343c63a426e9f')
-- Progress the incoming data like this
if (signal == SignalBuy) then
DoBuy()
end
if (signal == SignalSell) then
DoSell()
end
1 Comment
Sign in to leave a comment.
Hi, what is the API string to use for this please? I tried the one in the Docs (https://help.haasonline.com/docs/v/4.x/usage/remote-signals) but it did not connect. Thanks