Use Signals
Use remote signals from providers like TradingView.
Last updated
Use remote signals from providers like TradingView.
Last updated
HaasOnline TradeServer Cloud gives you the ability to register signals. These signals can be used in several different ways.
For example, use them to send buy or sell signals from HaasScript to another HaasScript or from an external source (e.g. TradingView) to HaasScript.
On the signal management page, you can register your own private signals. Give them a name and description and in return you will get a public and secret key.
For the signal production, you will need your previously generated public and secret key. This is for safety reasons.
Inside a HaasScript, by using the SaveRemoteSignal(public,secret,signal)
command
Externally with a webhook and calling the following URL:
https://production.hcdn.web.haasapi.com/SignalAPI.php?channel=STORE_SIGNAL&id=&secret=&signal=
Webhook Signal ID Options:
1 = Long (or Buy)
2 = Short (or Sell)
3 = ExitPositions (closes all open positions)
4 = Exit long
5 = Exit short
6 = Signal Reserved A (free to be used for whatever goals)
7 = Signal Reserved B (free to be used for whatever goals)
Reading signals is done by the public key and it's from inside HaasScript. The command looks like this:
signal = GetRemoteSignal(public)
In this case, the signal which comes back can just be compared to the common signals, like SignalLong
, SignalShort
, SignalExitLong
and so on.
HaasScript example,
Example:
Example: