Example: Remote signals combined with managed leverage trading

0 50 Views No Comments 2 months ago
  • This is an example script to show how remote signals can be read inside HaasScript and how to handle it for managed leverage trading.

    HaasScript Code
    -- High speed update are recommended for a quick responce, but its not essential
    EnableHighSpeedUpdates();
    
    -- Use your own signal identifier for this field
    signal = GetRemoteSignal('d8f3e51a01454d07a31343c63a426e9f')
    
    -- Progress the incoming data like this
    if (signal == SignalLong) then
      DoLong()
    end
    if (signal == SignalShort)  then
      DoShort()
    end
    if (signal == SignalExitPosition)  then
      DoExitPosition()
    end
    
    -- The following methods are not totally valid, because the
    -- signals are more advanced then managed trading can handle
    if (signal == SignalExitLong)  then
      DoExitPosition()
    end
    if (signal == SignalExitShort)  then
      DoExitPosition()
    end
Login or Register to Comment

Unlock your crypto trading potential

Create a free account and enjoy everything we have to offer.

Join for Free