tilt sensor auto level overshoot

Hi,
I'm fairly new to the programming world; And I have a project which is: A hydraulically controlled auto-levelling spindle for a jib-type crane. Basically a yoke attached to the spindle with two hydraulic cylinders that keeps the crane pivot spindle vertical (Or "level" on the top). Anyway, the predicament is, is while testing on my mockup using a electric actuator it "searches" for level then finds it and quits moving, it goes up, overshoots, then undershoots, overshoots again, and then comes to level. What can I change in my program to make it level itself with really minor under/overshoots? Change from bang bang to PID? Thanks in advance. (Code below:)

//Mar 1, 2019 Auto Level code beta1
// beta1: 
//  - single axis auto level tesing 
//  - general wiring setup/establishment 

// < E-level wiring >
//   Red = positive 
//   Black = negitive
//   Yellow = TX (UNO Pin 5)
//   Green = RX (UNO xPin 6)
//
//  Relay wiring:
// Relay 3, Pin3
// Relay 4, Pin4
// NC is positive
// NO is negitive 
// Motor negitive is relay3 COM
// Motor positive is relay4 COM

#include <SoftwareSerial.h>
#include <JY901.h>
SoftwareSerial serial1 (5,6); // (RX,TX)
#define relay3 3
#define relay4 4
const int button = 7;
int buttonState = LOW;
int ledstate = -1;


void setup() 
{
  
  Serial.begin(9600);
  serial1.begin(9600);
  JY901.attach(serial1);
  
  pinMode(relay3, OUTPUT);
  pinMode(relay4, OUTPUT);
  pinMode(LED_BUILTIN, OUTPUT);  
  
  pinMode(ledPin, OUTPUT);
  pinMode(buttonPin, INPUT);
}

void loop() {

  JY901.receiveSerialData();
  float preRoll = JY901.getRoll(); //getting raw roll and pitch 
  float roll (preRoll + 1.18);     //adding offset to make 0º into actual 0º (for both pitch and roll)
  float prePitch = JY901.getPitch();
  float pitch (prePitch + .96);
  
  Serial.print("Roll ");
  Serial.print(roll);
  Serial.print(" Pitch ");
  Serial.println(JY901.getPitch());
  
    if (roll  > .28) {
    digitalWrite(relay3, HIGH);
    }
    else digitalWrite(relay3, LOW);

    if (roll  < -.28) {
    digitalWrite(relay4, HIGH);
    }
    else digitalWrite(relay4, LOW);

    if (roll > -.28 && roll < .28) {
      digitalWrite(LED_BUILTIN, HIGH);} 
      else digitalWrite(LED_BUILTIN, LOW);
}

Lukejs:
What can I change in my program to make it level itself with really minor under/overshoots? Change from bang bang to PID?

Yes.