Not Quite Roman Ternary Given an integer n ≥ 0 , output it in a non-positional base-3 notation, using digits 139ABCDE… and a 1-character separator. Every digit is a consecutive power of 3 and the digits on the left side of the separator are negated, e.g.     A931|B   →    81−(1+3+9+27)   →    41. A digit may appear only once.
Rigorously, let the value of a digit be:

its value if the digit is 1, 3 or 9
27 if the digit is A
3 times the value of the digit right before it for B..Z

Your output should satisfy sum(value of digits to the right of |) - sum(value of digits to the left of |) == input .
Examples
input     output
----------------
0         |
1         |1
7         3|91
730       |D1
9999      FEDC|GA9

You may use a different non-space character as a separator. You are also allowed to have no separator, in which case the largest digit starts the positive sequence. You don’t need to handle anything larger than 232−1 (PMIGDCBA9|RQNLH3).
You may write a full program or function, and input and output may be provided on any of the usual channels.
This is code-golf, so the shorter your answer the better!
Java 10, 120 113 112 109 107 102 92 bytes

n-&gt;{var r=&quot;|&quot;;for(var c='1';n++&gt;0;c+=c&gt;64?1:c*4%22%9,n/=3)r=n%3&lt;1?c+r:n%3&gt;1?r+c:r;return r;}

-3 bytes by using part of the trick of @Arnauld's JavaScript (ES6) answer,
changing i=0 and i++&lt;1?49:i&lt;3?51:i&lt;4?57:i+61 to i=4 and ++i&gt;9?i+55:i&gt;8?57:++i+43.
-6 bytes thanks to @Arnauld directly, by getting rid of i.
-10 bytes thanks to @ceilingcat.
Order of output: Highest-to-lowest, |-delimiter, lowest-to-highest.
Explanation:
Try it online.
n-&gt;{              // Method with integer parameter and String return-type
  var r=&quot;|&quot;;      //  Result-String, starting at the delimiter &quot;|&quot;
  for(var c='1';  //  Character, starting at '1'
      n++&gt;0       //  Loop as long as `n` is larger than 0
                  //  Increasing it by 1 with `n++` at the start of every iteration
      ;           //    After every iteration:
       c+=        //     Change character `c` to:
          c&gt;64?   //      If the current `c` is an uppercase letter:
               1  //       Simply go to the next letter using `c+=1`
              :   //      Else:
               c*4%22%9,
                  //       Change '1' to '3', '3' to '9', or '9' to 'A'
       n/=3)      //     Integer-divide `n` by 3
     r=           //   Change the result to:
       n%3&lt;1?     //    If `n` modulo-3 is 0:
        c+r       //     Prepend the character to the result
       :n%3&gt;1?    //    Else-if `n` modulo-3 is 2:
        r+c       //     Append the character to the result
       :          //    Else (`n` modulo-3 is 1):
        r;        //     Leave `r` unchanged
   return r;}     //  Return the result-String