Shortcut key to switch between line chart and candlestick chart

I would like to have a short-cut key to switch between displaying line chart and candlestick chart. Currently, I need to right-click mouse button to go to properties and change the chart style. The menu option "Chart->Price chart style" does not work. I do not know how to change the AFL code to make this menu option work.

Here is my AFL code to plot the price.

PlotParam = ParamStyle("PlotStyle", defaultstyle = styleCandle, mask=maskPrice);
Plot( Close , "Close", colorRed, styleNoTitle | PlotParam | styleThick );

It does work. Use GetPriceStyle()

Plot( Close , "Close", colorRed, styleNoTitle | GetPriceStyle() | styleThick );

Then assign shortcuts at Tools -> Customize -> KeyBoard -> Category:View -> Price chart style

3 Likes