So you only want to show it if both fields are not empty, and are not the
Something like this should work as the custom calculation script of the "warning" field. Just adjust the names of the two other fields, as required:
var f1Name = "total credits amount";
var f2Name = "total debits amount";
event.target.display = (getField(f1Name).value!=getField(f2Name).value && getField(f1Name).value!="" && getField(f2Name).value!="") ? display.visible : display.hidden;
Works beautifully; Much thanks!