-
A custom command you can easily add to any script to sync open positions with exchange on start for example.
Tested working with Binance, not sure about others.
Simple Usage – give the command the position Id’s for the positions you want to sync and save the id’s, done.
local shortPosId = Load('shortPosId', NewGuid())
local longPosId = Load('longPosId', NewGuid())
if Load('syncdone', true) then
CC_SyncPositions(true, shortPosId, longPosId)
Save('syncdone', false)
end
Save('shortPosId', shortPosId)
Save('longPosId', longPosId)