Problems with Servo motor MG 996R Tower Pro

I'm testing Servo Motor MG 996R Tower Pro and when i use a simple code he goes 180 º and starts to shake. I already try use a separate power suply to the Servo motor and the only difference it's that he goes a little more fast. I'm using a arduino uno. Moreover doens't matter wich angle i chose he always goes 180º and shake.

/* Sweep
 by BARRAGAN <http://barraganstudio.com>
 This example code is in the public domain.

 modified 8 Nov 2013
 by Scott Fitzgerald
 https://www.arduino.cc/en/Tutorial/LibraryExamples/Sweep
*/

#include <Servo.h>

Servo myservo;  // create servo object to control a servo
// twelve servo objects can be created on most boards

int pos = 0;    // variable to store the servo position

void setup() {
  myservo.attach(10);  // attaches the servo on pin 9 to the servo object
}

void loop() {
  for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
    // in steps of 1 degree
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15 ms for the servo to reach the position
  }
  for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15 ms for the servo to reach the position
  }
}

That power supply must be able to provide at least 3 Amperes, at 5 to 6V, for one MG996R. If not, the servo will shake.

But it can supply. The problem is when the Servo goes to 180º he shake, like he is trying to go 200º i think. Moreover when i use myservo.write(pos) it's like i'am modifying the speed, i tried angles since 0º to 180º, but he only rotates in one direction.

Command the servo to move to a smaller angle. It will destroy itself, if it keeps hitting the end stop.