Weird of OnChartEvent Function
Young Ho Seo: If lparam and dparam are respectivley x and y coordinate of
object in chart, then how come these two are different variable types ?
It's a generic interface: a long, a double, and a string.
For a click you need two ints (X and Y,) and a long and double can hold them just fine. Casting both to an int when passing to ChartXYToTimePrice works just fine.
If you needed to send a double via a custom
event you can. Would it bother you less if the interface was int 1, int 2, unused double
and a string?

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
Maybe I am confused on this.
However, I found that OnChartEvent provide four inputs as you can see from code.
If lparam and dparam are respectivley x and y coordinate of object in chart, then how come these two are different variable types ?
Like x being long but y being double seems weired. Instead, both x and y could become long or both x and y could become double.
Is there any reason for these two variables (i.e. lparam and dparam) to be different variable type ?