Results 1 to 2 of 2

Thread: How to avoid having week-ends "gaps" while plotting a stockchart with intraday sample

  1. #1
    Join Date
    Jan 2011
    Location
    Paris
    Posts
    13
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default How to avoid having week-ends "gaps" while plotting a stockchart with intraday sample

    Hi all,

    I use a QwtPlot to plot some prices as candlesticks. However, my application has the ability to plot intraday data (hourly, m15, ...). Thus, it is possible that they are in the samples prices goind from friday to monday. When this happens, there is a gap is the plot (since there is no data for the week-end). I am wondering how I can remove this gap.

    Do you have any hint?

    Hope you could help

    Bets regards

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,309
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to avoid having week-ends "gaps" while plotting a stockchart with intraday sa

    Then you can't use the scale system implemented in QwtDate and the QwtDateScaleEngine/QwtDateScaleDraw. Instead:


    1. you have to define a mapping between your dates and coordinates ( doubles ) without gaps.
    2. you have to find a way how to set the ticks of the scales at positions, that make sense for your dates. You can set them manually ( QwtPlot::setAxisScaleDiv() ) or you have to implement your own type of scale engine.


    Uwe

Similar Threads

  1. QDateEdit change the "first day of week"
    By xgoan in forum Qt Programming
    Replies: 5
    Last Post: 23rd December 2013, 08:59
  2. Using QEvent to avoid a slot to be called "concurrently"?
    By LisaDearheart in forum Qt Programming
    Replies: 4
    Last Post: 19th August 2012, 20:34
  3. Replies: 6
    Last Post: 2nd October 2011, 22:08
  4. How to "detect" when editing a cell in QTableWidget ends?
    By dobedidoo in forum Qt Programming
    Replies: 1
    Last Post: 15th April 2011, 14:53
  5. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 20:05

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.