InteractiveChart icon indicating copy to clipboard operation
InteractiveChart copied to clipboard

Features Suggestion

Open IRMobydick opened this issue 3 years ago • 9 comments

Hi there First of all, I just wanna thank you for this library. I Have some suggestions for you to make this library more robust.

Showing open orders on chart: Just imagine the user puts an order to buy/sell in its orders book.

  1. Showing these orders if they are within the time frame.
  2. The moving ability to change the order price by prompting and confirmation alert dialog can be the killer features for this library.

image this order have type also: Limit, Advanced Limit, Stop... Sample Library

DepthChart

  1. Drawing a Separator line in the middle of the chart.
  2. Showing both Bids/Ask indexes with information on both sides. image

IRMobydick avatar May 29 '22 11:05 IRMobydick

Hello, thank you very much for your suggestions.

The function of displaying open orders on the chart has been realized. See the demo for details.

I think the depth chart is very good. I will implement it in the later iteration.

Thanks again!

LLWenke avatar Jun 13 '22 02:06 LLWenke

Dude, this is amazing! nice!

image

Note

There is some sort of things, I think you should consider about showing order history and open orders on the chart:

  • N1. As you can see in the picture, for showing order history, the Sell [S] label should always show on top and Buy [B] on the bottom of the candle. ( By the way, your approach to avoid overlapping labels was brilliant! )
  • N2. Open orders show on-axis not on candles, as you can see in the picture either

Questions

  • Q1: Can set click listener on markers ( [B] and [S] )?
  • Q2: MarkerPoint in candle mode, just show when another index is visible, is it possible to have a marker point like index to turn on and off? ( I think if you move marketPointCount process before checking attached index type, we can have markers on the chart)

Bug Report

  • B1. when the chart is loaded at first, if the user tries to zoom, Bingo! all chart data goes to the left side of the chart!

( I think the bug came from getTransX() in AbsRender class, it returns leftOffset as 0!, this bug does not happened when user scroll and then try to zoom! I think it can be related to matrixTouch)

Solution: In the AbsRender.class, at zoom method, you have to encode scale & rotation on touchMatrix with touchvalue :

if (x < contentRect.left) {
        x = contentRect.left;
    } else if (x > contentRect.right) {
        x = contentRect.right;
    }

   matrixTouch.getValues(touchValues);  // The missing part!

    final float minVisibleIndex;
    final float toMinVisibleIndex = visibleCount * (x - contentRect.left) / contentRect.width();
  • B2. Marker point! When the user changes the main chart view, index type! Some glitches happen to those markers! ( for reproducing the bug, just try to hide indexes of chart view and then scroll and then on the index to see the result! )

Solution: In the MarkerPointDrawing.class, at the onDraw method, when you check getMarkerPointCount(), if return value is equal to zero, you have to reset paths just like this:

if (iMarkerPoint.getMarkerPointCount() == 0) {
    markerPointsPathB.reset();
    markerPointsPathS.reset();
    markerPointsPathT.reset();
    markerPointsLinePathB.reset();
    markerPointsLinePathS.reset();
    markerPointsLinePathT.reset();
    return;
}
  • B3. Candles does not show properly when data set length is short, just imagine you have a data list with less than 5 candles, in this situation chart can not calculate properly the width to show candles in left side of chart

  • B4 Marker points get out of view! it means chart does not recalculate max and min value to handle the height of chart in this situation.

IRMobydick avatar Jan 15 '23 12:01 IRMobydick

Hi @LLWenke, Did you see my latest messages?

IRMobydick avatar Aug 04 '23 08:08 IRMobydick

Hello, thank you very much for your feedback.

I will evaluate and implement your suggestions in the following time, and fix the problem. I will notify you after the update, thank you again!

LLWenke avatar Aug 08 '23 01:08 LLWenke

Dear friend, I was wondering if there have been any updates on the suggestions we discussed earlier?

IRMobydick avatar Dec 23 '23 19:12 IRMobydick