Trend indicator
The signals service watches which positions are opened and closed and tells the trading apps how the open positions on a symbol split between long and short. Traders can use it to decide which assets to trade.
TrendMessage
{
"messageType": "TrendMessage",
"symbol": "EURUSD",
"trend": 0.25
}
trend is a number from -1 to 1. At -1 every open position on the symbol is short, at 1 every one is long. 0 means an even split, or no open positions at all.
The value counts positions and ignores their volume:
trend = (long - short) / (long + short)
Three long positions and one short position give 0.5.
A TrendMessage is sent when a position on the symbol is opened or closed, at most once every 5 seconds per symbol. The messages are published on the signals exchange, and live-edge sends them to every connected client. See Message Bus.
Trends
{
"messageType": "Trends",
"trends": [
{ "symbol": "EURUSD", "trend": 0.25 },
{ "symbol": "GBPUSD", "trend": -1 }
]
}
The trend of every symbol the service has seen a position on. A client gets it after login, and as the answer whenever it sends a SignalsRequest. The list is complete, so it replaces the values a client had before.