Moving linear actuator and keeping position using myoware muscle sensor.

I was wondering if you could help me with my project, im Trying to code a Orthosis hand that will help me with my paralysis. I currently have the linear actuator working with a myoware emg muscle sensor. my goal is to activate the Actuator with the EMG and have it stay in that position, but at the moment Every time I activate the The actuator it comes back to its normal starting position and it does not stay In the position I wanted to. Any help will be greatly appreciated .

My code :

#include <Servo.h>

Servo fingers;

int onboardLED = 13; // Arduino onboard LED (pin 13) you can control
int analogpin = 3;
int val = 0;
int startValue = 2000;

void setup()
fingers.attach(9); //Attach the servo for the four fingers to pin9
Serial.begin(9600); // this is for serial moniter to see the muscle sensor value you’re getting
pinMode(onboardLED, OUTPUT);

void loop()
val = analogRead(analogpin); //muscle sensor connected to pin A3 being stated as val
if( val < 250) //if you flex and the sensor value is greater than 250 then close servos–adjust this value to your muscle sensor value

Serial.println(“NO!”); // prints string + new line
digitalWrite(onboardLED, LOW); //this sends 5V, turning on LED

Serial.println(“CONTRACTION!”); // prints string + new line
digitalWrite(onboardLED, HIGH); //this sends 5V, turning on LED

You print the value of the val variable. What values do you see? When you flex, does the value stay above 250?