| 
    
     |  | あー・・すいません。自分の使っているコードから、コピペする部分を間違え ました。移動平均線を出すのは
 
 With .SeriesCollection(4).Trendlines _
 .Add(Type:=xlMovingAvg, Period:=13).Border
 .ColorIndex = 10
 .Weight = xlHairline
 End With
 
 というような感じになります。これで13日移動平均になります。
 (引数 Period の値で決める) 従って全体としては・・
 
 Sub MyChart()
 Dim PlotR As Range
 
 With Sheets("Sheet3")
 Set PlotR = .Range("A1", .Range("E65536").End(xlUp))
 End With
 Charts.Add
 With ActiveChart
 .ChartType = xlStockOHLC
 .SetSourceData Source:=PlotR, PlotBy:=xlColumns
 .Location Where:=xlLocationAsNewSheet
 .HasTitle = True
 .ChartTitle.Characters.Text = "ローソク足"
 With .ChartGroups(1)
 .HasUpDownBars = True
 .DownBars.Interior.ColorIndex = 5
 .DownBars.Border.ColorIndex = 5
 .UpBars.Interior.ColorIndex = 6
 .UpBars.Border.ColorIndex = 6
 End With
 With .SeriesCollection(4).Trendlines _
 .Add(Type:=xlMovingAvg, Period:=7).Border
 .ColorIndex = 10
 .Weight = xlHairline
 End With
 .SizeWithWindow = True
 .Deselect
 End With
 Set PlotR = Nothing
 End Sub
 
 というようなコードになると思います。色については適当にパレット番号を指定
 して下さい。
 
 |  |