|
Using Equation in Charts |
Posted by digitalalpha on Dec-12-2014 01:01 |
|
Your chart is great.
We want to check if we can provide say a math expression, and your script can parse the
equation. e.g.
Lets say if we want to build a chart of two symbols e.g.
((A+B)/0.20)
We can take care of variable 'A' and 'B' prices but want to check, if there is a way to parse
equation.
We wanted to check, if we can use your array math or anyting else for the same. Please
guide us.
Thx
Thanks... |
Re: Using Equation in Charts |
Posted by Peter Kwan on Dec-12-2014 01:19 |
|
Hi digitalalpha,
Unluckily, ChartDirector cannot parse mathematical expressions.
I am thinking, the easiest way to parse an expression is to use a programming language that
can parse expressions at runtime, such as many of the scripting languages (VBScript,
Javascript, PHP, Perl, Python). In this way, you can use the functions of the scripting
language as well (such as sin, cos, tan, log, pow, exp, .....).
Regards
Peter Kwan |
Re: Using Equation in Charts |
Posted by digitalalpha on Dec-13-2014 01:19 |
|
Hi Peter,
Got it. Any reference parser you can give for PHP.
Thanks.. |
Re: Using Equation in Charts |
Posted by Peter Kwan on Dec-13-2014 03:27 |
|
Hi digitalalpha,
Due to my limited experience in parse mathematical expressions, I am unable to suggest a
reference parser. I would like use google to see if I can find anything useful. I would also
consider to just write some code to translate the expression into PHP syntax (such as to
put a "$" character before any variable name), and just use the PHP "eval" function to parse
and evaluate the expression.
Regards
Peter Kwan |
|