[CMD] Strooth’s Position Controller

2 726 Views No Comments 3 years ago
  • This is a command to easily control positions in unmanaged trading scripts and increment slots if needed.

    Simply load the command at the head of your script using the CheckPos key and load your position Id’s, the name used will then be suffixed for each position opened/closed

    -- Position Controller check at head/top of script 
            local cmd = CC_PositionControl().CheckPos
            local shortPosId = Load('shortPosId', cmd("Trade Short", true, false))
            local longPosId = Load('longPosId', cmd("Trade Long", true, true))

    In the main go() function of your script before your strategy

                longPosId = cmd(longPosId)
                shortPosId = cmd(shortPosId)

    That’s all there is to it, example showing it working in the screenshots

    HaasScript Code
    Sign in or Register to download for free
  • Earn Up to $100,000 USDT Promotion Type: contest Expires: June 30, 2024 Exclusive
    Fire up your trade bots and earn up to $100,000 USDT, BitMEX VIP, free subscriptions, and more.
Login or Register to Comment

Unlock your crypto trading potential

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

Join for Free