Home forums Using CanvasJS combining candlestick chart and line chart (moving average line)

This topic contains 4 replies, has 2 voices, and was last updated by  Vineet Deodhar 1 week ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #17558

    I am very much excited by the simplicity of canvasjs.
    Wish to use it for my purpose.
    I need candlestick chart with overlapped moving average lines on same canvas.
    Can it be done?
    Thanks in advance.

    • This topic was modified 1 week, 2 days ago by  Vineet Deodhar. Reason: spelling
    #17580

    Suyash Singh
    Moderator

    Vineet Deodhar,

    Thank you for your interest in CanvasJS.
    Yes, it can be done. You can combine Candlestick chart with Spline chart, where spline represents the moving averages. Please have a look at this jsfiddle.

    ___
    Suyash Singh
    Team CanvasJS

    #17581

    Thanks Suyash Singh for your reply.
    Its really great to learn that my need can be satisfied by your library.
    Also, your reply was thorough and even more informative than I asked. (you provided js code for moving averages).
    Thanks for that.

    Furhter, may I ask– 1) what js code would be right for having Exponential Moving Averages instead of SMA.
    2) I need 5 EMAs. So I think I can pass those many json datasets in the way you have specified. Right?

    #17605

    Suyash Singh
    Moderator

    @Vineet Deodhar,

    1) what js code would be right for having Exponential Moving Averages instead of SMA.

    Please have a look at this updated jsfiddle.

    2) I need 5 EMAs. So I think I can pass those many json datasets in the way you have specified. Right?

    Yes, you can add multiple EMA’s to the chart by adding them to data-series array.

    ___
    Suyash Singh
    Team CanvasJS

    #17616

    Thank you very much for your support.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.