Point and Figure chart scaling the y axis

I have developed a point and figure chart script that work exactly like the Stockcharts site, I even have the percentage (Log/Ln) box version done, and I have the 1x1 1 box reversal done as well as suggested by Richard D. Wyckoff. I have verified the math (both the traditional box, ATR, etc, even the percentage log version), all done correctly. It is not done using low level graphic. Fxshrat implemented a beautiful version using low level graphics which I would like to learn how to do. What I need is a way to scale the y axis, and make the plot look nice. The issue I have is, as you can see in the charts, when I first drag and drop the chart into the canvas, it looks out of place (top pane), so I have to press the shift key and adjust the mouse manually to scale the y axis to make it look nice (bottom pane). However, what I need is to fix the y axis to have a custom unit of ATR box * 5, in this case, the ATR box is 3 cents, so I need the y scaling to be 15 cents ( 3cents * 5 boxes ). I tried playing around with the Axes & Grid parameter (setchartoptions) to no avail.

What I would like to do is:
1). Implement a custom y axix.
2). Turn off the background grid, so I can supply the GUI horizontal/vertical lines separately.

Thanks for your time and any suggestion(s) you have :slight_smile:


1 Like

@Clipper, if you want to draw everything low level, you can take a look at GfxSetOverlayMode().
There are some caveats as discussed in this past thread.

I wrote some basic hints about drawing custom axes here.

To learn how to do it, I suggest trying to replicate the existing axes in a regular chart and, when you are satisfied, apply the logic you developed to your custom P&F chart (consider the need to zoom and pan).

Thanks beppe. Does anyone know if there is a way to turn off the y axis ? If I choose to use custom axis, I would want to be able to turn off the y axis first.

There is not any need to turn off axes.
You simply draw on top. That's all.

Draw on top.
See GfxSetOverlayMode() and GfxFillSolidRect etc to fill chart area.

There is not any GUI lines.
There is Gfx functions to draw lines.

Thank you for your help fxshrat :slight_smile:

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.