[CMD] Strooth’s Position Controller

2 468 Views No Comments 2 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

    • This topic was modified 2 years ago by Strooth.
    HaasScript Code
    Sign in or Register to download for free
  • Mandala Trading Competition Promotion Type: contest Expires: June 9, 2023 Exclusive
    Trading volume competition, win up to $10,000 USDT and bounties.
  • Earn Up to 200 BMEX Tokens Promotion Type: contest Expires: March 31, 2023
    15 BMEX @ $20,000, 25 BMEX @ $50,000, 50 [email protected] $200,000, 100 BMEX @ $400,000, 200 BMEX @ $600,000 in monthly derivatives volume
Login or Register to Comment

Unlock your crypto trading potential

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

Join for Free