[CMD] Sync Positions

2 800 Views 1 Comment 2 years ago
  • Yes it works, Yes Its running on live working bots.

    Will sync positions with whats open at the exchange if the bot looses its amount or entry price somehow.

    example

    
    if backtest == false then 
                CC_SyncPositions(sync, LongPositionId, ShortPositionId, PriceMarket(), Leverage(), false, false)
     end 
    

    — Feel free to donate to support my work or if my script helped you in any way <3
    — BTC Adress: 33MsEAbA8tg7SpohgnCpSrmPTBih2UkhxQ

    • This topic was modified 2 years, 3 months ago by Strooth.
    HaasScript Code
    Sign in or Register to download for free
    • #3406
      sm26449
      Basic
      Up
      1
      Down
      ::

      Please update line 68 of the script to:

      elseif pos.isLong == true and pos.positionId != long then

      because pos.isLong == true is missing, when you delete the position from exchange it is not updated in the bot.

Login or Register to Comment

Unlock your crypto trading potential

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

Join for Free