ChartTimePriceToXY(0,0,time1[j],price1[j],xxx[j],yyy[j]);This is the right option. Perhaps the error is associated with arrays xxx and yyy.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
When I use the function of ChartTimePriceToXY() to convert time and price coordination to x and y coordination, I need transfer the time and price and address of x and address of y to the function, the prototyeof this function is as follows:
bool ChartTimePriceToXY(
long chart_id, // Chart ID
int sub_window, // The number of the subwindow
datetime time, // Time on the chart
double price, // Price on the chart
int& x, // The X coordinate for the time on the chart
int& y // The Y coordinates for the price on the chart
);
When I use it, there are allways wrong report. This is how I use it:
ChartTimePriceToXY(0,0,time1[j],price1[j],&xxx[j],&yyy[j]);
This doesn't work. Then I changed. I use it like this:
ChartTimePriceToXY(0,0,time1[j],price1[j],xxx[j],yyy[j]);
This is not right too.
Please tell me how to fix it, and Thank you very much!