B
Bill Cunningham
This program is far from complete but I think there's something wrong in
the mf line. Which means "money flow". Other than that I have no idea what
is wrong here. The formula calls for tp_price X vol. Vol is an int and
tp_price is a double and I'm multiplying the two. Is this legal?
#include <stdio.h>
int main(int argc, char *argv[])
{
if (argc != 5)
puts("MFI usage error, C H L Vol");
double _close, _high, _low, tp_price, mf;
int vol;
_close = strtod(argv[1], NULL);
_high = strtod(argv[2], NULL);
_low = strtod(argv[3], NULL);
vol = atoi(argv[4]);
tp_price = (_close + _high + _low) / 3;
mf = tp_price * vol;
printf("%i\n", mf);
return 0;
}
Bill
the mf line. Which means "money flow". Other than that I have no idea what
is wrong here. The formula calls for tp_price X vol. Vol is an int and
tp_price is a double and I'm multiplying the two. Is this legal?
#include <stdio.h>
int main(int argc, char *argv[])
{
if (argc != 5)
puts("MFI usage error, C H L Vol");
double _close, _high, _low, tp_price, mf;
int vol;
_close = strtod(argv[1], NULL);
_high = strtod(argv[2], NULL);
_low = strtod(argv[3], NULL);
vol = atoi(argv[4]);
tp_price = (_close + _high + _low) / 3;
mf = tp_price * vol;
printf("%i\n", mf);
return 0;
}
Bill