Press a key to perform the a shift from the right chart border function on MT4 chart

 

How to code such that, 

When I press the "right shift key", the current chart will perform "a shift from the right chart border" ? Thanks!

I have tried to code in the following, but it doesn't work:

 if(id==CHARTEVENT_KEYDOWN)
     {
       if(lparam=='16')
         {
           ChartSetInteger(CHART_SHIFT,true);
         }
     }
 
ChartSetInteger(0,CHART_SHIFT,true);



 
Thank you!!!!
Reason: