-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setForzeZeroInRange #10
Comments
Sure! I will add the ability to specify a range, or if one is not provided I will incorporate the minimum value as the bottom instead of zero. Thanks for the idea, it had never occurred to me. |
Maybe I'm missing something, but I plugged in some BTC prices from the last month and got this result using the current version of package com.mitchtalmadge.asciidata.graph;
public class Test {
public static void main(String... args) {
System.out.println(ASCIIGraph.fromSeries(new double[]{7438.67, 7562.14, 7634.19, 7769.04, 8181.20, 8221.58, 8205.82, 8169.06, 7950.40, 8176.85, 8379.66, 7716.51, 7414.71, 7417.80, 7352.72, 7467.40, 7378.20, 7315.32, 6739.65, 6357.01, 6272.70, 6247.50, 6235.03, 6396.78, 6330.77, 6739.21, 6775.08, 6857.80, 6668.71, 6638.69}).withNumRows(7).plot());
}
}
Does your data have any negative or very low values somehow? I guess I already have the graph determining the range from the highs and lows. |
hmm, yeah you're right. Maybe I was testing with my profit and not the market price and then my brain farted. System.out.println(ASCIIGraph.fromSeries(Arrays.asList(-181d, -171d, -161d)).plot());
So yeah, I do have negative values. |
Looks like the negatives could use some cropping. I'll work on that |
I'm using this library mostly for debugging trading bots. The problem is that the prices never go to 0, but instead hang around, let's say, 8000. The charts force the zero to be in range of the Y axis, which flattens my chart to a point where I can't see movements anymore. Can you add an option to not force zero in range on the Y axis? Or better yet, allow us to determine our own ranges?
The text was updated successfully, but these errors were encountered: