[CMD] Sync Positions

2 872 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.


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

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

    HaasScript Code
    Sign in or Register to download for free
  • Phemex x HaasOnline Promotion Type: contest Expires: May 31, 2024 Exclusive
    Receive up to 1,200 USDT! The more you trade, the more you earn.
    • #3406

      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